Verify the ZooKeeper authentication
After enabling Kerberos authentication and restarting the ZooKeeper cluster, you can verify that the ZooKeeper authentication is working correctly.
-
Start the ZooKeeper client, passing to it the name of a ZooKeeper server:
zookeeper-client -server fqdn.example.com:port -
From the ZooKeeper CLI, create a protected
znodeusing your ZooKeeper client principal.create /znode1 znode1data sasl:zkcli:cdwraCloudera Manager by default maps the Kerberos principal to its short name by setting two parameters in ZooKeeper's service configuration file zoo.cfg:kerberos.removeHostFromPrincipal=true kerberos.removeRealmFromPrincipal=trueWith the help of above settings, for example, the client principal
zkcli/myhost@EXAMPLE.COMwill be authenticated in ZooKeeper aszkcli. -
Verify the znode created and the ACL is set correctly:
getAcl/znode1ThegetAclcommand returns the znode's scheme and permission values. - Verify that the znode's scheme and permissions values are as expected.
