matrix-org / matrix-org/matrix-synapse-ldap3

room/space membership by LDAP groups?

Open
#166 4 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
139
Forks
47
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**
I'm not sure if this is possible for an auth provider, but it would be very useful to add and remove users to/from rooms and spaces based on their LDAP groups.
This way it would be possible to create spaces and rooms for every department or team and they would be automatically assigned by the group membership of the user. And if the user switches to an other department/team, he would be removed from the old rooms and added to the new ones without any administrative tasks on the synapse end of things.

**Describe the solution you'd like**
a configurable list of mappings based on the CN of the group and the room name or ID, something like this (with one or more rooms per group):
```yaml
modules:
- module: "ldap_auth_provider.LdapAuthProviderModule"
config:
enabled: true
[...]
room_mapping:
- cn: "CN=some,CN=group,DC=example,DC=com"
rooms: "room 1"
- cn: "CN=some,CN=other,CN=group,DC=example,DC=com"
rooms: "room 2"
- cn: "CN=yet,CN=another,CN=group,DC=example,DC=com"
rooms:
- "room 1"
- "room 2"
[...]
```
**Describe alternatives you've considered**
I considered using the maubot plugin here: https://github.com/davidmehren/maubot-ldap-inviter but it has 2 mayor drawbacks: it doesn't remove users from rooms and it has to be invoked manually by command.

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

No project files, tests, or entry points are named in the issue. Start by reviewing the LDAP auth provider module and the referenced maubot-ldap-inviter alternative to understand current capabilities. Done would mean configurable LDAP-group-to-room mappings that automatically add users and remove them when group membership changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
authentication, authorization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.