-
Notifications
You must be signed in to change notification settings - Fork 118
Open
Description
Version
docker.io/wheelybird/luminary:v2.1.0
Description
I am trying to use luminary for a existing LDAP server. Users in the admin group (useradmins) are unable to access /account_manager (redirected to /unauthorized).
Output of /run_checks
- The RFC2307BIS schema appears to be available.
- The group OU (ou=groups,dc=mydc) is present.
- The user OU (ou=people,dc=mydc) is present.
- The LDAP account administrators group (useradmins) is present.
- The LDAP account administrators group (useradmins) isn't empty.
LDAP search result for cn=useradmins (some values altered for privacy)
dn: cn=useradmins,ou=groups,dc=mydc
objectClass: posixGroup
objectClass: top
objectClass: groupOfNames
cn: useradmins
description: The Admins for the Users
member: uid=testadmin,ou=internal,ou=People,dc=mydc
member: uid=testadmin2,ou=internal,ou=People,dc=mydc
gidNumber: 2045
displayName: useradmins
Debugging logs:
Able to bind as testadmin: dn is uid=testadmin,ou=internal,ou=people,dc=mydc and account ID is testadmin
...
Auto-setting group_membership_uses_uid to FALSE
...
Session: user testadmin validated (IS_ADMIN=), sent orf_cookie to the browser.
Root cause
In ldap_is_group_member() (ldap_functions.inc.php):
- The function checks if the
$usernameappears in the member attributes of a group. - It is called during login, to check if the user is in the admins group.
- In the function, the
$LDAP['user_dn']is appended to the$username, to match what is expected in the member attribute when using the RFC2307BIS schema. - However,
$LDAP['user_dn']is onlyou=people,dc=mydc, and therefore missing theoulayers betweenou=peopleand the user leaf. - Therefore, the function searches the admin group for
uid=testadmin,ou=people,dc=mydcinstead ofuid=testadmin,ou=internal,ou=people,dc=mydc.
Question
Is Luminary generally assuming that all users exist directly under ou=people? Or is this issue specific to ldap_is_group_member()?
Possible Resolution
- If this is a general assumption that users must be directly under
ou=people, document it. - Otherwise, if the issue is specific to
ldap_is_group_member(), modifywww/login/index.php(line 29) to haveldap_auth_username()return the full dn (result[0]['dn']), which can then be supplied toldap_is_group_member()in line 30.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels