nextcloud / nextcloud/server

Restrict login to "members of those groups" without memberof overlay

Open
#5,620 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop enhancement feature: ldap
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

Hi,
I haven't found any question about it, or any feature request so here is my try:
In the documentation you can find :

If your LDAP server supports the member-of-overlay in LDAP filters, you can define that only users from one or more certain groups are allowed to appear in user listings in Nextcloud. By default, no value will be selected. You may select multiple groups.

If your LDAP server does not support the member-of-overlay in LDAP filters, the input field is disabled. Please contact your LDAP administrator.

It would be easy to implement this feature (I think) without any dependency to the memberof overlay, plus, setup that overlay is not as straightforward as "contacting the LDAP administrator" :D

What it would require is simply look at the specified group membership ? isn't ? like :

  1. retrieve the DN of the user who's trying to connect (already implemented)
  2. Look if the user's DN is a member of the restricted group(s)

So it's basically one extra request to the LDAP server... And we free up the "heavy" constraint to the memberof overlay for openldap users...

Cheers

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the documentation section describing member-of-overlay filtering and trace the existing LDAP login restriction path, including how the user's DN and configured groups are handled. Done means eligible users can be restricted to the specified groups without requiring the memberof overlay, with the behavior verified against the relevant LDAP scenarios.

Written by the indexing model from the issue text.

Assessment

Domain
authentication, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.