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
* Fix doccomment to be more neutral towards self-signed CAs
* Turn tls backend into a directory module
* Factor out CA management
* Rotate CA if about to expire
* Reorganize and document/test
* Rename ca::Manager::all_cas -> trust_roots
* Refactor internal naming
* Sort CAs by age to avoid spurious writes
* Docs
* Changelog
* Update CRD
* Reshuffle logging
* rustfmt
* Fix broken doclink
* Update rust/operator-binary/src/utils.rs
Co-authored-by: Sebastian Bernauer <[email protected]>
* Enforce secret reference correctness in CRD
* Check for time overflow
* Make cargo-deny happy
* Add note about cleaning up CAs
---------
Co-authored-by: Sebastian Bernauer <[email protected]>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+4-1
Original file line number
Diff line number
Diff line change
@@ -10,10 +10,13 @@ All notable changes to this project will be documented in this file.
10
10
11
11
## Changed
12
12
13
-
- Use new annotation builder ([#341])
13
+
- Use new annotation builder ([#341]).
14
+
-`autoTLS` certificate authorities will now be rotated regularly ([#350]).
15
+
-[BREAKING] This changes the format of the CA secrets. Old secrets will be migrated automatically, but manual intervention will be required to downgrade back to 23.11.x.
Copy file name to clipboardExpand all lines: deploy/helm/secret-operator/crds/crds.yaml
+21-9
Original file line number
Diff line number
Diff line change
@@ -45,17 +45,20 @@ spec:
45
45
properties:
46
46
autoGenerate:
47
47
default: false
48
-
description: Whether a new certificate authority should be generated if it does not already exist.
48
+
description: Whether the certificate authority should be managed by Secret Operator, including being generated if it does not already exist.
49
49
type: boolean
50
50
secret:
51
51
description: Reference (name and namespace) to a Kubernetes Secret object where the CA certificate and key is stored in the keys `ca.crt` and `ca.key` respectively.
52
52
properties:
53
53
name:
54
-
description: name is unique within a namespace to reference a secret resource.
54
+
description: Name of the Secret being referred to.
55
55
type: string
56
56
namespace:
57
-
description: namespace defines the space within which the secret name must be unique.
57
+
description: Namespace of the Secret being referred to.
58
58
type: string
59
+
required:
60
+
- name
61
+
- namespace
59
62
type: object
60
63
required:
61
64
- secret
@@ -109,21 +112,27 @@ spec:
109
112
description: Reference (name and namespace) to a Kubernetes Secret object containing the TLS CA (in `ca.crt`) that the LDAP server’s certificate should be authenticated against.
110
113
properties:
111
114
name:
112
-
description: name is unique within a namespace to reference a secret resource.
115
+
description: Name of the Secret being referred to.
113
116
type: string
114
117
namespace:
115
-
description: namespace defines the space within which the secret name must be unique.
118
+
description: Namespace of the Secret being referred to.
116
119
type: string
120
+
required:
121
+
- name
122
+
- namespace
117
123
type: object
118
124
passwordCacheSecret:
119
125
description: Reference (name and namespace) to a Kubernetes Secret object where workload passwords will be stored. This must not be accessible to end users.
120
126
properties:
121
127
name:
122
-
description: name is unique within a namespace to reference a secret resource.
128
+
description: Name of the Secret being referred to.
123
129
type: string
124
130
namespace:
125
-
description: namespace defines the space within which the secret name must be unique.
131
+
description: Namespace of the Secret being referred to.
126
132
type: string
133
+
required:
134
+
- name
135
+
- namespace
127
136
type: object
128
137
schemaDistinguishedName:
129
138
description: The root Distinguished Name (DN) for AD-managed schemas, typically `CN=Schema,CN=Configuration,{domain_dn}`.
@@ -152,11 +161,14 @@ spec:
152
161
description: Reference (`name` and `namespace`) to a K8s Secret object where a keytab with administrative privileges is stored in the key `keytab`.
153
162
properties:
154
163
name:
155
-
description: name is unique within a namespace to reference a secret resource.
164
+
description: Name of the Secret being referred to.
156
165
type: string
157
166
namespace:
158
-
description: namespace defines the space within which the secret name must be unique.
167
+
description: Namespace of the Secret being referred to.
Copy file name to clipboardExpand all lines: docs/modules/secret-operator/pages/secretclass.adoc
+13-2
Original file line number
Diff line number
Diff line change
@@ -56,7 +56,18 @@ We have spent a considerate amount of time thinking about this issue and decided
56
56
Most of our product operators will not set any specific certificate lifetime, so the default applies.
57
57
In case an operator sets a higher lifetime, a tracking issue must be created to document and track the steps to reduce the certificate lifetime.
58
58
59
-
Users can use podOverrides to extend the certificate lifetime by adding volume annotations. We might add native support to customize certificate lifetimes in the future by using the product CRDs.
59
+
Users can use podOverrides to extend the certificate lifetime by adding volume annotations. We might add native support for customizing certificate lifetimes in the future to the Stacklet CRDs.
60
+
61
+
==== Certificate Authority rotation
62
+
63
+
Certificate authorities also have a limited lifetime, and need to be rotated before they expire to avoid cluster disruption.
64
+
65
+
If configured to provision its own CA (`autoTls.ca.autoGenerate`), the Secret Operator will create CA certificates that are valid for 2 years,
66
+
and initiate rotation when there is less than 1 year remaining. If configured _not_ to provision its own CA, a warning will be issued when there is less than 1 year remaining.
67
+
68
+
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.
69
+
70
+
Expired certificates will currently not be deleted automatically, and should be cleaned up manually.
60
71
61
72
==== Reference
62
73
@@ -77,7 +88,7 @@ spec:
77
88
`autoTls.ca`:: Configures the certificate authority used to issue `Pod` certificates.
78
89
`autoTls.ca.secret`:: Reference (`name` and `namespace`) to a K8s `Secret` object where the CA certificate and key is stored in the keys `ca.crt`
79
90
and `ca.key` respectively.
80
-
`autoTls.ca.autoGenerate`:: Whether the certificate authority should be provisioned if it can not be found.
91
+
`autoTls.ca.autoGenerate`:: Whether the certificate authority should be provisioned and managed by the Secret Operator.
81
92
`autoTls.maxCertificateLifetime`:: Maximum lifetime the created certificates are allowed to have. In case consumers request a longer lifetime than allowed by this setting, the lifetime will be the minimum of both.
0 commit comments