mirror of
https://github.com/hashicorp/vault.git
synced 2026-02-18 18:38:08 -05:00
* Change PkiCertificateCountManager.GetCounts() to return a CertCount. * Add PkiDurationAdjustedCerts field to CertCount. Add a new field to CertCount to keep track of "duration adjusted" issued certificates. Add an x509.Certificate argument to CertCountIncrementer.AddIssuedCertificate. In the implementation, use the certificate's NotBefore and NotAfter fields to calculate the validity duration for the certificate, and use that to compute the duration adjusted units. * Add the issued certificate to calls to AddIssuedCertificate. * Add PkiDurationAdjustedCerts when forwarding counts. Add pki_duration_adjusted_certificate_count to IncrementPkiCount proto. Update replicationServiceHandler.IncrementPkiCertCountRequest to take into account the new field. * Run make proto. * Update testingPkiCertificateCounter to make assertions on time adjusted counts. * PR review: Don't use NotAfter.Sub(NotBefore), since time.Duration is max 290 years. * PR review: Move DurationAdjustedCertificateCount to logical.pki/test_helpers. Add Bob generated unit tests for logical.durationAdjustedCertificateCount. * Run make fmt. Co-authored-by: Victor Rodriguez Rizo <vrizo@hashicorp.com> |
||
|---|---|---|
| .. | ||
| credential | ||
| logical | ||
| plugin | ||