-
Bug
-
Resolution: Unresolved
-
Undefined
-
4.15.z, 4.17.z, 4.16.z, 4.18.z, 4.19.z, 4.20.0
-
None
-
Quality / Stability / Reliability
-
False
-
-
None
-
Moderate
-
Yes
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Description of problem:
OpenShift Console can only show user name instead of full name as the display name
Version-Release number of selected component (if applicable):
4.15 ~ 4.20
How reproducible:
Always
Steps to Reproduce:
1. Configure Google or Microsoft Entra ID OpenID IDP. Here let's use Google: $ oc edit oauth cluster ... spec: identityProviders: - mappingMethod: claim name: Google-OpenID-Connect openID: claims: email: - email name: - name - email preferredUsername: - preferred_username - email clientID: XXXXXXXX clientSecret: name: google-secret-1 extraScopes: - email - profile issuer: https://accounts.google.com type: OpenID 2. Wait oauth pods to roll out. Then login to Console
Actual results:
2. Login succeeds. Check the user info: $ oc get user NAME UID FULL NAME IDENTITIES xxia@redhat.com 1d256faa-abf9-4911-9ef9-3dfd11eb747a Xingxing Xia Google-OpenID-Connect:112802090914614812822 $ oc get user xxia@redhat.com -o yaml apiVersion: user.openshift.io/v1 fullName: Xingxing Xia groups: null identities: - Google-OpenID-Connect:112802090914614812822 kind: User metadata: creationTimestamp: "2025-05-30T08:08:12Z" name: xxia@redhat.com resourceVersion: "165574" uid: 1d256faa-abf9-4911-9ef9-3dfd11eb747a $ oc get identity Google-OpenID-Connect:112802090914614812822 -o yaml apiVersion: user.openshift.io/v1 extra: email: xxia@redhat.com name: Xingxing Xia preferred_username: xxia@redhat.com kind: Identity metadata: creationTimestamp: "2025-05-30T08:08:12Z" name: Google-OpenID-Connect:112802090914614812822 resourceVersion: "165575" uid: d96c4060-9370-4d49-a2d4-ea97f07a1b97 providerName: Google-OpenID-Connect providerUserName: "112802090914614812822" user: name: xxia@redhat.com uid: 1d256faa-abf9-4911-9ef9-3dfd11eb747a But the upper right shows user name xxia@redhat.com. It should shows the display name Xingxing Xia instead.
Expected results:
3. The upper right should show the display name Xingxing Xia instead.
Additional info:
Tested in 4.19 and 4.20 with Google or Microsoft Entra ID, both reproduced. Tested in a 4.12.77 env, no such issue, i.e. the upper right indeed shows the display name Xingxing Xia correctly. Customer should be looking for Console showing the value of identityProviders.openID.claims.name if it is not empty, as doc https://docs.redhat.com/en/documentation/openshift_container_platform/4.12/html/authentication_and_authorization/configuring-identity-providers#configuring-oidc-identity-provider about this name field - "The list of claims to use as the display name. The first non-empty claim is used"