Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: support CRLs with multiple issuers #26

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

wbollock
Copy link
Collaborator

@wbollock wbollock commented Oct 17, 2024

Resolves: #19

It is common practice to have multiple issuers and therefore CRLs in a
single Vault PKI secrets engine. Previously we'd only have metrics for
the default issuer in a PKI secrets engine. This refactors metrics
gathering to support CRL related metrics for all issuers in a secrets
engine.

This is marked as a breaking change due to the addition of an issuer
label to metrics like x509_crl_length but in most cases adding a new
label to existing metrics won't break alerting or recording rules
compared to removing a label. Regardless proper notice is given.

Old metric example:

x509_crl_nextupdate{source="pki/"} 1.730633058e+09

New metric example:

x509_crl_nextupdate{issuer="my-website.com",source="pki/"} 1.730633058e+09
x509_crl_nextupdate{issuer="mysecondwebsite.com",source="pki/"} 1.730633058e+09

Also adds contributing instructions and upgrades us from deprecated pkix.CertificateList to x509.RevocationList

Resolves: aarnaud#19

It is common practice to have multiple issuers and therefore CRLs in a
single Vault PKI secrets engine. Previously we'd only have metrics for
the default issuer in a PKI secrets engine. This refactors metrics
gathering to support CRL related metrics for all issuers in a secrets
engine.

This is marked as a breaking change due to the *addition* of an `issuer`
label to metrics like `x509_crl_length` but in most cases adding a new
label to existing metrics won't break alerting or recording rules
compared to removing a label. Regardless proper notice is given.

Old metric example:

```
x509_crl_nextupdate{source="pki/"} 1.730633058e+09
```

New metric example:

```
x509_crl_nextupdate{issuer="CN=my-website.com",source="pki/"} 1.730633058e+09
x509_crl_nextupdate{issuer="CN=mysecondwebsite.com",source="pki/"} 1.730633058e+09
```
pkix.CertificateList is deprecated, switches to x509.RevocationList
instead. Minimal methods need to change
Resolves: aarnaud#19

It is common practice to have multiple issuers and therefore CRLs in a
single Vault PKI secrets engine. Previously we'd only have metrics for
the default issuer in a PKI secrets engine. This refactors metrics
gathering to support CRL related metrics for all issuers in a secrets
engine.

This is marked as a breaking change due to the *addition* of an `issuer`
label to metrics like `x509_crl_length` but in most cases adding a new
label to existing metrics won't break alerting or recording rules
compared to removing a label. Regardless proper notice is given.

Old metric example:

```
x509_crl_nextupdate{source="pki/"} 1.730633058e+09
```

New metric example:

```
x509_crl_nextupdate{issuer="CN=my-website.com",source="pki/"} 1.730633058e+09
x509_crl_nextupdate{issuer="CN=mysecondwebsite.com",source="pki/"} 1.730633058e+09
```
pkix.CertificateList is deprecated, switches to x509.RevocationList
instead. Minimal methods need to change
@aarnaud
Copy link
Owner

aarnaud commented Oct 17, 2024

Thanks for this PR, I will try to review it quickly

@wbollock wbollock requested a review from aarnaud October 18, 2024 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Only fetching CRL for the default issuer
2 participants