Skip to content

Commit 9749d23

Browse files
Merge pull request #35473 from skrthomas/OSDOCS-2415
OSDOCS-2415: Adding mTLS info
2 parents 785635f + d0f108a commit 9749d23

File tree

3 files changed

+63
-0
lines changed

3 files changed

+63
-0
lines changed

modules/nw-ingress-controller-configuration-parameters.adoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,14 @@ The Ingress Operator also converts the TLS `1.0` of an `Old` or `Custom` profile
106106
Ciphers and the minimum TLS version of the configured security profile are reflected in the `TLSProfile` status.
107107
====
108108

109+
|`clientTLS`
110+
|`clientTLS` authenticates client access to the cluster and services; as a result, mutual TLS authentication is enabled. If not set, then client TLS is not enabled.
111+
112+
`clientTLS` has the required subfields, `spec.clientTLS.clientCertificatePolicy` and `spec.clientTLS.ClientCA`.
113+
114+
The `ClientCertificatePolicy` subfield accepts one of the two values: `Required` or `Optional`. The `ClientCA` subfield specifies a config map that is in the openshift-config namespace. The config map should contain a CA certificate bundle.
115+
The `AllowedSubjectPatterns` is an optional value that specifies a list of regular expressions, which are matched against the distinguished name on a valid client certificate to filter requests. The regular expressions must use PCRE syntax. At least one pattern must match a client certificate's distinguished name; otherwise, the ingress controller rejects the certificate and denies the connection. If not specified, the ingress controller does not reject certificates based on the distinguished name.
116+
109117
|`routeAdmission`
110118
|`routeAdmission` defines a policy for handling new route claims, such as allowing or denying claims across namespaces.
111119

modules/nw-mutual-tls-auth.adoc

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * ingress/ingress-operator.adoc
4+
5+
[id=nw-mutual-tls-auth_{context}]
6+
= Configuring mutual TLS authentication
7+
8+
You can configure the Ingress Controller to enable mutual TLS (mTLS) authentication by setting a `spec.clientTLS` value. The `clientTLS` value configures the Ingress Controller to verify client certificates. This configuration includes setting a `clientCA` value, which is a reference to a config map. The config map contains the PEM-encoded CA certificate bundle that is used to verify a client's certificate. Optionally, you can configure a list of certificate subject filters.
9+
10+
If the `clientCA` value specifies an X509v3 certificate revocation list (CRL) distribution point, the Ingress Operator downloads the CRL and configures the Ingress Controller to acknowledge it. Requests that do not provide valid certificates are rejected.
11+
12+
.Prerequisites
13+
14+
* You have access to the cluster as a user with the `cluster-admin` role.
15+
16+
.Procedure
17+
. Create a config map that is in the `openshift-config` namespace:
18+
+
19+
[source,terminal]
20+
----
21+
$ oc create configmap router-ca-certs-default --from-file=ca-bundle.pem=client-ca.crt -n openshift-config
22+
----
23+
+
24+
[NOTE]
25+
====
26+
The config map data key must be `ca-bundle.pem`, and the data value must be a CA certificate in PEM format.
27+
====
28+
29+
. Edit the `IngressController` resource in the `openshift-ingress-operator` project:
30+
+
31+
[source,terminal]
32+
----
33+
$ oc edit IngressController default -n openshift-ingress-operator
34+
----
35+
36+
. Add the spec.clientTLS field and subfields to configure mutual TLS:
37+
+
38+
.Sample `IngressController` CR for a `clientTLS` profile that specifies filtering patterns
39+
[source,yaml]
40+
----
41+
apiVersion: operator.openshift.io/v1
42+
kind: IngressController
43+
metadata:
44+
name: default
45+
namespace: openshift-ingress-operator
46+
spec:
47+
clientTLS:
48+
clientCertificatePolicy: Required
49+
clientCA:
50+
name: router-ca-certs-default
51+
allowedSubjectPatterns:
52+
- "^/CN=example.com/ST=NC/C=US/O=Security/OU=OpenShift$"
53+
----

networking/ingress-operator.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ include::modules/tls-profiles-understanding.adoc[leveloffset=+3]
2828
// Configuring the TLS profile for the Ingress Controller
2929
include::modules/tls-profiles-ingress-configuring.adoc[leveloffset=+3]
3030

31+
include::modules/nw-mutual-tls-auth.adoc[leveloffset=+3]
32+
3133
include::modules/nw-ingress-controller-endpoint-publishing-strategies.adoc[leveloffset=+2]
3234

3335
include::modules/nw-ingress-view.adoc[leveloffset=+1]

0 commit comments

Comments
 (0)