Skip to content

Commit 29db4af

Browse files
authored
Merge pull request #77406 from tmalove/etcd-osdocs-10055-tlove
[OSDOCS#10055]: Document manual rotation of etcd signer certificates
2 parents 6c01ce9 + 2174329 commit 29db4af

File tree

3 files changed

+82
-1
lines changed

3 files changed

+82
-1
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * security/certificate_types_descriptions/etcd-certificates.adoc
4+
5+
:_mod-docs-content-type: CONCEPT
6+
[id="etcd-cert-alerts-metrics-signer_{context}"]
7+
= etcd certificate rotation alerts and metrics signer certificates
8+
9+
Two alert types inform users about pending `etcd` certificate expiration:
10+
[horizontal]
11+
`etcdSignerCAExpirationWarning`:: Occurs 730 days until the signer expires.
12+
`etcdSignerCAExpirationCritical`:: Occurs 365 days until the signer expires.
13+
14+
You can rotate the certificate for the following reasons:
15+
16+
* You receive an expiration alert.
17+
* The private key is leaked.
18+
19+
[IMPORTANT]
20+
====
21+
When a private key is leaked, you must rotate all of the certificates.
22+
====
23+
24+
There is an `etcd` signer for the {product-title} metrics system. Substitute the following metrics parameters in _Rotating the etcd certificate_.
25+
26+
* `etcd-metric-signer` instead of `etcd-signer`
27+
* `etcd-metrics-ca-bundle` instead of `etcd-ca-bundle`
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
// Module included in the following assemblies:
2+
//
3+
// security/certificate_types_descriptions/etcd-certificates.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="rotating-certificate-authority_{context}"]
7+
= Rotating the etcd certificate
8+
9+
Rotate the `etcd` certificate before it expires.
10+
11+
.Procedure
12+
13+
. Verify the remaining lifetime of the new signer certificate by running the following command:
14+
+
15+
[source,terminal]
16+
----
17+
$ oc get secret -n openshift-etcd etcd-signer -ojsonpath='{.metadata.annotations.auth\.openshift\.io/certificate-not-after}'
18+
----
19+
20+
. If the remaining lifetime is close to the current date, re-create the signer by deleting the signer and wait for the static pod roll out.
21+
* Delete the signer by running the following command:
22+
+
23+
[source,terminal]
24+
----
25+
$ oc delete secret -n openshift-etcd etcd-signer
26+
----
27+
28+
* Wait for the static pod roll out by running the following command:
29+
+
30+
[source,terminal]
31+
----
32+
$ oc wait --for=condition=Progressing=False --timeout=15m clusteroperator/etcd
33+
----
34+
35+
. After `etcd` restarts, switch the original CA in the `openshift-config` namespace with the new, rotated one in `openshift-etcd` by running the following command:
36+
+
37+
[source,terminal]
38+
----
39+
$ oc get secret etcd-signer -n openshift-etcd -ojson | jq 'del(.metadata["namespace","creationTimestamp","resourceVersion","selfLink","uid"])' | oc apply -n openshift-config -f -
40+
----
41+
42+
. Wait for the cluster Operators to roll out and stabilize by running the following command:
43+
+
44+
[source,terminal]
45+
----
46+
$ oc adm wait-for-stable-cluster --minimum-stable-period 2m
47+
----

security/certificate_types_descriptions/etcd-certificates.adoc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,20 @@ etcd certificates are signed by the etcd-signer; they come from a certificate au
1414

1515
The CA certificates are valid for 10 years. The peer, client, and server certificates are valid for three years.
1616

17+
include::modules/rotating-certificate-authority.adoc[leveloffset=+1]
18+
include::modules/etcd-cert-alerts-metrics-signer.adoc[leveloffset=+1]
19+
20+
.Additional resources
21+
22+
* xref:../../security/certificate_types_descriptions/etcd-certificates.adoc#rotating-certificate-authority_cert-types-etcd-certificates[Rotating the etcd certificate]
23+
1724
== Management
1825

1926
These certificates are only managed by the system and are automatically rotated.
2027

2128
== Services
2229

23-
etcd certificates are used for encrypted communication between etcd member peers, as well as encrypted client traffic. The following certificates are generated and used by etcd and other processes that communicate with etcd:
30+
etcd certificates are used for encrypted communication between etcd member peers and encrypted client traffic. The following certificates are generated and used by etcd and other processes that communicate with etcd:
2431

2532
* Peer certificates: Used for communication between etcd members.
2633
* Client certificates: Used for encrypted server-client communication. Client certificates are currently used by the API server only, and no other service should connect to etcd directly except for the proxy. Client secrets (`etcd-client`, `etcd-metric-client`, `etcd-metric-signer`, and `etcd-signer`) are added to the `openshift-config`, `openshift-monitoring`, and `openshift-kube-apiserver` namespaces.

0 commit comments

Comments
 (0)