Bug 1314449 - User ID displayed instead of user name when using RH-SSO
User ID displayed instead of user name when using RH-SSO
Status: VERIFIED
Product: JBoss BRMS Platform 6
Classification: JBoss
Component: Business Central (Show other bugs)
6.3.0
Unspecified Unspecified
urgent Severity urgent
: ---
: ---
Assigned To: Roger Martínez
Jiri Locker
Tomas Radej
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-03 11:07 EST by Jiri Locker
Modified: 2016-04-12 11:43 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
User menu (6.15 KB, image/png)
2016-03-03 11:07 EST, Jiri Locker
no flags Details

  None (edit)
Description Jiri Locker 2016-03-03 11:07:13 EST
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 13:12:47 EST
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 16:59:11 EST
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 04:24:00 EST
(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 08:52:17 EST
Thanks Roger! It works.

Note You need to log in before you can comment on or make changes to this bug.