How to work with authentication in Zookeeper?
In this article, I tried to collect all my experience and add links which I used to set up authentication in Zookeeper. First of all, you need to run Zookeeper (ZK) with the password for "super" user. We need to use DigestAuthenticationProvider for this. Need to generate digest of a given password and after that, you can run Zookeeper with option -DSERVER_JVMFLAGS=-Dzookeeper.DigestAuthenticationProvider.superDigest=super:<password digest> How to generate digest of a given password. For generating digest you need to do next: /bin/java -cp "/opt/zookeeper-3.4.9.jar /opt/lib/slf4j-api-1.6.1.jar" org.apache.zookeeper.server.auth.DigestAuthenticationProvider super:pass (by link , you can find a slightly different way). The output will be: super:CiymZRNkXx0HJFQhdpGmqJqKuHM= Please note: this is example and digest may not match the password. After that, you need to set SERVER_JVMFLAGS and restart Zookeeper: export SERVER_JVMFLAGS="-Dzookeeper....

Комментарии
Отправить комментарий