Skip to content

Commit 44f62dc

Browse files
docs: Document the CA certificate retirement
1 parent 9c7d860 commit 44f62dc

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

docs/modules/secret-operator/pages/secretclass.adoc

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,17 +88,18 @@ In case an operator sets a higher lifetime, a tracking issue must be created to
8888
Users can use xref:concepts:overrides.adoc#pod-overrides[podOverrides] to extend the certificate lifetime by adding volume annotations.
8989
Native support for customizing certificate lifetimes in Stacklet CRDs might be added in the future.
9090

91+
[#ca-rotation]
9192
==== Certificate Authority rotation
9293

9394
Certificate authorities also have a limited lifetime, and need to be rotated before they expire to avoid cluster disruption.
9495

95-
// TODO Adapt this section
96-
If configured to provision its own CA (`autoTls.ca.autoGenerate`), the Secret Operator will create CA certificates that are valid for 365 days (≃ 1 year, configurable via `autoTls.ca.caCertificateLifetime`), and initiate rotation once less than half of that time remains.
96+
If configured to provision its own CA (`autoTls.ca.autoGenerate`), the Secret Operator will create CA certificates that are valid for 365 days (≃ 1 year, configurable via `autoTls.ca.caCertificateLifetime`).
97+
The CA certificate is retired one hour before its expiration (configurable via `autoTls.ca.caCertificateRetirementDuration`), to avoid that an almost expired certificate must be deployed, which causes problems in some products, e.g. OpenSearch.
98+
Once less than half of the active lifetime (= lifetime - retirement duration) remains, the rotation is initiated.
9799

98100
To avoid disruption and let the new CA propagate through the cluster, the Secret Operator will prefer using the oldest CA that will last for the entire lifetime of the issued certificate.
99101

100-
NOTE: Expired CA certificates will currently not be deleted automatically.
101-
They should be cleaned up manually.
102+
NOTE: Expired and retired CA certificates will not be deployed.
102103

103104
==== Reference
104105

@@ -113,6 +114,7 @@ spec:
113114
namespace: default
114115
autoGenerate: true
115116
caCertificateLifetime: 700d
117+
caCertificateRetirementDuration: 1d
116118
keyGeneration:
117119
rsa:
118120
length: 4096
@@ -132,6 +134,7 @@ spec:
132134
and `ca.key` respectively.
133135
`autoTls.ca.autoGenerate`:: Whether the certificate authority should be provisioned and managed by the Secret Operator.
134136
`autoTls.ca.caCertificateLifetime` :: The lifetime of the certificate authority's root certificate.
137+
`autoTls.ca.caCertificateRetirementDuration` :: Duration at the end of the CA certificate lifetime where no signed certificate will exist.
135138
`autoTls.ca.keyGeneration`:: Configures how keys should be generated.
136139
`autoTls.ca.keyGeneration.rsa`:: Declares that keys should be generated using the RSA algorithm.
137140
`autoTls.ca.keyGeneration.rsa.length`:: The amount of bits used for generating the RSA key pair. Currently, `2048`, `3072` and `4096` are supported. Defaults to `2048` bits.

docs/modules/secret-operator/pages/truststore.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,7 @@ include::example$truststore-tls.yaml[]
2020
This will create a ConfigMap (or `Secret` based on `targetKind`) named `truststore-pem` containing a `ca.crt` with the trust root certificates.
2121
It can then either be mounted into a Pod or retrieved and used from outside of Kubernetes.
2222

23+
Expired or retired (see xref:secretclass.adoc#ca-rotation[Certificate Authority rotation]) certificates will not be published, because they should not be needed and some products, e.g. OpenSearch, have problems if they are present at startup.
24+
2325
NOTE: Make sure to have a procedure for updating the retrieved certificates.
2426
The Secret Operator will automatically rotate the xref:secretclass.adoc#backend-autotls[autoTls] certificate authority as needed, but all trust roots will require some form of update occasionally.

0 commit comments

Comments
 (0)