// Module included in the following assemblies:
//
// assembly-kafka-bridge-tls.adoc

[id='ref-kafka-bridge-tls-{context}']
= TLS support for Kafka connection to the Kafka Bridge

TLS support for Kafka connection is configured in the `tls` property in `KafkaBridge.spec`.
The `tls` property contains a list of secrets with key names under which the certificates are stored.
The certificates must be stored in X509 format.

.An example showing TLS configuration with multiple certificates
[source,yaml,subs=attributes+]
----
apiVersion: {KafkaApiVersionPrev}
kind: KafkaBridge
metadata:
  name: my-bridge
spec:
  # ...
  tls:
    trustedCertificates:
    - secretName: my-secret
      certificate: ca.crt
    - secretName: my-other-secret
      certificate: certificate.crt
  # ...
----

When multiple certificates are stored in the same secret, it can be listed multiple times.

.An example showing TLS configuration with multiple certificates from the same secret
[source,yaml,subs=attributes+]
----
apiVersion: {KafkaApiVersionPrev}
kind: KafkaBridge
metadata:
  name: my-bridge
spec:
  # ...
  tls:
    trustedCertificates:
    - secretName: my-secret
      certificate: ca.crt
    - secretName: my-secret
      certificate: ca2.crt
  # ...
----
