keycloak/keycloak

Identity Provider Mapping doesn't have good error handling

オープン

#43,970 opened on 2025/11/05

 (2 件のコメント) (0 件のリアクション) (1 人の担当者)Java (8,346 件のフォーク)batch import
area/admin/uiarea/identity-brokeringhelp wantedkind/bugpriority/normalteam/core-iamteam/core-shared

Repository metrics

Stars
 (34,398 個のスター)
PR merge metrics
 (平均マージ 6d 19h) (30d で 384 merged PRs)

説明

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);

コントリビューターガイド