Skip to content

Commit b1e1ca4

Browse files
authored
Add accounturi to dns-persist-01 challenges (#544)
1 parent b716cd3 commit b1e1ca4

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

acme/common.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ type Challenge struct {
8686
URL string `json:"url"`
8787
Token string `json:"token,omitempty"`
8888
Status string `json:"status"`
89+
AccountURI string `json:"accounturi,omitempty"`
8990
IssuerDomainNames []string `json:"issuer-domain-names,omitempty"`
9091
Validated string `json:"validated,omitempty"`
9192
Error *ProblemDetails `json:"error,omitempty"`

wfe/wfe.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1625,6 +1625,10 @@ func (wfe *WebFrontEndImpl) makeChallenge(
16251625
}
16261626
if chalType == acme.ChallengeDNSPersist01 {
16271627
chal.IssuerDomainNames = append([]string(nil), wfe.caaIdentities...)
1628+
// Note: By using web.relativeEndpoint here, Pebble will reflect the Host header
1629+
// into the accountURI here. This would not be acceptable in a security-conscious
1630+
// context, but is okay for Pebble.
1631+
chal.AccountURI = wfe.relativeEndpoint(request, fmt.Sprintf("%s%s", acctPath, authz.Order.AccountID))
16281632
}
16291633

16301634
// Add it to the in-memory database

0 commit comments

Comments
 (0)