All Products
Search
Document Center

E-MapReduce:Enable Kafka in Ranger and configure related permissions

Last Updated:Mar 26, 2026

Enable Apache Ranger authorization for Kafka on your E-MapReduce (EMR) Dataflow cluster to control topic-level access by user or role. Once enabled, Ranger manages Kafka authorization through policies you configure in the Ranger web UI.

Limitations

  • Applies to EMR clusters running a minor version later than EMR V3.45.0.

Note

Kafka on EMR V5.X.X clusters does not support Ranger authentication. This procedure does not apply to those clusters.

Prerequisites

Before you begin, ensure that you have:

Important

When SASL is used for identity authentication, configure logon permissions for the kafka user. EMR Ranger automatically grants all permissions on the default service to the kafka user. Make sure that the kafka user has all required permissions.

To create a custom administrator account, add a configuration item with key super.users on the server.properties tab for the Kafka service. See Manage configuration items.

Enable Kafka authorization in Ranger

Step 1: Go to the Services tab

  1. Log on to the EMR console. In the left-side navigation pane, click EMR on ECS.

  2. On the EMR on ECS page, find the cluster and click Services in the Actions column.

Step 2: Turn on Kafka authorization

  1. On the Services tab, click Status in the Ranger-plugin section.

  2. In the Service Overview section, turn on enableKafka.

  3. In the confirmation message, click OK.

Step 3: Restart Kafka

  1. On the Services tab, click the more icon and select Kafka.

  2. In the upper-right corner, choose More > RESTART.

  3. In the dialog box, set the Execution Reason parameter and click OK.

  4. In the Confirm message, click OK.

Step 4: Verify the Kafka service in Ranger

  1. Access the Ranger web UI. See Access the web UIs of open source components.

  2. Click emr-kafka.

    When Kafka authorization is enabled, Ranger automatically creates a Kafka service named emr-kafka.

    image.png

  3. Configure policies based on your requirements. The following figure shows the default policy configuration.

    image.png

    Important

    The kafka user is the default administrator for Dataflow Kafka. Make sure that the kafka user has all required permissions to ensure that Dataflow Kafka can run as expected.

References