Skip to content

Commit d7097f8

Browse files
authored
Merge pull request #55977 from adellape/mtls_crl
2 parents 8b1a8c0 + d570145 commit d7097f8

File tree

2 files changed

+24
-14
lines changed

2 files changed

+24
-14
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ The Ingress Operator converts the TLS `1.0` of an `Old` or `Custom` profile to `
148148
`clientTLS` has the required subfields, `spec.clientTLS.clientCertificatePolicy` and `spec.clientTLS.ClientCA`.
149149

150150
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.
151+
151152
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.
152153

153154
|`routeAdmission`
@@ -207,15 +208,15 @@ For request headers, these adjustments are applied only for routes that have the
207208
|`httpErrorCodePages` specifies custom HTTP error code response pages. By default, an IngressController uses error pages built into the IngressController image.
208209

209210
|`httpCaptureCookies`
210-
|`httpCaptureCookies` specifies HTTP cookies that you want to capture in access logs. If the `httpCaptureCookies` field is empty, the access logs do not capture the cookies.
211+
|`httpCaptureCookies` specifies HTTP cookies that you want to capture in access logs. If the `httpCaptureCookies` field is empty, the access logs do not capture the cookies.
211212

212213
For any cookie that you want to capture, the following parameters must be in your `IngressController` configuration:
213214

214215
* `name` specifies the name of the cookie.
215216
* `maxLength` specifies tha maximum length of the cookie.
216217
* `matchType` specifies if the field `name` of the cookie exactly matches the capture cookie setting or is a prefix of the capture cookie setting. The `matchType` field uses the `Exact` and `Prefix` parameters.
217218
218-
For example:
219+
For example:
219220
[source,yaml]
220221
----
221222
httpCaptureCookies:
@@ -225,7 +226,7 @@ For example:
225226
----
226227
227228
|`httpCaptureHeaders`
228-
|`httpCaptureHeaders` specifies the HTTP headers that you want to capture in the access logs. If the `httpCaptureHeaders` field is empty, the access logs do not capture the headers.
229+
|`httpCaptureHeaders` specifies the HTTP headers that you want to capture in the access logs. If the `httpCaptureHeaders` field is empty, the access logs do not capture the headers.
229230
230231
`httpCaptureHeaders` contains two lists of headers to capture in the access logs. The two lists of header fields are `request` and `response`. In both lists, the `name` field must specify the header name and the `maxlength` field must specify the maximum length of the header. For example:
231232

modules/nw-mutual-tls-auth.adoc

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,40 @@
11
// Module included in the following assemblies:
22
//
3-
// * ingress/ingress-operator.adoc
3+
// * networking/ingress-operator.adoc
44

55
:_content-type: PROCEDURE
66
[id=nw-mutual-tls-auth_{context}]
77
= Configuring mutual TLS authentication
88

9-
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+
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 also configure a list of certificate subject filters.
1010

11-
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+
If the `clientCA` value specifies an X509v3 certificate revocation list (CRL) distribution point, the Ingress Operator downloads and manages a CRL config map based on the HTTP URI X509v3 `CRL Distribution Point` specified in each provided certificate. The Ingress Controller uses this config map during mTLS/TLS negotiation. Requests that do not provide valid certificates are rejected.
1212

1313
.Prerequisites
1414

1515
* You have access to the cluster as a user with the `cluster-admin` role.
16+
* You have a PEM-encoded CA certificate bundle.
17+
* If your CA bundle references a CRL distribution point, you must have also included the end-entity or leaf certificate to the client CA bundle. This certificate must have included an HTTP URI under `CRL Distribution Points`, as described in RFC 5280. For example:
18+
+
19+
[source,terminal]
20+
----
21+
Issuer: C=US, O=Example Inc, CN=Example Global G2 TLS RSA SHA256 2020 CA1
22+
Subject: SOME SIGNED CERT X509v3 CRL Distribution Points:
23+
Full Name:
24+
URI:http://crl.example.com/example.crl
25+
----
1626
1727
.Procedure
18-
. Create a config map that is in the `openshift-config` namespace:
28+
. In the `openshift-config` namespace, create a config map from your CA bundle:
1929
+
2030
[source,terminal]
2131
----
22-
$ oc create configmap router-ca-certs-default --from-file=ca-bundle.pem=client-ca.crt -n openshift-config
32+
$ oc create configmap \
33+
router-ca-certs-default \
34+
--from-file=ca-bundle.pem=client-ca.crt \// <1>
35+
-n openshift-config
2336
----
24-
+
25-
[NOTE]
26-
====
27-
The config map data key must be `ca-bundle.pem`, and the data value must be a CA certificate in PEM format.
28-
====
37+
<1> The config map data key must be `ca-bundle.pem`, and the data value must be a CA certificate in PEM format.
2938

3039
. Edit the `IngressController` resource in the `openshift-ingress-operator` project:
3140
+
@@ -34,7 +43,7 @@ The config map data key must be `ca-bundle.pem`, and the data value must be a CA
3443
$ oc edit IngressController default -n openshift-ingress-operator
3544
----
3645

37-
. Add the spec.clientTLS field and subfields to configure mutual TLS:
46+
. Add the `spec.clientTLS` field and subfields to configure mutual TLS:
3847
+
3948
.Sample `IngressController` CR for a `clientTLS` profile that specifies filtering patterns
4049
[source,yaml]

0 commit comments

Comments
 (0)