// This assembly is included in the following assemblies:
//
// assembly-configuring-kafka-listeners.adoc

[id='assembly-kafka-broker-listener-network-policies-{context}']
= Network policies

{ProductName} automatically creates a `NetworkPolicy` resource for every listener that is enabled on a Kafka broker.
By default, a `NetworkPolicy` grants access to a listener to all applications and namespaces.

If you want to restrict access to a listener at the network level to only selected applications or namespaces, use the `networkPolicyPeers` field.

Use network policies in conjunction with authentication and authorization.

Each listener can have a different `networkPolicyPeers` configuration.

include::../modules/ref-kafka-listener-network-policy-example.adoc[leveloffset=+1]

include::../modules/proc-restricting-access-to-listeners-using-network-policies.adoc[leveloffset=+1]
