DNSSEC02 (dnssec02)

Status: Final

Purpose

  • Verify that DS records found at the parent delegation match usable DNSKEYs in the child zone and that matching DNSKEYs can validate DNSKEY RRset signatures.

Preconditions And Inputs

  • Preconditions:
    • A zone.Zone object is available.
  • Required inputs:
    • Parent nameserver names/IPs from methodsv2.GetParentNSNamesAndIPs.
    • Child nameserver sets from methods.Method4 and methods.Method5.
    • Parent DS responses and child DNSKEY/RRSIG responses.
  • Profile/config knobs that affect behavior:
    • net.ipv4 and net.ipv6: disabled transports are skipped with transport debug tags.
    • resolver.defaults.parallel: parallel parent and child query execution fanout.

Algorithm And Decision Flow

  1. Emit TEST_CASE_START.
  2. Collect DS records from parent nameservers:
    • Query each unique parent nameserver IP in parallel.
    • If transport is disabled, emit IPV4_DISABLED or IPV6_DISABLED for rrtype DS and skip.
    • Accept response only if DNSSEC response shape passes (NOERROR, OPT, DO, AA) and at least one DS record matches child zone owner name.
    • Add unique DS RDATA values to DS record set.
  3. If DS record set is empty, emit TEST_CASE_END and stop.
  4. Build child nameserver set from Method4+Method5 and deduplicate by IP.
  5. For each unique child nameserver IP (parallelized):
    • If transport is disabled, emit IPV4_DISABLED or IPV6_DISABLED for rrtype DNSKEY and skip.
    • Query DNSKEY with DNSSEC enabled.
    • Require NOERROR, OPT, DO, AA, and at least one DNSKEY at child apex; otherwise skip.
    • Mark nameserver as responding.
    • For each DS record:
      • Find DNSKEY candidates by keytag and select a matching candidate (digest-checked when digest type is supported).
      • If no DNSKEY by keytag exists, add keytag/ns to DS02_NO_DNSKEY_FOR_DS.
      • If DNSKEY exists but DS digest check fails, add keytag/ns to DS02_NO_MATCH_DS_DNSKEY.
      • If DNSKEY has no ZONE flag, add keytag/ns to DS02_DNSKEY_NOT_FOR_ZONE_SIGNING and stop processing that DS.
      • If DNSKEY has no SEP flag, add keytag/ns to DS02_DNSKEY_NOT_SEP.
      • Track DNSKEY as DS-matching candidate for signature checks.
    • For each DS-matching DNSKEY:
      • Find DNSKEY-covering RRSIG by keytag and verify against DNSKEY.
      • Missing/invalid match contributes DS02_NO_MATCHING_DNSKEY_RRSIG.
      • Unsupported verification algorithm contributes DS02_ALGO_NOT_SUPPORTED_BY_ZM.
      • Signature verification failure contributes DS02_RRSIG_NOT_VALID_BY_DNSKEY.
      • Successful verification marks nameserver as having an RRSIG match for DS.
  6. Emit accumulated per-keytag findings (DS02_*) with merged addresses.
  7. Emit per-nameserver summary:
    • DS02_NO_VALID_DNSKEY_FOR_ANY_DS for responding nameservers with no DS-matching DNSKEY.
    • Else DS02_DNSKEY_NOT_SIGNED_BY_ANY_DS for responding nameservers with DS-matching DNSKEY but no validating RRSIG from those keys.
  8. Collect IPs where DS→DNSKEY match and RRSIG validation passed; if non-empty emit DS02_MATCH_DS_DNSKEY.
  9. Emit TEST_CASE_END.

Emitted Tags (Possible Set)

TagEmitted when
DS02_ALGO_NOT_SUPPORTED_BY_ZMDNSKEY RRSIG verification requires an unsupported algorithm for this build/runtime.
DS02_MATCH_DS_DNSKEYAt least one child nameserver has a DS-matching DNSKEY with a valid DNSKEY RRSIG.
DS02_DNSKEY_NOT_FOR_ZONE_SIGNINGDS-matching DNSKEY is found but lacks ZONE flag.
DS02_DNSKEY_NOT_SEPDS-matching DNSKEY is found but lacks SEP flag.
DS02_DNSKEY_NOT_SIGNED_BY_ANY_DSNameserver has DS-matching DNSKEY(s), but no validating DNSKEY RRSIG from those keys.
DS02_NO_DNSKEY_FOR_DSNo DNSKEY with matching keytag exists for DS record.
DS02_NO_MATCHING_DNSKEY_RRSIGNo valid DNSKEY-covering RRSIG could be matched to a DS-matching DNSKEY.
DS02_NO_MATCH_DS_DNSKEYDNSKEY keytag match exists but DS digest/algorithm does not match DNSKEY data.
DS02_NO_VALID_DNSKEY_FOR_ANY_DSResponding child nameserver has no valid DS-matching DNSKEY for any DS.
DS02_RRSIG_NOT_VALID_BY_DNSKEYCandidate DNSKEY RRSIG was present but failed verification with matching DNSKEY.
IPV4_DISABLEDIPv4 transport is disabled for a queried nameserver (DS or DNSKEY).
IPV6_DISABLEDIPv6 transport is disabled for a queried nameserver (DS or DNSKEY).
TEST_CASE_ENDTestcase completion marker is emitted.
TEST_CASE_STARTTestcase start marker is emitted.

Tag Arguments

TagArgument keyTypeMeaning
DS02_ALGO_NOT_SUPPORTED_BY_ZMkeytagintDNSKEY keytag associated with unsupported signature algorithm.
DS02_ALGO_NOT_SUPPORTED_BY_ZMalgo_numintDNSSEC algorithm number that verification cannot process.
DS02_ALGO_NOT_SUPPORTED_BY_ZMalgo_mnemostringDNSSEC algorithm mnemonic string.
DS02_ALGO_NOT_SUPPORTED_BY_ZMaddressesarray<string>Structured child nameserver IP list.
DS02_DNSKEY_NOT_FOR_ZONE_SIGNINGkeytagintDS/DNSKEY keytag lacking ZONE bit.
DS02_DNSKEY_NOT_FOR_ZONE_SIGNINGaddressesarray<string>Structured child nameserver IP list.
DS02_DNSKEY_NOT_SEPkeytagintDS/DNSKEY keytag lacking SEP bit.
DS02_DNSKEY_NOT_SEPaddressesarray<string>Structured child nameserver IP list.
DS02_DNSKEY_NOT_SIGNED_BY_ANY_DSaddressesarray<string>Structured child nameserver IP list.
DS02_MATCH_DS_DNSKEYaddressesarray<string>Structured child nameserver IP list with DS-matching DNSKEY and valid RRSIG.
DS02_NO_DNSKEY_FOR_DSkeytagintDS keytag for which no DNSKEY was found.
DS02_NO_DNSKEY_FOR_DSaddressesarray<string>Structured child nameserver IP list.
DS02_NO_MATCHING_DNSKEY_RRSIGkeytagintDS-matching DNSKEY keytag lacking a validating DNSKEY RRSIG.
DS02_NO_MATCHING_DNSKEY_RRSIGaddressesarray<string>Structured child nameserver IP list.
DS02_NO_MATCH_DS_DNSKEYkeytagintDS keytag whose DS digest/algorithm did not match DNSKEY data.
DS02_NO_MATCH_DS_DNSKEYaddressesarray<string>Structured child nameserver IP list.
DS02_NO_VALID_DNSKEY_FOR_ANY_DSaddressesarray<string>Structured child nameserver IP list.
DS02_RRSIG_NOT_VALID_BY_DNSKEYkeytagintKeytag from DNSKEY RRSIG verification failure.
DS02_RRSIG_NOT_VALID_BY_DNSKEYaddressesarray<string>Structured child nameserver IP list.
IPV4_DISABLEDnsstringNameserver identity (ns name only; use address for IP) skipped on IPv4.
IPV4_DISABLEDaddressstringNameserver IP address for the same endpoint.
IPV4_DISABLEDrrtypestringrrtype skipped (DS or DNSKEY).
IPV6_DISABLEDnsstringNameserver identity (ns name only; use address for IP) skipped on IPv6.
IPV6_DISABLEDaddressstringNameserver IP address for the same endpoint.
IPV6_DISABLEDrrtypestringrrtype skipped (DS or DNSKEY).
TEST_CASE_ENDtestcasestringTestcase display name (DNSSEC02).
TEST_CASE_STARTtestcasestringTestcase display name (DNSSEC02).

Severity Levels Per Tag

TagLevelNotes
DS02_ALGO_NOT_SUPPORTED_BY_ZMNOTICEDefault from share/profile.json (test_levels.DNSSEC).
DS02_DNSKEY_NOT_FOR_ZONE_SIGNINGERRORDefault from share/profile.json (test_levels.DNSSEC).
DS02_DNSKEY_NOT_SEPNOTICEDefault from share/profile.json (test_levels.DNSSEC).
DS02_DNSKEY_NOT_SIGNED_BY_ANY_DSERRORDefault from share/profile.json (test_levels.DNSSEC).
DS02_MATCH_DS_DNSKEYINFODefault from share/profile.json (test_levels.DNSSEC).
DS02_NO_DNSKEY_FOR_DSWARNINGDefault from share/profile.json (test_levels.DNSSEC).
DS02_NO_MATCHING_DNSKEY_RRSIGWARNINGDefault from share/profile.json (test_levels.DNSSEC).
DS02_NO_MATCH_DS_DNSKEYERRORDefault from share/profile.json (test_levels.DNSSEC).
DS02_NO_VALID_DNSKEY_FOR_ANY_DSERRORDefault from share/profile.json (test_levels.DNSSEC).
DS02_RRSIG_NOT_VALID_BY_DNSKEYERRORDefault from share/profile.json (test_levels.DNSSEC).
IPV4_DISABLEDDEBUGDefault from share/profile.json (test_levels.DNSSEC).
IPV6_DISABLEDDEBUGDefault from share/profile.json (test_levels.DNSSEC).
TEST_CASE_ENDDEBUGDefault from share/profile.json (test_levels.DNSSEC).
TEST_CASE_STARTDEBUGDefault from share/profile.json (test_levels.DNSSEC).

Differences From Upstream

  • Upstream reference: dnssec02.md
  • Differences (Upstream vs Gonemaster):
    • Upstream: explicitly describes a dedicated undelegated DS input branch in testcase flow. Gonemaster: DNSSEC02 implementation uses parent DS discovery path directly and has no separate testcase-local undelegated DS branch.
    • Upstream: does not explicitly specify testcase boundary and per-query transport debug emissions in this testcase summary. Gonemaster: emits TEST_CASE_START, TEST_CASE_END, IPV4_DISABLED, and IPV6_DISABLED.
  • Potential upstream report:
    • no

Edge Cases And Limitations

  • If parent DS discovery yields no DS records, testcase stops after boundary tags and emits no DS02 findings.
  • Child nameservers are deduplicated by IP before DNSKEY checks, so repeated names on one IP collapse into one probe context.
  • DS02_NO_VALID_DNSKEY_FOR_ANY_DS and DS02_DNSKEY_NOT_SIGNED_BY_ANY_DS are mutually exclusive by implementation (else if branch).