Zookeeper_ACL

getAcl path permission to view a node's

Set permissions
1 world manner
setAcl <path> world: anyone: <acl>
e.g. setAcl / node1 world: anyone: cdrwa

2 ip embodiment
setAcl <path> ip: <ip >: <acl>
e.g. # Set IP: 192.168.100.1 has all privileges, ip The wildcard rule described as 192.168.0.0/16 * * * Match 192.168..
SetAcl / IP node2 : 192.168.100.1: cdrwa

3 auth embodiment
addauth digest <user>: <password > # add authenticated user
setAcl <path> auth: <user >: <acl>
e.g. addauth digest zhao: 123456 # add authenticated user (login user)
setAcl / test2 the auth: Zhao: cdrwa

4 Digest embodiment
does not require user login, password encryption setting permissions
setAcl <path> digest: <user >: <password>: <acl>
password is herein after BASE64 ciphertext SHA1 and processing, in the following command can SHELL calculation:
echo -n <the User>: <password> | OpenSSL dgst -binary -sha1 | OpenSSL Base64

For example: calculating a first ciphertext
echo -n Zhao: 123456 | OpenSSL dgst -binary -sha1 | OpenSSL Base64
E + fGhah6NKilpckg4lqkDPi / IPs =
Create / test1 "test1"
setAcl / test1 Digest: Zhao: E + fGhah6NKilpckg4lqkDPi / = IPs: cdrwa


setAcl /test1 digest:diyo:6w1e9um64Rwx0nMBmr5IYSZCzTc=:cdrwa
6w1e9um64Rwx0nMBmr5IYSZCzTc=

get / test1 # without permission
addauth digest zhao: 123456 # add authenticated users
get / test1 # successfully read

 

Guess you like

Origin www.cnblogs.com/Diyo/p/11128390.html
ACL