Client authentication and ACL permissions to znode of zookeeper? -


client authentication , acl permissions znode of zookeeper?

when client connect zookeeper create znode acl property (i.e ids.auth_ids) how authentication user access data form znode of zookeeper ?

zookeeper command line:

you must execute "addauth" command first when access path has been setacl.

addauth digest u1:p1 

in zookeeper client must run addauthinfo api first.

    try {         zookeeper zk = new zookeeper("ip:2181", 10000, null);         string auth = "u1:p1";         zk.addauthinfo("digest", auth.getbytes());         zk.getchildren("/data", null);     } catch (ioexception e) {         e.printstacktrace();     } catch (keeperexception e) {         e.printstacktrace();     } catch (interruptedexception e) {         e.printstacktrace();     } 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -