Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Group validation doesn't work #189

Open
ggnix opened this issue Feb 19, 2015 · 5 comments
Open

Group validation doesn't work #189

ggnix opened this issue Feb 19, 2015 · 5 comments

Comments

@ggnix
Copy link

ggnix commented Feb 19, 2015

Here's WEBrick output:

    LDAP: LDAP dn lookup: uid=my_name
    LDAP: LDAP search for login: uid=my_name
    LDAP: LDAP search yielded 2 matches
    LDAP: Authorizing user uid=my_name,cn=users,cn=accounts,dc=aws,dc=company,dc=net
    LDAP: Not authorized because not in required groups.
    In my devise.rb file config.ldap_check_group_membership & config.ldap_ad_group_check are set as true.

ldap.yml:

authorizations: &AUTHORIZATIONS
allow_unauthenticated_bind: false
group_base: cn=groups,cn=accounts,dc=aws,dc=company,dc=net
required_groups:
- cn=noc,cn=groups,cn=accounts,dc=aws,dc=company,dc=net

Using ldapsearch command I checked that my ldap tree looks like that:

noc, groups, accounts, aws.company.net
dn: cn=noc,cn=groups,cn=accounts,dc=aws,dc=company,dc=net
member: uid=b..,cn=users,cn=accounts,dc=aws,dc=company,dc=net
member: uid=my_name,cn=users,cn=accounts,dc=aws,dc=company,dc=net
member: uid=i...,cn=users,cn=accounts,dc=aws,dc=company,dc=net
member: uid=n...,cn=users,cn=accounts,dc=aws,dc=company,dc=net
member: uid=s...,cn=users,cn=accounts,dc=aws,dc=company,dc=net
member: uid=e...,cn=users,cn=accounts,dc=aws,dc=company,dc=net
objectClass: top
objectClass: groupofnames
objectClass: nestedgroup
objectClass: ipausergroup
objectClass: ipaobject
objectClass: posixgroup
objectClass: ipantgroupattrs
description: noc operators group
cn: noc

Please can somebody point out what am I doing wrong? Thanks in advance!

@PritiKumr
Copy link

Did you get to solve the issue? Ran into the same :(

@ggnix
Copy link
Author

ggnix commented Mar 8, 2015

No, it seems like gem issue. Used net-ldap library and it worked

@jcoyne
Copy link

jcoyne commented Sep 14, 2015

I think this might be because your LDAP has groupofnames where devise-ldap expects groupOfUniqueNames

@jcoyne
Copy link

jcoyne commented Sep 14, 2015

Here's the code where its searching for uniqueMember rather than member (which is what you need):
https://github.com/cschiewek/devise_ldap_authenticatable/blob/master/lib/devise_ldap_authenticatable/ldap/connection.rb#L173

@jcoyne
Copy link

jcoyne commented Sep 14, 2015

This story is the same as #185

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants