Bug 1314449

Summary: User ID displayed instead of user name when using RH-SSO
Product: [Retired] JBoss BRMS Platform 6 Reporter: Jiri Locker <jlocker>
Component: Business CentralAssignee: Roger Martínez <romartin>
Status: CLOSED EOL QA Contact: Jiri Locker <jlocker>
Severity: urgent Docs Contact: Tomas 'Sheldon' Radej <tradej>
Priority: urgent    
Version: 6.3.0CC: kverlaen, lpetrovi
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-27 19:03:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
User menu none

Description Jiri Locker 2016-03-03 16:07:13 UTC
Created attachment 1132854 [details]
User menu

Description of problem:
After logging in to business central, the user menu shows user's ID (UUID) instead of their login name.


Version-Release number of selected component (if applicable):
6.3.0.DR2

How reproducible:
-

Steps to Reproduce:
1. Set up Keycloak authentication.
2. Log in to business central.

Actual results:
User menu shows UUID.

Expected results:
User menu should display user's login.

Additional info:

Comment 1 Jiri Locker 2016-03-03 18:12:47 UTC
Not only is the UUID displayed in the top right user menu, it is used ewerywhere where user login is expected (commit author, process initiator, etc.).

Comment 2 Roger Martínez 2016-03-08 21:59:11 UTC
Ok after lots of tests I realized that the fix is just a configuration issue! 

By default the KC providers use the OpenconnectId identifier for the principal name, but this can be overriden by adding this atrribute on the provider configuration ( so on the WEB-INF/keycloak.json if using per WAR configuration, or in the standalone.xml KC subsytem configuration otherwise):

    "principal-attribute": "preferred_username"

Now the right username is used in all workbench screens, I have checked on tasklist, on dashboards, etc and seems to be working fine.

I have updated the MOJO document (https://mojo.redhat.com/docs/DOC-1062655) with this info.

No commit required.

Comment 3 Lukáš Petrovický 2016-03-09 09:24:00 UTC
(In reply to Roger Martínez from comment #2)
> By default the KC providers use the OpenconnectId identifier for the
> principal name, but this can be overriden by adding this atrribute on the
> provider configuration ( so on the WEB-INF/keycloak.json if using per WAR
> configuration, or in the standalone.xml KC subsytem configuration otherwise):
> 
>     "principal-attribute": "preferred_username"

Asking for documentation of this setting.

Comment 4 Jiri Locker 2016-03-09 13:52:17 UTC
Thanks Roger! It works.