Skip to content

Commit ddc5d8b

Browse files
committed
tls/docs: update TLS cluster state of openshift 4.11
Signed-off-by: Krzysztof Ostrowski <[email protected]>
1 parent 51f3992 commit ddc5d8b

File tree

563 files changed

+12293
-4561
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

563 files changed

+12293
-4561
lines changed

tls/README.md

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,33 @@ It may change over time and is not guaranteed to be stable.
33
This is a useful starting point for understanding the cert chains in openshift used to secure kubernetes.
44

55
1. Build an image to collect the certs, keys, and ca bundles from the host.
6-
1. Something like `docker build pkg/cmd/locateinclustercerts/ -t docker.io/deads2k/cert-collection:latest -f Dockerfile`
6+
1. Something like `docker build pkg/cmd/locateinclustercerts/ -t docker.io/$USER/locateinclustercerts:latest -f Dockerfile`
77
2. Push to dockerhub
88
2. Gather data.
99
1. `oc adm inspect clusteroperators` -- this will gather all the in-cluster certificates and ca bundles
10-
2. run pods on the masters. Something like `oc debug --image=docker.io/deads2k/cert-collection:08 node/ci-ln-z2l4snt-f76d1-prqp5-master-2`
10+
2. run pods on the masters. Something like:
11+
12+
```bash
13+
NODE=$(kubectl get nodes | grep master | head -n1 | awk '{ print $1 }') \
14+
IMAGE=$(podman image list --sort created | grep locateinclustercerts | awk '{ print $1 ":" $2 }') \
15+
oc debug --image=$IMAGE node/$NODE
16+
```
17+
1118
3. in those pods, run `master-cert-collection.sh` to collect the data from the host. Leave the pod running after completion.
12-
4. pull the on-disk data locally. Something like `oc rsync ci-ln-z2l4snt-f76d1-prqp5-master-2-debug:/must-gather ../sample-data/master-2/`
13-
3. Be sure dot is installed locally
14-
4. Run code like `kubectl-dev_tool certs locate-incluster-certs --local -f ../sample-data/ --additional-input-dir ../sample-data/ -odoc` to produce the doc.
19+
4. pull the on-disk data locally. Something like:
20+
21+
```bash
22+
POD=$(kubectl get pods -A | rg debug | awk '{ print $2 }') \
23+
oc rsync $POD:/must-gather .
24+
```
25+
26+
27+
5. Be sure dot is installed locally
28+
6. To produce the doc, use something like:
29+
30+
31+
```bash
32+
INSPECT_DIR=$(find . -name 'inspect.local.*') \
33+
kubectl-dev_tool certs locate-incluster-certs --local -f $INSPECT_DIR --additional-input-dir ./must-gather -odoc
34+
```
35+

tls/docs/Aggregated API Server Certificates/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ Used to secure connections between the kube-apiserver and aggregated API Servers
1717

1818

1919
### aggregator-front-proxy-signer
20-
![PKI Graph](subcert-aggregator-signer8209157924322867463.png)
20+
![PKI Graph](subcert-aggregator-signer3783714127421522860.png)
2121

2222
Signer for the kube-apiserver to create client certificates for aggregated apiservers to recognize as a front-proxy.
2323

2424
| Property | Value |
2525
| ----------- | ----------- |
2626
| Type | Signer |
2727
| CommonName | aggregator-signer |
28-
| SerialNumber | 8209157924322867463 |
28+
| SerialNumber | 3783714127421522860 |
2929
| Issuer CommonName | [aggregator-front-proxy-signer](#aggregator-front-proxy-signer) |
3030
| Validity | 24h |
3131
| Signature Algorithm | SHA256-RSA |
@@ -50,15 +50,15 @@ Signer for the kube-apiserver to create client certificates for aggregated apise
5050

5151

5252
### aggregator-front-proxy-client
53-
![PKI Graph](subcert-systemopenshift-aggregator8112884492387709090.png)
53+
![PKI Graph](subcert-systemopenshift-aggregator2634640073442595002.png)
5454

5555
Client certificate used by the kube-apiserver to communicate to aggregated apiservers.
5656

5757
| Property | Value |
5858
| ----------- | ----------- |
5959
| Type | Client |
6060
| CommonName | system:openshift-aggregator |
61-
| SerialNumber | 8112884492387709090 |
61+
| SerialNumber | 2634640073442595002 |
6262
| Issuer CommonName | [aggregator-front-proxy-signer](#aggregator-front-proxy-signer) |
6363
| Validity | 23h |
6464
| Signature Algorithm | SHA256-RSA |
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
digraph "OpenShift Certificates" {
22
// Node definitions.
33
0 [
4-
label="certkeypair/aggregator-front-proxy-signer\n\nsecret/aggregator-client-signer -nopenshift-kube-apiserver-operator\n"
4+
label="certkeypair/aggregator-front-proxy-client\n\nsecret/aggregator-client -nopenshift-kube-apiserver\n file:///etc/kubernetes/static-pod-resources/kube-apiserver-certs/secrets/aggregator-client/tls.crt/tls.crt,file:///etc/kubernetes/static-pod-resources/kube-apiserver-certs/secrets/aggregator-client/tls.crt/tls.key\n"
55
style=filled
6-
fillcolor="#c7bfff"
6+
fillcolor="#c8fbcd"
77
];
88
1 [
9-
label="certkeypair/aggregator-front-proxy-client\n\nsecret/aggregator-client -nopenshift-kube-apiserver\n file:///etc/kubernetes/static-pod-resources/kube-apiserver-certs/secrets/aggregator-client/tls.crt/tls.crt,file:///etc/kubernetes/static-pod-resources/kube-apiserver-certs/secrets/aggregator-client/tls.crt/tls.key\n"
9+
label="certkeypair/aggregator-front-proxy-signer\n\nsecret/aggregator-client-signer -nopenshift-kube-apiserver-operator\n"
1010
style=filled
11-
fillcolor="#c8fbcd"
11+
fillcolor="#c7bfff"
1212
];
1313
2 [
1414
label="cabundle/aggregator-front-proxy-ca\n\nconfigmaps/kube-apiserver-aggregator-client-ca -nopenshift-config-managed\n configmaps/aggregator-client-ca -nopenshift-kube-apiserver\n configmaps/aggregator-client-ca -nopenshift-kube-controller-manager\n file:///etc/kubernetes/static-pod-resources/kube-apiserver-certs/configmaps/aggregator-client-ca/ca-bundle.crt/ca-bundle.crt\n file:///etc/kubernetes/static-pod-resources/kube-controller-manager-certs/configmaps/aggregator-client-ca/ca-bundle.crt/ca-bundle.crt\n"
@@ -17,6 +17,6 @@ digraph "OpenShift Certificates" {
1717
];
1818

1919
// Edge definitions.
20-
0 -> 1;
21-
0 -> 2;
20+
1 -> 0;
21+
1 -> 2;
2222
}

tls/docs/Aggregated API Server Certificates/cert-flow.json

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
{
4343
"CertIdentifier": {
4444
"CommonName": "aggregator-signer",
45-
"SerialNumber": "8209157924322867463",
45+
"SerialNumber": "3783714127421522860",
4646
"Issuer": {
4747
"CommonName": "aggregator-signer",
4848
"SerialNumber": "",
@@ -70,54 +70,10 @@
7070
},
7171
"CertKeyPairs": {
7272
"Items": [
73-
{
74-
"LogicalName": "aggregator-front-proxy-signer",
75-
"Description": "Signer for the kube-apiserver to create client certificates for aggregated apiservers to recognize as a front-proxy.",
76-
"Name": "aggregator-signer::8209157924322867463",
77-
"Spec": {
78-
"SecretLocations": [
79-
{
80-
"Namespace": "openshift-kube-apiserver-operator",
81-
"Name": "aggregator-client-signer"
82-
}
83-
],
84-
"OnDiskLocations": null,
85-
"CertMetadata": {
86-
"CertIdentifier": {
87-
"CommonName": "aggregator-signer",
88-
"SerialNumber": "8209157924322867463",
89-
"Issuer": {
90-
"CommonName": "aggregator-signer",
91-
"SerialNumber": "",
92-
"Issuer": null
93-
}
94-
},
95-
"SignatureAlgorithm": "SHA256-RSA",
96-
"PublicKeyAlgorithm": "RSA",
97-
"PublicKeyBitSize": "2048 bit",
98-
"ValidityDuration": "24h",
99-
"Usages": [
100-
"KeyUsageDigitalSignature",
101-
"KeyUsageKeyEncipherment",
102-
"KeyUsageCertSign"
103-
],
104-
"ExtendedUsages": []
105-
},
106-
"Details": {
107-
"CertType": "SignerCertDetails",
108-
"SignerDetails": {},
109-
"ServingCertDetails": null,
110-
"ClientCertDetails": null
111-
}
112-
},
113-
"Status": {
114-
"Errors": null
115-
}
116-
},
11773
{
11874
"LogicalName": "aggregator-front-proxy-client",
11975
"Description": "Client certificate used by the kube-apiserver to communicate to aggregated apiservers.",
120-
"Name": "system:openshift-aggregator::8112884492387709090",
76+
"Name": "system:openshift-aggregator::2634640073442595002",
12177
"Spec": {
12278
"SecretLocations": [
12379
{
@@ -146,7 +102,7 @@
146102
"CertMetadata": {
147103
"CertIdentifier": {
148104
"CommonName": "system:openshift-aggregator",
149-
"SerialNumber": "8112884492387709090",
105+
"SerialNumber": "2634640073442595002",
150106
"Issuer": {
151107
"CommonName": "aggregator-signer",
152108
"SerialNumber": "",
@@ -177,6 +133,50 @@
177133
"Status": {
178134
"Errors": null
179135
}
136+
},
137+
{
138+
"LogicalName": "aggregator-front-proxy-signer",
139+
"Description": "Signer for the kube-apiserver to create client certificates for aggregated apiservers to recognize as a front-proxy.",
140+
"Name": "aggregator-signer::3783714127421522860",
141+
"Spec": {
142+
"SecretLocations": [
143+
{
144+
"Namespace": "openshift-kube-apiserver-operator",
145+
"Name": "aggregator-client-signer"
146+
}
147+
],
148+
"OnDiskLocations": null,
149+
"CertMetadata": {
150+
"CertIdentifier": {
151+
"CommonName": "aggregator-signer",
152+
"SerialNumber": "3783714127421522860",
153+
"Issuer": {
154+
"CommonName": "aggregator-signer",
155+
"SerialNumber": "",
156+
"Issuer": null
157+
}
158+
},
159+
"SignatureAlgorithm": "SHA256-RSA",
160+
"PublicKeyAlgorithm": "RSA",
161+
"PublicKeyBitSize": "2048 bit",
162+
"ValidityDuration": "24h",
163+
"Usages": [
164+
"KeyUsageDigitalSignature",
165+
"KeyUsageKeyEncipherment",
166+
"KeyUsageCertSign"
167+
],
168+
"ExtendedUsages": []
169+
},
170+
"Details": {
171+
"CertType": "SignerCertDetails",
172+
"SignerDetails": {},
173+
"ServingCertDetails": null,
174+
"ClientCertDetails": null
175+
}
176+
},
177+
"Status": {
178+
"Errors": null
179+
}
180180
}
181181
]
182182
}
-11.3 KB
Loading
Lines changed: 26 additions & 26 deletions
Loading

tls/docs/Aggregated API Server Certificates/subca-668341161.dot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
digraph "Local Certificate" {
22
// Node definitions.
3-
0 [
3+
1 [
44
label="certkeypair/aggregator-front-proxy-signer\n\nsecret/aggregator-client-signer -nopenshift-kube-apiserver-operator\n"
55
style=filled
66
fillcolor="#c7bfff"
@@ -12,5 +12,5 @@ digraph "Local Certificate" {
1212
];
1313

1414
// Edge definitions.
15-
0 -> 2;
15+
1 -> 2;
1616
}
-14 KB
Loading
111 KB
Loading
111 KB
Loading

0 commit comments

Comments
 (0)