Skip to content

Commit

Permalink
Log issuer certificate expiry
Browse files Browse the repository at this point in the history
When a new issuer certificate is loaded, log its NotAfter time
in unix epoch format, along with the current process wall clock time.

This addresses #11215

Signed-off-by: Nathan J. Mehl <[email protected]>
  • Loading branch information
n-oden committed Jan 30, 2025
1 parent b707b9e commit f672b03
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/identity/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ func (svc *Service) loadCredentials() (tls.Issuer, error) {
}

log.Debugf("Loaded issuer cert: %s", creds.EncodeCertificatePEM())
log.WithFields(log.Fields{
"invalid_after": creds.Certificate.NotAfter.Unix(),
"process_clock_time": time.Now().Unix(),
}).Info("Issuer cert loaded")
return tls.NewCA(*creds, *svc.validity), nil
}

Expand Down

0 comments on commit f672b03

Please sign in to comment.