ACL with external authentication

109 views
Skip to first unread message

Stephen Price

unread,
Apr 30, 2013, 3:06:58 PM4/30/13
to rhod...@googlegroups.com
I was using Mercurial's ACL extension just fine with RhodeCode's built-in LDAP authentication, but now after switching to external authentication (LDAP module in nginx), I get errors like this:
remote: error: pretxnchangegroup.acl hook failed: acl: user "" not allowed on branch "production"

Is there something else I need to do to expose the remote user to Mercurial?

Marcin Kuzminski

unread,
May 6, 2013, 7:46:50 AM5/6/13
to rhod...@googlegroups.com
Hi,

So you're using the proxy-pass using nginx LDAP module. And you added extra hook into rhodecode_ui table ? That triggers this error ?
I have a feeling that mercurial takes user for hooks from some environ variable that is not passed when using external auth. Would need to digg into hg code to check that. Is REMOTE_USER header there when using nginx+LDAP ?

Marcin Kuzminski


--
You received this message because you are subscribed to the Google Groups "rhodecode" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rhodecode+...@googlegroups.com.
To post to this group, send email to rhod...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Stephen Price

unread,
May 6, 2013, 1:07:14 PM5/6/13
to rhod...@googlegroups.com
Yup, using this module:

I'm using a repository-specific hgrc file with the acl extension enabled, and requires a specific group membership when publishing changes to a specific branch (also tried requiring specific users). When I try to do "hg push" on that branch, it shows the original error I posted.

I've verified that $REMOTE_USER is set correctly, as it gets entered in the access log. Also have this in nginx's config:
 proxy_set_header X-Forwarded-User $remote_user;
Reply all
Reply to author
Forward
0 new messages