Setting up Ranger authorization for Cloudera Streams Messaging
Set up Apache Ranger authorization for Kafka, Kafka Connect, and Schema Registry after deploying Cloudera Streams Messaging to grant end users access, both directly and through Cloudera Surveyor.
After deployment, Ranger allows only the internal communication that Cloudera Streams Messaging requires. The deployment creates default Ranger policies for this communication. The Ranger policy manager users configured during deployment also have full access, regardless of policies. Other end users and the client applications that run as those users have no access to Kafka, Kafka Connect, or Schema Registry. Cloudera Surveyor shows no data, and management actions, such as creating topics, are not possible. You must onboard end users by granting them access in Ranger.
Kafka, Kafka Connect, and Schema Registry each have their own Ranger service, which holds all of their policies, including the default policies created during deployment. Ranger policies can be configured in many ways. The following steps are an example of a basic configuration. You add a single user to every default policy in each of the three Ranger services, which gives that user full access to Kafka, Kafka Connect, and Schema Registry. You can repeat the steps for every user who needs full access, or configure access with your own policies instead.
The default policies differ between the Ranger services, because Kafka, Kafka Connect, and Schema Registry support different resources and permissions. Policy manager users are configured separately for each Ranger service during deployment. If you followed the recommendations in the deployment guide, the same users manage all three Ranger services. However, the users can differ. In that case, sign in as the matching policy manager user before you configure each Ranger service.
-
You deployed and have access to an instance of Cloudera Streams Messaging, if not see Deploying Cloudera Streams Messaging.
-
You know the users configured in the Ranger Policy Manager Users field of the Kafka, Kafka Connect, and Schema Registry engines, and you can sign in to Anywhere Cloud Console as these users. In typical deployments, the same users are configured for all three engines.
-
You know the Anywhere Cloud Console login username of the user that you want to grant access to.
- Sign in to Anywhere Cloud Console as a Ranger policy manager user.
-
Open the Apache Ranger Admin UI.
- In Anywhere Cloud Console, go to .
- Find and click the entry for your Cloudera Unified Data Fabric instance.
-
In the Endpoints table, click the URL in the
udfAuthzUIrow to open the Ranger Admin UI.
-
Add the user to the default Kafka policies.
-
Add the user to the default Kafka Connect policies.
-
Add the user to the default Schema Registry policy.
The user has full access to Kafka, Kafka Connect, and Schema Registry, both through Cloudera Surveyor and through client applications that use credentials the user requested. Policy changes might take a few minutes to appear in Cloudera Surveyor.
-
Access Cloudera Surveyor as the user that you added to the policies. In Anywhere Cloud Console, go to .
The name of the Cloudera Surveyor instance starts with the Blueprint Instance Name that you specified when you deployed Cloudera Streams Messaging.
If the setup is successful, you see your Kafka cluster when you go to
Clusters, and your Kafka Connect cluster when you go to
Connect Clusters. On a new deployment, the clusters do not have topics or connectors yet. When you go to
Schemas, the Schemas List is empty because no schemas are registered yet.
To learn more about Cloudera Surveyor, see Get started with Cloudera Surveyor.
-
Connect Kafka clients to your cluster. See Connecting Kafka clients.
-
Learn about the authorization model and Ranger permissions of Kafka, Kafka Connect, and Schema Registry. See the following resources:
-
Learn more about managing Ranger policies. See Policy management and audit with Ranger.
