keycloak/keycloak

Identity Provider Mapping doesn't have good error handling

Aperta

#43.970 aperta il 5 nov 2025

 (2 commenti) (0 reazioni) (1 assegnatario)Java (8346 fork)batch import
area/admin/uiarea/identity-brokeringhelp wantedkind/bugpriority/normalteam/core-iamteam/core-shared

Metriche repository

Star
 (34.398 stelle)
Metriche merge PR
 (Merge medio 6g 19h) (384 PR mergiate in 30 g)

Descrizione

Before reporting an issue

  • I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.

Area

admin/ui

Describe the bug

When creating OpenShift v4 as an identity provider, and switching to the mappings, there is a the generic error message "unknown_error" and the user is asked to reload the UI.

The user is lost and doesn't know what to do next.

Version

main

Regression

  • The issue is a regression

Expected behavior

There should be a descriptive error message and no need to reload the admin UI

Actual behavior

I need to reload the admin UI, and there is no descriptive error message

How to Reproduce?

  • Create an Identity provider of type OpenShift v4 and save it
  • Open the OpenShift v4 IDP
  • Switch to the mappers tab -> error appears

Anything else?

The baseUrl in the UI is optional, but in the backend it is not usedto create the oauthDescriptor.

The code

https://github.com/keycloak/keycloak/blob/dbd516f8e6f5152f292bedc1caffa601880f7eb9/services/src/main/java/org/keycloak/social/openshift/OpenshiftV4IdentityProvider.java#L38-L39

should probably read

        final String baseUrl = Optional.ofNullable(config.getBaseUrl()).orElse(BASE_URL);
        Map<String, Object> oauthDescriptor = getAuthJson(session, baseUrl);

Guida contributor