Allow using a separate claim as name
Closed this issue · 2 comments
- Right now it seems the plugin does use
sonar.auth.oidc.loginStrategy
for both thelogin
andname
of a user (so in my case here in GitHub it would bemfriedenhagen
both times). - It would be great if one could provide another claim for
name
, maybe even a claim combination (${given_name} ${family_name}
)
Right now it seems the plugin does use
sonar.auth.oidc.loginStrategy
for both thelogin
andname
of a user (so in my case here in GitHub it would bemfriedenhagen
both times).
For a sonar.auth.oidc.loginStrategy
of Preferred username
the login
and name
are the same (the preferred username) if the identity provider is not providing the claim name
or the provided claims name
and preferred_username
are identical. Further details can be found here.
Which identity provider are you using? Is there any chance you can provide a SonarQube web.log
with sonar.log.level.web
set to DEBUG
as described here?
It would be great if one could provide another claim for
name
, maybe even a claim combination (${given_name} ${family_name}
)
This kind of claim mapping is expected to be done by the identity provider, e.g. like Keycloak does with it's OIDC token and SAML assertion mappings.
There must be a reason why your identity provider is not providing the claim name
according to the OIDC spec (... name | string | End-User's full name in displayable form including all name parts, possibly including titles and suffixes, ordered according to the End-User's locale and preferences. ...).
Thanks for the quick answer and the links. The IdP I use is developed in-house, I will talk about this problem with the team in charge and refer them to the spec you referenced.