Repository navigation
Description
Is there an existing issue already for this feature request/idea?
- I have searched for an existing issue, and could not find anything. I believe this is a new feature request to be evaluated.
What problem is this feature going to solve? Why should it be added?
#10809 added operator-managed TLS client certificates for declarative roles via the clientCertificate.enabled field on DatabaseRole. The lifetime and renewal window of those certificates are currently taken unconditionally from the operator's global settings (CERTIFICATE_DURATION, default 90 days, and EXPIRING_CHECK_THRESHOLD, default 7 days), the same values used for the operator's own internal PKI.
There is no way to give a role's client certificate a different lifetime or renewal window from the cluster-wide default. This matters for cert-auth roles in particular: a role used by a short-lived automation job may want a much shorter-lived certificate than a long-running application role, and some environments have compliance requirements around client credential lifetime that don't necessarily match the operator's internal certificate policy.
Describe the solution you'd like
Extend the clientCertificate stanza on DatabaseRole with two optional fields, mirroring the duration / renewBefore convention already familiar from cert-manager:
clientCertificate:
enabled: true
duration: 2160h # 90 days, defaults to the operator's CertificateDuration setting
renewBefore: 168h # 7 days, defaults to the operator's ExpiringCheckThreshold settingclientCertificate.duration: overrides the certificate lifetime for this role only. Falls back to the operator-wideCertificateDurationwhen unset.clientCertificate.renewBefore: overrides how long before expiry the operator renews the certificate for this role. Falls back to the operator-wideExpiringCheckThresholdwhen unset. Should be validated as strictly less thandurationat the webhook.- Reflect the effective duration in
status.clientCertificate(already exposesexpiration) so users can confirm the override took effect without decoding the certificate.
Describe alternatives you've considered
- Leave duration/renewal tied to the operator-wide settings (forces all cert-auth roles across all clusters onto one policy, which doesn't fit mixed workloads).
- A separate
CertificateTemplate-style CRD referenced byclientCertificate: more flexible but disproportionate for two scalar fields; can be revisited if more knobs (key algorithm, usages) are requested later.
Additional context
Follows #10809
Backport?
No
Are you willing to actively contribute to this feature?
Yes
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
- StatusShow more project fieldsDone
Activity
feat: per-role client certificate duration and renewal window
feat: per-role client certificate duration and renewal window
feat: per-role client certificate duration and renewal window
feat: per-role client certificate duration and renewal window
feat: per-role client certificate duration and renewal window
feat: per-role client certificate duration and renewal window
feat: per-role client certificate duration and renewal window
feat: per-role client certificate duration and renewal window (cloudn…
feat: per-role client certificate duration and renewal window (cloudn…