Skip to content

Commit 28b0e16

Browse files
committed
ocpbugs-8882: configure an addditionl clientca for the openshiftapi server
1 parent 4fe9719 commit 28b0e16

File tree

3 files changed

+51
-0
lines changed

3 files changed

+51
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * security/certificates/api-server.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="configure-an-additional-clientCA-for-the-OpenShift-API-server_{context}"]
7+
= Configure an additional clientCA for the OpenShift API server
8+
9+
. Import the CA certificate in a configmap of the openshift-config namespace. The CA file must be in PEM format.
10+
+
11+
[source,terminal]
12+
----
13+
oc create configmap client-ca-custom -n openshift-config --from-file=ca-bundle.crt=ca.crt
14+
----
15+
+
16+
.Patch the APIServer instance.
17+
+
18+
[source, terminal]
19+
----
20+
oc patch apiserver cluster --type=merge -p '{"spec": {"clientCA": {"name": "client-ca-custom"}}}'
21+
----
22+
23+
After adding the new CA, any API request providing an x.509 client certificate signed by the new CA and matching a valid user is successfully authenticated.
24+
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * security/certificates/api-server.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="configure-an-additional-clientca-for-the-openshift-api-server_{context}"]
7+
= Configure an additional clientCA for the OpenShift API server
8+
9+
. Import the CA certificate in a configmap of the openshift-config namespace. The CA file must be in PEM format.
10+
+
11+
[source,terminal]
12+
----
13+
$ oc create configmap client-ca-custom -n openshift-config --from-file=ca-bundle.crt=ca.crt
14+
----
15+
16+
. Patch the APIServer instance.
17+
+
18+
[source,terminal]
19+
----
20+
$oc patch apiserver cluster --type=merge -p '{"spec": {"clientCA": {"name": "client-ca-custom"}}}'
21+
----
22+
23+
. Import the CA certificate in a configmap of the openshift-config namespace. The CA file must be in PEM format.
24+
25+
After adding the new CA, any API request providing an x.509 client certificate signed by the new CA and matching a valid user is successfully authenticated.
26+

security/certificates/api-server.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ API server's certificate by default. This certificate can be replaced
1212
by one that is issued by a CA that clients trust.
1313

1414
include::modules/customize-certificates-api-add-named.adoc[leveloffset=+1]
15+
include::modules/configure-certificates-api-add-named.adoc[leveloffset=+1]

0 commit comments

Comments
 (0)