Skip to content

proposal: x/crypto/acme: Add External Account Binding Support #41430

@jdkasten

Description

@jdkasten

RFC 8555's External Account Binding is not currently supported by x/crypto/acme while there are multiple certificate authorities that require the feature. (Sectigo, zerossl, etc)

External Account Binding (EAB) occurs in ACME's "new-account" RPC. Within acme.go this is handled by Register()

The public API for this method would not have to change. Notably, the call takes in an Account struct which is a non-wire compatible version of an ACME Account object. Since the normal wire protocol account object contains the EAB, a simple extension of the Account struct seems appropriate. This new field would contain an "EAB struct" that would be easily configurable by end users. The EAB struct can be similarly serialized into an ACME EAB JWS within the existing Register method.

As far as requirements go, the RFC states that

  1. EAB key needs to be a MAC key
  2. The key identifier (kid) be ASCII.
  3. CA's SHOULD provide the key in base64url-encoded format for compatibility.

I have seen many client implementations assume HMAC SHA256 is used, though this is not guaranteed by the protocol. [1, 2]

The External account binding struct would need to look something like

// ExternalAccountBinding contains the data needed to form a request with
// an external account binding.
// See https://tools.ietf.org/html/rfc8555#section-7.3.4 for more details.
type ExternalAccountBinding struct {
	// KID is the Key ID of the symmetric MAC key that the CA uses to
	// identify an external account from ACME.
	KID string

	// Key is the bytes of a symmetric key that the CA uses to identify
	// the account. The KID should reference the same key that the CA holds.
	Key []byte

	// KeyAlgorithm of the JWS. Only the HMAC algorithms are supported
        // https://tools.ietf.org/html/rfc7518#section-3.1
	KeyAlgorithm string
}

Adapted from @munnerz's existing PR for this functionality.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions