Skip to content

va: normalize the dns-persist-01 issuer-domain-name before comparing - #578

Open
arpitjain099 wants to merge 1 commit into
letsencrypt:mainfrom
arpitjain099:fix/dns-persist-issuer-domain-name-normalize
Open

arpitjain099 wants to merge 1 commit into
letsencrypt:mainfrom
arpitjain099:fix/dns-persist-issuer-domain-name-normalize

Conversation

@arpitjain099

Copy link
Copy Markdown

Boulder normalizes the issuer-domain-name out of the TXT record before comparing, in va/dns_persist.go via core.NormalizeIssuerDomainName. Pebble compares trimWSP(parts[0]) byte for byte against the challenge's issuer-domain-names, so a record reading AUTHORITY.Example or authority.example. is skipped and the challenge fails with "No valid TXT record found". Section 9.2 of draft-ietf-acme-dns-persist-01 recommends case folding and trailing dot removal.

This does steps 1 and 4 of that algorithm. NFC and Punycode are no-ops for the ASCII names Pebble is configured with, and adding them would pull in golang.org/x/net/idna; if you would rather have the whole algorithm, please say so and I will add it.

It fails closed, so this is an interoperability bug rather than a security one. Two cases in TestValidateDNSPersist01 cover it, and both fail without the change.

I used Claude Code while working on this.

splitIssuerDomainName returned the raw trimWSP(parts[0]), so
validateDNSPersist01 compared a TXT record's issuer-domain-name against
the challenge's issuer-domain-names byte for byte. A record reading
AUTHORITY.Example or authority.example. was skipped and validation
failed with "No valid TXT record found".

Section 9.2 of draft-ietf-acme-dns-persist-01 recommends case folding
and trailing dot removal, and Boulder already does this in
va/dns_persist.go via core.NormalizeIssuerDomainName.

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant