Skip to content

Commit ce017fe

Browse files
committed
Add Short Rotation Period For Certificates
1 parent 0e4d724 commit ce017fe

File tree

1 file changed

+148
-0
lines changed

1 file changed

+148
-0
lines changed
+148
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
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+
* Update components owning certificates to check this featuregate during control loop
55+
and issue shorter certificates.
56+
Identified components:
57+
* installer
58+
* cluster-kube-apiserver-operator
59+
* cluster-kube-controller-manager-operator
60+
* cluster-etcd-operator
61+
* cluster-network-operator
62+
* service-ca-operator
63+
* OLM
64+
* Each component can decide the new duration for certificates separately. Some signers are meant
65+
to last "indefinitely" (10 years) to support cluster features, i.e. CSR signer is not meant to
66+
expire so that new nodes could join
67+
* Create e2e tests enabling this featuregate and checking that certificate rotate correctly
68+
* Run e2e periodically to ensure cluster with this featuregate is functional
69+
70+
### Non-Goals
71+
72+
* Change validity duration for existing certificates
73+
74+
## Proposal
75+
76+
Update components to read enabled FeatureGates and update certificate issuing code
77+
78+
### Workflow Description
79+
80+
N/A
81+
82+
### API Extensions
83+
84+
N/A
85+
86+
### Topology Considerations
87+
88+
#### Hypershift / Hosted Control Planes
89+
90+
N/A
91+
92+
#### Standalone Clusters
93+
94+
N/A
95+
96+
#### Single-node Deployments or MicroShift
97+
98+
Not applicable to MicroShift - it doesn't issue certificates via operators
99+
100+
### Implementation Details/Notes/Constraints
101+
102+
103+
### Risks and Mitigations
104+
105+
106+
### Drawbacks
107+
108+
109+
## Open Questions [optional]
110+
111+
112+
## Test Plan
113+
114+
End to end testing this feature would:
115+
* enable ShortCertificateRotation featuregate
116+
* observe the cluster for 8 hours
117+
* run minimal testsuite to ensure that main cluster functions are not affected
118+
119+
## Graduation Criteria
120+
121+
This featuregate is not meant to be graduated - its intended to be developer-only setting
122+
123+
### Dev Preview -> Tech Preview
124+
N/A
125+
126+
### Tech Preview -> GA
127+
N/A
128+
129+
### Removing a deprecated feature
130+
131+
132+
## Upgrade / Downgrade Strategy
133+
134+
Setting DevPreview is permanent - there is no way to upgrade or downgrade the cluster.
135+
136+
## Version Skew Strategy
137+
138+
N/A
139+
140+
## Operational Aspects of API Extensions
141+
142+
N/A
143+
144+
## Support Procedures
145+
146+
This setting is unsupported
147+
148+
## Alternatives

0 commit comments

Comments
 (0)