You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/modules/secret-operator/pages/secretclass.adoc
+7-3Lines changed: 7 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,16 +88,18 @@ In case an operator sets a higher lifetime, a tracking issue must be created to
88
88
Users can use xref:concepts:overrides.adoc#pod-overrides[podOverrides] to extend the certificate lifetime by adding volume annotations.
89
89
Native support for customizing certificate lifetimes in Stacklet CRDs might be added in the future.
90
90
91
+
[#ca-rotation]
91
92
==== Certificate Authority rotation
92
93
93
94
Certificate authorities also have a limited lifetime, and need to be rotated before they expire to avoid cluster disruption.
94
95
95
-
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.
96
99
97
100
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.
98
101
99
-
NOTE: Expired CA certificates will currently not be deleted automatically.
100
-
They should be cleaned up manually.
102
+
NOTE: Expired and retired CA certificates will not be deployed.
101
103
102
104
==== Reference
103
105
@@ -112,6 +114,7 @@ spec:
112
114
namespace: default
113
115
autoGenerate: true
114
116
caCertificateLifetime: 700d
117
+
caCertificateRetirementDuration: 1d
115
118
keyGeneration:
116
119
rsa:
117
120
length: 4096
@@ -131,6 +134,7 @@ spec:
131
134
and `ca.key` respectively.
132
135
`autoTls.ca.autoGenerate`:: Whether the certificate authority should be provisioned and managed by the Secret Operator.
133
136
`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.
134
138
`autoTls.ca.keyGeneration`:: Configures how keys should be generated.
135
139
`autoTls.ca.keyGeneration.rsa`:: Declares that keys should be generated using the RSA algorithm.
136
140
`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.
This will create a ConfigMap (or `Secret` based on `targetKind`) named `truststore-pem` containing a `ca.crt` with the trust root certificates.
21
21
It can then either be mounted into a Pod or retrieved and used from outside of Kubernetes.
22
22
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
+
23
25
NOTE: Make sure to have a procedure for updating the retrieved certificates.
24
26
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