Description
Do not choose SHA-1-based rsasha1 for new public-zone signatures. DNSSEC verifies the origin and integrity of DNS data without encrypting the response.
Potential impact
If the signing key and the parent DS record disagree, validating resolvers may stop resolving legitimate names.
Remediation
While DNSSEC is off, set a supported algorithm for both key types in default_key_specs. For an already signed zone, remove the parent’s old DS and wait for its TTL to expire before stopping signing. Change the key settings, sign again, register the new matching DS and check the result through a validating resolver.
Examples
Set the actual zone name, domain and project. Replace /tmp/auth.pem with the path to a service account JSON file.
Before
- name: create a managed zone
google.cloud.gcp_dns_managed_zone:
name: test-zone
dns_name: test.somewild2.example.com.
description: test zone
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
dnssec_config:
default_key_specs:
- algorithm: rsasha1
key_type: keySigning
key_length: 2048
- algorithm: rsasha1
key_type: zoneSigning
key_length: 2048
state: "off"
Both tasks specify dnssec_config.state: "off". The outer state: present manages the zone and does not turn signing on.
After
- name: create a managed zone
google.cloud.gcp_dns_managed_zone:
name: test-zone
dns_name: test.somewild2.example.com.
description: test zone
project: test_project
auth_kind: serviceaccount
service_account_file: /tmp/auth.pem
state: present
dnssec_config:
default_key_specs:
- algorithm: rsasha256
key_type: keySigning
key_length: 2048
- algorithm: rsasha256
key_type: zoneSigning
key_length: 2048
state: "off"
The second task selects rsasha256 for both keySigning and zoneSigning.