// Module included in the following assemblies:
//
// assembly-kafka-authentication-and-authorization.adoc

[id='ref-kafka-authentication-{context}']
= Authentication

Authentication is configured as part of the xref:assembly-configuring-kafka-broker-listeners-{context}[listener configuration] in the `authentication` property.
The authentication mechanism is defined by the `type` field.

When the `authentication` property is missing, no authentication is enabled on a given listener.
The listener will accept all connections without authentication.

Supported authentication mechanisms:

* TLS client authentication
* SASL SCRAM-SHA-512
* xref:assembly-oauth-authentication_str[{oauth} token based authentication]

== TLS client authentication

TLS Client authentication is enabled by specifying the `type` as `tls`.
The TLS client authentication is supported only on the `tls` listener.

.An example of `authentication` with type `tls`
[source,yaml,subs="attributes+"]
----
# ...
authentication:
  type: tls
# ...
----
