Description
Do not use SHA-1-based rsasha1 for new DNSSEC signatures. Choose an algorithm supported by Cloud DNS and validating resolvers for both the key-signing and zone-signing keys. DNSSEC verifies the origin and integrity of DNS data without encrypting it.
Potential impact
If the parent DS record still identifies an old key after a change, validating resolvers can reject legitimate answers.
Remediation
Change default_key_specs while DNSSEC is off. For an already signed zone, first remove the old DS from the parent and wait for cached copies to expire before stopping signing. Update the key settings, re-enable signing, publish the new matching DS, and check validation through a DNSSEC-validating resolver.
Examples
The examples switch both 2048-bit key specs from rsasha1 to rsasha256 on the same zone. Both keep state = "off", so neither signs records. Supply your zone name and domain.
Before
resource "google_dns_managed_zone" "example" {
name = "example-zone"
dns_name = "example.com."
dnssec_config {
state = "off"
default_key_specs {
algorithm = "rsasha1"
key_type = "keySigning"
key_length = 2048
}
default_key_specs {
algorithm = "rsasha1"
key_type = "zoneSigning"
key_length = 2048
}
}
}
After
resource "google_dns_managed_zone" "example" {
name = "example-zone"
dns_name = "example.com."
dnssec_config {
state = "off"
default_key_specs {
algorithm = "rsasha256"
key_type = "keySigning"
key_length = 2048
}
default_key_specs {
algorithm = "rsasha256"
key_type = "zoneSigning"
key_length = 2048
}
}
}