Skip to content

Commit 83e6af9

Browse files
committed
Add Short Rotation Period For Certificates
1 parent 96d8a57 commit 83e6af9

File tree

1 file changed

+161
-0
lines changed

1 file changed

+161
-0
lines changed
+161
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
---
2+
title: certificate-short-rotation
3+
authors:
4+
- vrutkovs
5+
reviewers:
6+
- deads2k
7+
approvers:
8+
- deads2k
9+
api-approvers:
10+
- deads2k
11+
creation-date: 2024-08-24
12+
last-updated: 2024-08-24
13+
tracking-link:
14+
- https://issues.redhat.com/browse/API-1688
15+
---
16+
17+
# Short Rotation Period For Certificates
18+
19+
## Summary
20+
21+
Add new feature gate in DevPreview set so that components would issue certificates with shorter
22+
duration - hours instead of days.
23+
24+
## Motivation
25+
26+
Currently certificates are issued by Openshift with various validity durations, but at least its 15
27+
days. This makes testing certificate rotation in CI complicated - we have to emulate passing time
28+
using time skewing. This methods shows how cluster recovers after certificates have expired, but
29+
it doesn't help us with testing happy path when certificates rotate during standard cluster lifecycle.
30+
31+
Some components (i.e. cluster-kube-apiserver-operator) issue certificate with shorter lifetime in
32+
development branch. This requires us to revert this change every time we branch for new release.
33+
This also doesn't help us in CI, as it needs a similar change in the installer.
34+
Also, most components are not using this, so we end up with some certificates valid for hours but
35+
most would be valid for days.
36+
37+
Since the change to revert this setting requires manual pull request, there is chance that this
38+
setting will leak into supported releases.
39+
40+
This enhancement describes a new feature gate, which would enable this feature for all components
41+
and ensure that stable releases don't have it accidentally enabled as it uses FeatureGates.
42+
43+
### User Stories
44+
45+
> As an Openshift developer, I want to have a setting for component to issue shorter living
46+
> certificates so that I could verify that certificate rotation doesn't cause issues
47+
48+
Note that this lacks any customer userstories - this is a developer-only feature, customers are
49+
not expected to use it
50+
51+
### Goals
52+
53+
* Create a new FeatureGate in DevPreview featureset
54+
* Each component can decide the new duration for certificates separately.
55+
* Create e2e tests enabling this featuregate and checking that certificate rotate correctly
56+
* Run e2e periodically to ensure cluster with this featuregate is functional
57+
58+
### Non-Goals
59+
60+
* Change validity duration for existing certificates
61+
62+
## Proposal
63+
64+
Update components to read enabled FeatureGates and update certificate issuing code in all OpenShift
65+
components.
66+
67+
The featuregate would make components generate certificates which have shorter duration - hours
68+
instead of days, so that we could verify that most certificates can be rotated within duration of
69+
e2e test. This would allow developers to verify that certificates get rotated without breaking
70+
cluster features. Standard minimal conformance test should be sufficient, however component teams
71+
may want to suggest additional tests to run after rotation is performed.
72+
73+
Component developers would be able to decide the duration of the certificates - and collect a list
74+
of certificates which should not be rotated. Some signers are meant to last
75+
"indefinitely" (10 years) to support cluster features, i.e. CSR signer is not meant to
76+
expire so that new nodes could join.
77+
78+
Identified components required changes:
79+
* installer
80+
* cluster-kube-apiserver-operator
81+
* cluster-kube-controller-manager-operator
82+
* cluster-etcd-operator
83+
* cluster-network-operator
84+
* service-ca-operator
85+
* OLM
86+
87+
88+
### Workflow Description
89+
90+
N/A
91+
92+
### API Extensions
93+
94+
N/A
95+
96+
### Topology Considerations
97+
98+
#### Hypershift / Hosted Control Planes
99+
100+
N/A
101+
102+
#### Standalone Clusters
103+
104+
N/A
105+
106+
#### Single-node Deployments or MicroShift
107+
108+
Not applicable to MicroShift - it doesn't issue certificates via operators
109+
110+
### Implementation Details/Notes/Constraints
111+
112+
113+
### Risks and Mitigations
114+
115+
116+
### Drawbacks
117+
118+
119+
## Open Questions [optional]
120+
121+
122+
## Test Plan
123+
124+
End to end testing this feature would:
125+
* enable ShortCertificateRotation featuregate
126+
* observe the cluster for 8 hours
127+
* run minimal testsuite to ensure that main cluster functions are not affected
128+
* create a new test which verifies that certificates have rotated
129+
Some certificates - i.e. ingress or csr signer - are expected to remain unrotated, so the test
130+
would have a list of known exceptions
131+
132+
## Graduation Criteria
133+
134+
This featuregate is not meant to be graduated - its intended to be developer-only setting
135+
136+
### Dev Preview -> Tech Preview
137+
N/A
138+
139+
### Tech Preview -> GA
140+
N/A
141+
142+
### Removing a deprecated feature
143+
144+
145+
## Upgrade / Downgrade Strategy
146+
147+
Setting DevPreview is permanent - there is no way to upgrade or downgrade the cluster.
148+
149+
## Version Skew Strategy
150+
151+
N/A
152+
153+
## Operational Aspects of API Extensions
154+
155+
N/A
156+
157+
## Support Procedures
158+
159+
This setting is unsupported
160+
161+
## Alternatives

0 commit comments

Comments
 (0)