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 #6

Closed
wants to merge 24 commits into from

Conversation

wbollock
Copy link
Collaborator

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

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

dependabot bot and others added 24 commits December 18, 2023 23:44
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.14.0 to 0.17.0.
- [Commits](golang/crypto@v0.14.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
…ng.org/x/crypto-0.17.0

chore(deps): bump golang.org/x/crypto from 0.14.0 to 0.17.0
…ault

avoid segfault when refreshing PKI certs
Bumps [github.com/go-jose/go-jose/v3](https://github.com/go-jose/go-jose) from 3.0.1 to 3.0.3.
- [Release notes](https://github.com/go-jose/go-jose/releases)
- [Changelog](https://github.com/go-jose/go-jose/blob/v3.0.3/CHANGELOG.md)
- [Commits](go-jose/go-jose@v3.0.1...v3.0.3)

---
updated-dependencies:
- dependency-name: github.com/go-jose/go-jose/v3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
…ub.com/go-jose/go-jose/v3-3.0.3

chore(deps): bump github.com/go-jose/go-jose/v3 from 3.0.1 to 3.0.3
Bumps google.golang.org/protobuf from 1.31.0 to 1.33.0.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
…le.golang.org/protobuf-1.33.0

chore(deps): bump google.golang.org/protobuf from 1.31.0 to 1.33.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.17.0 to 0.23.0.
- [Commits](golang/net@v0.17.0...v0.23.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
…ng.org/x/net-0.23.0

chore(deps): bump golang.org/x/net from 0.17.0 to 0.23.0
Bumps [github.com/hashicorp/go-retryablehttp](https://github.com/hashicorp/go-retryablehttp) from 0.7.4 to 0.7.7.
- [Changelog](https://github.com/hashicorp/go-retryablehttp/blob/main/CHANGELOG.md)
- [Commits](hashicorp/go-retryablehttp@v0.7.4...v0.7.7)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/go-retryablehttp
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
…ub.com/hashicorp/go-retryablehttp-0.7.7

chore(deps): bump github.com/hashicorp/go-retryablehttp from 0.7.4 to 0.7.7
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
@wbollock
Copy link
Collaborator Author

whoops meant to open here aarnaud#26

@wbollock wbollock closed this Oct 17, 2024
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