[ 
https://issues.apache.org/jira/browse/SOLR-18323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18099427#comment-18099427
 ] 

Philipp Trulson commented on SOLR-18323:
----------------------------------------

I gave it a try to fix, but I'm a bit unsure which approach to take. 

One way would be to fetch it from / set it from the app.js as the correct 
username is shown in the {{Security}} box on the admin landing page, so the 
value is there already.

The other one would be to send the {{principalClaim}} value to the frontend so 
it can pick the right claim itself (see 
[here|https://github.com/apache/solr/commit/913f3b7ea6a2f743e51eac6c8b15371163d17d3d]).
 Does anybody have an opinion which solution would be preferable?

> When using JWTAuthPlugin, UI is always showing "sub" value in logout button
> ---------------------------------------------------------------------------
>
>                 Key: SOLR-18323
>                 URL: https://issues.apache.org/jira/browse/SOLR-18323
>             Project: Solr
>          Issue Type: Bug
>          Components: Admin UI, Authentication
>    Affects Versions: 10.0
>            Reporter: Philipp Trulson
>            Priority: Minor
>
> We just used JWTAuthPlugin for the first time and noticed that in the legacy 
> Admin UI it now says "Logout 907c9070-b23f-422e-b730-279aa0cf3426" instead of 
> the actual username, even though we set {{"principalClaim" = 
> "preferred_username"}} in the config. In the Audit logger logs this works 
> fine, I can see my username there, but in the UI it just breaks the design. 
> For most OIDC providers {{sub}} is a stable value that never changes, while 
> email addresses and usernames can change, so it should never be used in a UI 
> IMHO. A better approach would be to check for the {{principalClaim}} value in 
> [login.js|https://github.com/apache/solr/blob/releases/solr/10.0.0/solr/webapp/web/js/angular/controllers/login.js#L150]
>  and then show the respective value.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to