You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Documentation for downstream TLS client auth
Signed-off-by: Keith Wall <kwall@apache.org>
* Addressing review comments from Paul Mellor
Co-authored-by: PaulRMellor <47596553+PaulRMellor@users.noreply.github.com>
Signed-off-by: Keith Wall <kwall@apache.org>
---------
Signed-off-by: Keith Wall <kwall@apache.org>
Co-authored-by: PaulRMellor <47596553+PaulRMellor@users.noreply.github.com>
Copy file name to clipboardExpand all lines: docs/modules/configuring/con-configuring-client-connections.adoc
+29-13Lines changed: 29 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,9 +8,11 @@ To secure client connections to virtual clusters, configure TLS on the virtual c
8
8
Ensure the certificate matches the names of the virtual cluster's bootstrap and broker addresses. +
9
9
This may require wildcard certificates and Subject Alternative Names (SANs).
10
10
11
-
* Provide the TLS configuration using the tls properties in the virtual cluster's configuration to enable it to present the certificate to clients.
11
+
* Provide the TLS configuration using the `tls` properties in the virtual cluster's configuration to enable it to present the certificate to clients.
12
12
Depending on your certificate format, apply one of the following examples.
13
13
14
+
* For mutual TLS, you may also use the `trust` properties to configure the virtual cluster to use TLS client authentication.
15
+
14
16
NOTE: TLS is recommended on Kafka clients and virtual clusters for production configurations.
15
17
16
18
.Example PKCS #12 configuration
@@ -28,7 +30,7 @@ virtualClusters:
28
30
storeType: PKCS12 # <4>
29
31
# ...
30
32
----
31
-
<1> PKCS #12 store for the public CA certificate of the virtual cluster.
33
+
<1> PKCS #12 store containing the private-key and certificate/intermediates of the virtual cluster.
32
34
<2> Password to protect the PKCS #12 store.
33
35
<3> (Optional) Password for the key. If a password is not specified, the keystore’s password is used to decrypt the key too.
34
36
<4> (Optional) Keystore type. If a keystore type is not specified, the default JKS (Java Keystore) type is used.
@@ -47,23 +49,37 @@ virtualClusters:
47
49
# …
48
50
----
49
51
<1> Private key of the virtual cluster.
50
-
<2> Public CA certificate of the virtual cluster.
52
+
<2> Public certificate of the virtual cluster.
51
53
<3> (Optional) Password for the key.
52
54
53
-
If required, configure the `insecure` property to disable trust and establish insecure connections with any Kafka Cluster, irrespective of certificate validity.
54
-
However, this option is only intended for use in development and testing environments where proper certificates are hard to obtain and manage.
55
+
You can configure the virtual cluster to require that clients present a certificate for authentication.
56
+
The virtual cluster verifies that the client's certificate is signed by one of the CA certificates contained in a trust store.
57
+
If verification fails, the client's connection is refused.
55
58
56
-
.Example to enable insecure TLS
59
+
.Example to configure TLS client authentication using PKCS12 trust store
57
60
[source,yaml]
58
61
----
59
62
virtualClusters:
60
63
demo:
61
-
targetCluster:
62
-
bootstrap_servers: myprivatecluster:9092
63
-
tls:
64
-
trust:
65
-
insecure: true # <1>
66
-
#...
64
+
tls:
65
+
key:
66
+
# ...
67
+
trust:
68
+
storeFile: <path>/trust.p12 #1 <1>
69
+
storePassword:
70
+
passwordFile: <path>/trust.password # <2>
71
+
storeType: PKCS12 # <3>
72
+
trustOptions:
73
+
clientAuth: REQUIRED # <4>
67
74
# …
68
75
----
69
-
<1> Enables insecure TLS.
76
+
<1> PKCS #12 store containing CA certificate(s) used to verify that the client's certificate is trusted.
77
+
<2> (Optional) Password to protect the PKCS #12 store.
78
+
<3> (Optional) Keystore type. If a keystore type is not specified, the default JKS (Java Keystore) type is used.
79
+
<4> Client authentication mode.
80
+
If set to `REQUIRED`, the client must present a valid certificate.
81
+
If set to `REQUESTED`, the client is requested to present a certificate. If presented, the certificate is validated. If the client chooses not to present a certificate the connection is still allowed.
82
+
If set to `NONE`, client authentication is disabled.
83
+
84
+
NOTE: The client's identity, as established through TLS client authentication, is currently not relayed to the target cluster.
85
+
For more information, see the https://github.com/kroxylicious/kroxylicious/issues/1637[related issue].
0 commit comments