mTLS
This authentication method is commonly used with an EventHub such as Kafka.
Synopsis
Section titled “Synopsis”# TLS secretapiVersion: v1kind: Secretmetadata: name: tls-secretdata: ca.crt: <PEM file base64-encoded> tls.crt: <PEM file base64-encoded> tls.key: <PEM file base64-encoded># Credentials definitionapiVersion: kannika.io/v1alphakind: Credentialsmetadata: name: mtlsspec: mTls: # Optional description description: "mTLS credentials" # The certificate must be in PEM format. caCertificatePemFrom: secretKeyRef: name: tls-secret key: ca.crt # The certificate must be in PEM format. certificatePemFrom: secretKeyRef: name: tls-secret key: tls.crt # The private key must be in PEM format. Only PKCS#8 is supported. privateKeyPemFrom: secretKeyRef: name: tls-secret key: tls.key # Optional privateKeyPasswordFrom: secretKeyRef: name: tls-key-password key: passwordWhen using mTLS, the client’s certificate and key must be loaded in one or more secrets, and then be used in the Credentials definition.
The CA’s certificate may either be:
- unspecified, in which case OpenSSL will scan common directories;
- explicitly set using a secret in PEM format with
caCertificatePemFrom.
Note that all certificates and keys must be in PEM format, and only PKCS#8 is supported for private keys.