Skip to content

Commit 803ea27

Browse files
committed
Emit log when account is missing from ACME server
1 parent 5f87aea commit 803ea27

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

acmeissuer.go

+5
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,11 @@ func (am *ACMEIssuer) doIssue(ctx context.Context, csr *x509.CertificateRequest,
400400
if err != nil {
401401
var prob acme.Problem
402402
if errors.As(err, &prob) && prob.Type == acme.ProblemTypeAccountDoesNotExist {
403+
am.Logger.Warn("ACME account does not exist on server; attempting to recreate",
404+
zap.Strings("account_contact", client.account.Contact),
405+
zap.String("account_location", client.account.Location),
406+
zap.Object("problem", prob))
407+
403408
// the account we have no longer exists on the CA, so we need to create a new one;
404409
// we could use the same key pair, but this is a good opportunity to rotate keys
405410
// (see https://caddy.community/t/acme-account-is-not-regenerated-when-acme-server-gets-reinstalled/22627)

0 commit comments

Comments
 (0)