diff --git a/acme/common.go b/acme/common.go index 64aa9814..a0bc5d27 100644 --- a/acme/common.go +++ b/acme/common.go @@ -86,6 +86,7 @@ type Challenge struct { URL string `json:"url"` Token string `json:"token,omitempty"` Status string `json:"status"` + AccountURI string `json:"accounturi,omitempty"` IssuerDomainNames []string `json:"issuer-domain-names,omitempty"` Validated string `json:"validated,omitempty"` Error *ProblemDetails `json:"error,omitempty"` diff --git a/wfe/wfe.go b/wfe/wfe.go index 54f65e19..3e4973fb 100644 --- a/wfe/wfe.go +++ b/wfe/wfe.go @@ -1625,6 +1625,10 @@ func (wfe *WebFrontEndImpl) makeChallenge( } if chalType == acme.ChallengeDNSPersist01 { chal.IssuerDomainNames = append([]string(nil), wfe.caaIdentities...) + // Note: By using web.relativeEndpoint here, Pebble will reflect the Host header + // into the accountURI here. This would not be acceptable in a security-conscious + // context, but is okay for Pebble. + chal.AccountURI = wfe.relativeEndpoint(request, fmt.Sprintf("%s%s", acctPath, authz.Order.AccountID)) } // Add it to the in-memory database