dex
dex copied to clipboard
Crowd connector does not return display name
Preflight Checklist
- [X] I agree to follow the Code of Conduct that this project adheres to.
- [X] I have searched the issue tracker for an issue that matches the one I want to file, without success.
- [X] I am not looking for support or already pursued the available support channels without success.
Version
2.33.0
Storage Type
SQLite
Installation Type
Official container image
Expected Behavior
Expected to get the user's display name after logging in via the Crowd connector in the name claim as also described in the "Custom Claims" documentation: https://dexidp.io/docs/custom-scopes-claims-clients/#custom-claims
Actual Behavior
Crowd connector returns the username instead of the display name in the name claim, e.g.: johndoe instead of John Doe
Steps To Reproduce
- Use official container
- Use latest Crowd release (5.0.2 at the time of writing)
- Create crowd connection and static client
- Login
- check the
/userinfoendpoint. - user claim shows username in the
nameclaim instead of the display name
Additional Information
Got:
{
"iss": "https://localhost:5556",
"sub": "<hash>",
"aud": "testclient",
"exp": 1661942538,
"iat": 1661856138,
"at_hash": "<hash>",
"email": "[email protected]",
"email_verified": true,
"groups": [
"group"
],
"name": "johndoe",
"preferred_username": "johndoe"
}
Expected:
{
"iss": "https://localhost:5556",
"sub": "<hash>",
"aud": "testclient",
"exp": 1661942538,
"iat": 1661856138,
"at_hash": "<hash>",
"email": "[email protected]",
"email_verified": true,
"groups": [
"group"
],
"name": "John Doe",
"preferred_username": "johndoe"
}
Configuration
issuer: https://localhost:5556
storage:
type: sqlite3
config:
file: dex.db
web:
http: 0.0.0.0:5556
telemetry:
http: 0.0.0.0:5558
expiry:
signingKeys: "6h"
idTokens: "24h"
oauth2:
skipApprovalScreen: true
alwaysShowLoginScreen: false
staticClients:
- id: testclient
redirectURIs:
- 'http://localhost:8000/oidc/callback'
name: 'TestClient'
public: False
secret: '<redacted>'
connectors:
- type: atlassian-crowd
id: crowd
name: Crowd
config:
baseURL: https://<baseurl>/crowd
clientID: <client>
clientSecret: <secret>
usernamePrompt: username
preferredUsernameField: name
Logs
Not relevant
The correct attribute is display-name rather than name (documentation):
$ curl -q -u application:password -H 'Accept: application/json' https://crowd.example.com/crowd/rest/usermanagement/1/user\?username\=johnsmith | jq
{
"expand": "attributes",
"link": { ... },
"name": "johnsmith",
"password": { ... },
"key": ...,
"active": true,
"attributes": { ... },
"first-name": "John",
"last-name": "Smith",
"display-name": "John Smith",
"email": "[email protected]",
"created-date": 1575417360000,
"updated-date": 1662012304000
}
https://github.com/dexidp/dex/blob/221ff841bc1113b51af1e7c4ed410a76d31f73a7/connector/atlassiancrowd/atlassiancrowd.go#L56-L61