Skip to content

Update dns-persist-01 impl to draft-ietf-acme-dns-persist-04 - #566

Open
orangepizza wants to merge 9 commits into
letsencrypt:mainfrom
orangepizza:persist-draft-02
Open

orangepizza wants to merge 9 commits into
letsencrypt:mainfrom
orangepizza:persist-draft-02

Conversation

@orangepizza

Copy link
Copy Markdown
Contributor

use calculate account hash format, as defined in draft-ietf-acme-dns-persist-02, instead of using accounturi as is.
while this draft requires CA to keep old key for validate old accountURI made with old key, but didn't implemented here.
Personally I think that's not something client should test for

this draft's txt record is constructed as
"; accounturi= //base64url(Hash(length_of_domain || domain_name || key || account_URL))"

use calculate account hash format, as defined in draft-ietf-acme-dns-persist-02 , instead of using accounturi as is.

@inahga inahga left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for putting this together!

Comment thread va/va_test.go Resolved
Comment thread cmd/pebble/main.go Resolved
Comment thread va/va.go Resolved
Comment thread va/va.go Resolved
Comment thread va/va.go Resolved
Comment thread va/va.go Resolved
Comment thread va/va.go Resolved
Comment thread va/va_test.go Resolved
Comment thread va/va.go Resolved
@inahga

inahga commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

I spent a little bit of time with Posh-ACME since it has draft-02 support, and looks like your changeset mostly works (or, at least, interops with posh-acme 😄)

However we are missing this change https://www.ietf.org/archive/id/draft-ietf-acme-dns-persist-02.html#appendix-B.1-1.12.1

Renamed the challenge object's plural field from issuer-domain-names to issuerDomainNames to align with ACME's camelCase convention ([RFC8555]); the singular DNS issuer-domain-name parameter and persistUntil are unchanged (#56).

That should be a one line change in struct common.Challenge.

draft-02 changed it's name to camelCase, singular is still issuer-domain-name is that draft
inahga
inahga previously approved these changes Nov 5, 2026
@orangepizza
orangepizza force-pushed the persist-draft-02 branch 2 times, most recently from 5c9182d to 03fe645 Compare November 20, 2026 00:55
mostly adding support for client asking ancestorDomain to validate subdomain by record at parent domain
@orangepizza
orangepizza force-pushed the persist-draft-02 branch 2 times, most recently from d63e90e to 0a2b9a4 Compare November 24, 2026 07:29
spec 6.2 require challenge itself kept pending state in those case,  so it need to happen in wfe.
VA kept its own check because one shouldn't defer validation of target domain relation to ident to outside.
@sheurich

sheurich commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

draft-ietf-acme-dns-persist-04 is posted:
https://datatracker.ietf.org/doc/draft-ietf-acme-dns-persist/04/

Diff from -03:
https://author-tools.ietf.org/iddiff?url2=draft-ietf-acme-dns-persist-04

Wire changes from -03: accountdigest=<hash-alg>/<base64url-digest> (no accountHashPrefix), records containing accounturi rejected as malformed, persistExpired removed in favor of incorrectResponse (optional gated expiration detail), and prior-key retention optional (MAY).

@orangepizza orangepizza changed the title Update dns-persist-01 impl to draft-ietf-acme-dns-persist-02 Update dns-persist-01 impl to draft-ietf-acme-dns-persist-04 Dec 2, 2026
@orangepizza

Copy link
Copy Markdown
Contributor Author

update for draft-ietf-acme-dns-persist-04.

refactored test codes to actuall error type, not http code, when test error types.
Comment thread va/va.go Outdated
}

key := []byte(base64.RawURLEncoding.EncodeToString(thumbprint))
accountidentsurffix := append(key, []byte(task.AccountURL)...)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

accountidentsurffix likely typo

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed it, thanks

Comment thread va/va_test.go Outdated
expectDetailSubstr: "not subdomain of",
},
{
name: "wlidcard policy required using ancesterdomain even if auth itself isn't wildcard",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wildcard

Comment thread wfe/wfe.go Outdated
}

// make a struct that all things we understand in challenge response
// in struct mode parser will reject unknown extensions.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

strict mode

Comment thread va/va.go Outdated
persistUntil *time.Time
}

type dnsPersistHashedAccountURI struct {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd avoid "AccountURI" and go with something along the lines of "AccountDigest"

Comment thread va/va.go Resolved
Comment thread va/va_test.go Resolved
abd-ulbasit added a commit to abd-ulbasit/cert-manager that referenced this pull request Dec 3, 2026
Draft -04 replaced the TXT accounturi parameter with
accountdigest=<hash-alg>/<base64url-digest> and removed the
accountHashPrefix directory field. A CA now rejects any record that
contains accounturi, so migration uses separate records at the same
name. Prior-key retention and acceptance became CA policy, and the
persistExpired error was removed in favour of incorrectResponse.

Update the record format, the account digest, the directory fields,
the self-check rules and reasons, the test vectors and the function
names (HashedAccountURI becomes AccountDigest). The fork change is now
two parsed fields and the account check.

Replace the pending -04 section with what changed from -03. Supported
Versions now says that -02 and -03 servers do not accept -04 records,
which today rules out Boulder and the current e2e Pebble fork. The E2E
plan targets letsencrypt/pebble#566, which moved to -04 on 2026-12-02.

Signed-off-by: abd-ulbasit <basit@basit.engineer>
go 1.25 is EOL and eggsampler test is failing because it wants at least 1.26
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.

4 participants