element-hq / element-hq/synapse
Changes of displayname from auth providers are not reflected in synapse
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
This issue has been migrated from [#4708](https://github.com/matrix-org/synapse/issues/4708).
---
**Description:**
I'm using mxisd with matrix-synapse-rest-auth as password provider to sync users from LDAP/AD.
in mxisd.yaml I have:
```
ldap:
enabled: true
connection:
host: 'xxx'
port: 389
bindDn: 'CN=xxx,OU=xxx,DC=xxx,DC=xxx'
bindPassword: 'xxx'
baseDNs:
- 'OU=xxx,DC=xxx,DC=xxx'
attribute:
name: 'cn'
```
and in homserver.yaml
```
password_providers:
- module: "rest_auth_provider.RestAuthProvider"
config:
endpoint: "http://localhost:8090"
policy:
registration:
profile:
name: true
login:
profile:
name: true
```
When logging in with riot-web I can see the name correctly changing on every login in the top left corner whether I set the name: attribute in myisd.yaml to either `'cn'` or `'displayName'`.
Also `curl https://matrix.domain.local/_matrix/client/r0/profile/%40matrixid%3Adomain.local` shows the correct `"displayname"`.
However in the riot-web/matrix profile the "Display Name" is not applied and/or changing accordingly, so in the rooms I already joined I still appear with the matrixid:server.xxx instead of the correct name: transferred by mxisd via LDAP.
In our organization it's quite common for names to change, e.g. because of marriage and thus it would be nice to have an option for synapse to force syncing the displayname to all rooms so users don't need to worry about, don't need to be instructed about and more importantly not making a support request about their old name still being shown.
For reference: https://github.com/kamax-matrix/matrix-synapse-rest-auth/issues/6
Contributor guide
Research direction
Start by tracing how the REST password provider and the Matrix profile endpoint update a user's display name, then examine how existing room membership profiles are represented. Done means a provider-supplied display-name change is consistently reflected for the user in rooms already joined, with behavior and configuration clarified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- authentication, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100