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

Add LDAP user_filter and group_filter config settings #60

Closed
thomas-pike opened this issue Nov 7, 2021 · 12 comments
Closed

Add LDAP user_filter and group_filter config settings #60

thomas-pike opened this issue Nov 7, 2021 · 12 comments
Assignees

Comments

@thomas-pike
Copy link
Collaborator

If users and groups are in the same subtree in LDAP, very confusing things can happen (eg. lines 44-52 of views/server.php will find a "user" that is actually a group when trying to add a group as an admin of a server).

If we add some optional user_query and group_query attributes to filter them separately then we can avoid this problem and support a greater variety of LDAP structures.

@thomas-pike thomas-pike mentioned this issue Nov 7, 2021
@thomas-pike thomas-pike self-assigned this Nov 7, 2021
@thomas-pike
Copy link
Collaborator Author

Perhaps user_filter and group_filter would be better names.

@thomas-pike thomas-pike changed the title Add LDAP user_query and group_query config settings Add LDAP user_filter and group_filter config settings Nov 7, 2021
@thomas-pike
Copy link
Collaborator Author

group_filter isn't actually needed, since we never directly fetch groups (instead fetching them from the user's group_member attribute).

@thomas-pike
Copy link
Collaborator Author

group_filter isn't actually needed, since we never directly fetch groups (instead fetching them from the user's group_member attribute).

This is not entirely true. Although we do fetch based on the member attribute, we do still fetch from groups. While it shouldn't be necessary, it would be good to add it for safety anyway.

@wastez
Copy link

wastez commented Nov 7, 2021

Now i get everywhere access denied.

@wastez
Copy link

wastez commented Nov 7, 2021

Forget it. Sorry.

@wastez
Copy link

wastez commented Nov 7, 2021

Ok, i get everywhere access denied right now if a user filter is set.

@thomas-pike
Copy link
Collaborator Author

Is your user filter correct? If it doesn't match any users that would be likely to cause all users to be deactivated.

@wastez
Copy link

wastez commented Nov 7, 2021

Ok with user_filter = "(objectClass=user)" it is working.

@wastez
Copy link

wastez commented Nov 7, 2021

Thank you very much ;)

@wastez
Copy link

wastez commented Nov 7, 2021

And the other problem at first login?

@thomas-pike
Copy link
Collaborator Author

Ok, glad we finally got that sorted :) Now just to fix that last bug...

@wastez
Copy link

wastez commented Nov 7, 2021

Really great, thanks for spending your time.

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

2 participants