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

Apply group mappings to groupOfUniqueNames LDAP groups too #136

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

chuhn
Copy link
Contributor

@chuhn chuhn commented Nov 12, 2018

This patch adds mapping support for groupOfUniqueNames groups in LDAP authentication.

Example:

  1. The authenticated user is a member of the group cn=PREFIX_ADMIN,cn=Groups,dc=example,dc=com.
  2. The following mapping is defined:
    $conf['auth']['ldap']['mapping']['grps'] = array('cn'=>'/PREFIX_(.+)/i');
  3. The user will be member of the ONA group ADMIN

Additionally there is a small tweak to allow email addresses as login names.

@chuhn
Copy link
Contributor Author

chuhn commented Nov 12, 2018

What's still unclear to me is the assignent of $g++ which I copied from

$info[$localkey][$match[1]] = $g++;

AFAICT the correct groups.id for the given group name should looked up and assigned here instead ie.

ona_get_record('groups', "name like '{$match[1]}'")

Another feature I'd be interested in would be to deny access to users that are not members in any group known to ONA.
From my observation they are implicitly added to the default group at the moment.

@chuhn
Copy link
Contributor Author

chuhn commented Mar 5, 2024

Ping?

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

Successfully merging this pull request may close these issues.

1 participant