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
znode
using your ZooKeeper client principal.create /znode1 znode1data sasl:zkcli:cdwra
Cloudera 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=true
With the help of above settings, for example, the client principal
zkcli/myhost@EXAMPLE.COM
will be authenticated in ZooKeeper aszkcli
. -
Verify the znode created and the ACL is set correctly:
getAcl/znode1
ThegetAcl
command returns the znode's scheme and permission values. - Verify that the znode's scheme and permissions values are as expected.