Skip to content

Commit f64401c

Browse files
committed
Add log about account
And cert chain
1 parent 6cb1f82 commit f64401c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

acmeissuer.go

+8-1
Original file line numberDiff line numberDiff line change
@@ -452,13 +452,18 @@ func (am *ACMEIssuer) doIssue(ctx context.Context, csr *x509.CertificateRequest,
452452
// do this in a loop because there's an error case that may necessitate a retry, but not more than once
453453
var certChains []acme.Certificate
454454
for i := 0; i < 2; i++ {
455+
am.Logger.Info("using ACME account",
456+
zap.String("account_id", params.Account.Location),
457+
zap.Strings("account_contact", params.Account.Contact))
458+
455459
certChains, err = client.acmeClient.ObtainCertificate(ctx, params)
456460
if err != nil {
457461
var prob acme.Problem
458462
if errors.As(err, &prob) && prob.Type == acme.ProblemTypeAccountDoesNotExist {
459463
am.Logger.Warn("ACME account does not exist on server; attempting to recreate",
464+
zap.String("account_id", client.account.Location),
460465
zap.Strings("account_contact", client.account.Contact),
461-
zap.String("account_location", client.account.Location),
466+
zap.String("key_location", am.storageKeyUserPrivateKey(client.acmeClient.Directory, am.getEmail())),
462467
zap.Object("problem", prob))
463468

464469
// the account we have no longer exists on the CA, so we need to create a new one;
@@ -492,6 +497,8 @@ func (am *ACMEIssuer) doIssue(ctx context.Context, csr *x509.CertificateRequest,
492497
Metadata: preferredChain,
493498
}
494499

500+
am.Logger.Debug("selected certificate chain", zap.String("url", preferredChain.URL))
501+
495502
return ic, usingTestCA, nil
496503
}
497504

0 commit comments

Comments
 (0)