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

Attributes not used when search is anonymous

Open
#191 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

We have configured our LDAP module of our Matrix server like this :

modules:
  - module: "ldap_auth_provider.LdapAuthProviderModule"
    config:
      enabled: true
      mode: simple
      uri: 
         - "ldaps://xxx:636"
      validate_cert: true
      base: "ou=users,dc=xxx.internal,dc=local"
      attributes:
        uid: "uid"
        mail: "mail"
        name: "cn"
        
      filter: "(&(|(objectclass=xxx))(|(memberof=cn=user,ou=groups,dc=xxx.internal,dc=local)))"
      group_filter: "(&(|(objectclass=xxx)))"
      allow_empty_password: false

However we observe that uid, mail and cn are not retrieved from the LDAP server, while they are retrieved when we set bind_dn and bind_password.

Is it expected?
Is it possible to do anonymous requests and still retrieve attributes for mapping?

Thank you,

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 by examining the LDAP authentication module's handling of anonymous searches versus searches using bind_dn and bind_password, using the configuration in the issue as the reproduction case. Determine whether mapped uid, mail, and cn attributes are expected to be returned anonymously, and document or test the supported behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
authentication
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.