You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by Kapil Thangavelu <ka...@gmail.com> on 2010/04/28 23:50:18 UTC

zkpython problem with settings acls.

Hi Folks,

I'm trying to use zookeeper via zkpython to set an acl on a node, and then
test that acl. I've configured a super user, and create a node with an acl
with the all permission and a digest scheme. However i find that i end up
not being able to touch the node with the credentials as per the configured
acl user, perhaps even more oddly i can't access the node with the super
user (passed in via system property on the cli via
Dzookeeper.DigestAuthenticationProvider.superDigest). Any attempt to acces
the node raises an exception
zookeeper.NoAuthException: not authenticated

i've attached a demonstration script that exhibits the problem. Is there
something i'm doing wrong here or is it an issue with zkpython?

thanks,

Kapil

Re: zkpython problem with settings acls.

Posted by Patrick Hunt <ph...@apache.org>.
Here's a version that seems to work (doesn't fail).

The issue was that the sha1 digest should be run on the credentials, not 
just the password (so sha1(user:pass)).

Please open a JIRA for this (better docs on how to do digest auth, I'm 
sure there's a wealth of other issues that could also be created around 
this code, feel free to open other issues as you see fit).

Patrick

On 04/28/2010 02:50 PM, Kapil Thangavelu wrote:
> Hi Folks,
>
> I'm trying to use zookeeper via zkpython to set an acl on a node, and
> then test that acl. I've configured a super user, and create a node with
> an acl with the all permission and a digest scheme. However i find that
> i end up not being able to touch the node with the credentials as per
> the configured acl user, perhaps even more oddly i can't access the node
> with the super user (passed in via system property on the cli via
> Dzookeeper.DigestAuthenticationProvider.superDigest). Any attempt to
> acces the node raises an exception
> zookeeper.NoAuthException: not authenticated
>
> i've attached a demonstration script that exhibits the problem. Is there
> something i'm doing wrong here or is it an issue with zkpython?
>
> thanks,
>
> Kapil