letsencrypt / boulder

An ACME-based certificate authority, written in Go.
Mozilla Public License 2.0
5.16k stars 602 forks source link

Proposal to Implement ACME "dns-account-01" Challenge in Boulder #7240

Open sheurich opened 8 months ago

sheurich commented 8 months ago

Description:

I propose integrating the "dns-account-01" challenge into Boulder. This challenge introduces a novel method for domain control validation within the ACME protocol.

Background:

The "dns-account-01" challenge, in its current Internet Draft form, introduces an additional approach for domain control validation. It uses a DNS resource linked to the ACME Account ID, offering enhanced flexibility and security in domain validation processes.

Proposal:

Rationale:

Request for Comments:

I invite the Boulder community to discuss this proposal. Your feedback on the implementation, potential challenges, and the overall impact on Boulder's functionality is highly appreciated. I look forward to collaborating on this feature.

aaomidi commented 8 months ago

I'm one of the authors of that draft, I'll also commit to helping with this implementation if need be!

Thank you so much for this, @sheurich

aarongable commented 8 months ago

We'd be happy to accept contributions implementing DNS-ACCOUNT-01!

A few notes:

sheurich commented 8 months ago

Great, thanks! I created https://github.com/letsencrypt/pebble/issues/425 for the Pebble work.

sheurich commented 6 months ago

In contrast to the Pebble implementation, the Boulder work has the additional complication of component separation. The method used in Pebble's wfe.updateChallenge:

        // Reconstruct account URL for use in scoped validation methods
        acctURL := wfe.relativeEndpoint(request, fmt.Sprintf("%s%s", acctPath, existingAcct.ID))

        // Submit a validation job to the VA, this will be processed asynchronously
        wfe.va.ValidateChallenge(ident, existingChal, existingAcct, acctURL, wildcard)

could be implemented in Boulder but this requires a change in the RA/VA gRPC definition for PerformValidationRequest (e.g. an additional member of AuthzMeta).

One alternative could be statically defining account URL prefixes in configuration cf. https://github.com/orangepizza/boulder/blob/703182fae06ccf8e876a9c6bdc71b5e4186d630d/va/dns.go#L132-L133.

The protobuf change would be small and additive, while the configuration approach is a more localized change. How does this comparison align with the overall strategy in Boulder development?

aarongable commented 6 months ago

The Boulder VA is already configured with a set of accountURIPrefixes. The IsCaaValid gRPC method combines those prefixes with an accountURIID to check that CAA "accountURI" parameters are correct.

The AuthzMeta protobuf already contains the account's regID, which can be used in exactly the same way. Combining that regID with the accountURIPrefixes should give the full account URI, which can then be fingerprinted per the IETF draft.

edit: gah sorry, I now see that you already proposed this configuration-based approach in your comment above. Yes, I think that is the correct path forward :)