Skip to content

Commit bcb2db5

Browse files
k-wallPaulRMellor
andauthored
Documentation for downstream TLS client auth (kroxylicious#1645)
* 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>
1 parent ed81c90 commit bcb2db5

File tree

2 files changed

+30
-14
lines changed

2 files changed

+30
-14
lines changed

docs/modules/configuring/con-configuring-client-connections.adoc

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ To secure client connections to virtual clusters, configure TLS on the virtual c
88
Ensure the certificate matches the names of the virtual cluster's bootstrap and broker addresses. +
99
This may require wildcard certificates and Subject Alternative Names (SANs).
1010

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.
1212
Depending on your certificate format, apply one of the following examples.
1313

14+
* For mutual TLS, you may also use the `trust` properties to configure the virtual cluster to use TLS client authentication.
15+
1416
NOTE: TLS is recommended on Kafka clients and virtual clusters for production configurations.
1517

1618
.Example PKCS #12 configuration
@@ -28,7 +30,7 @@ virtualClusters:
2830
storeType: PKCS12 # <4>
2931
# ...
3032
----
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.
3234
<2> Password to protect the PKCS #12 store.
3335
<3> (Optional) Password for the key. If a password is not specified, the keystore’s password is used to decrypt the key too.
3436
<4> (Optional) Keystore type. If a keystore type is not specified, the default JKS (Java Keystore) type is used.
@@ -47,23 +49,37 @@ virtualClusters:
4749
# …
4850
----
4951
<1> Private key of the virtual cluster.
50-
<2> Public CA certificate of the virtual cluster.
52+
<2> Public certificate of the virtual cluster.
5153
<3> (Optional) Password for the key.
5254

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.
5558

56-
.Example to enable insecure TLS
59+
.Example to configure TLS client authentication using PKCS12 trust store
5760
[source,yaml]
5861
----
5962
virtualClusters:
6063
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>
6774
# …
6875
----
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].

docs/modules/configuring/ref-configuring-proxy-example.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ adminHttp: # <1>
3939
storePassword:
4040
passwordFile: /opt/proxy/server/keystore-password/storePassword
4141
filters: # <11>
42-
- type: EnvelopeEncryption # <12>
42+
- type: RecordEncryption # <12>
4343
config: # <13>
4444
kms: VaultKmsService
4545
kmsConfig:

0 commit comments

Comments
 (0)