Exchanging authorization tokens failed with Keycloak IdP
プラットフォームについて: Data Center のみ。 - This article only applies to Atlassian apps on the Data Center プラットフォーム。
この KB は Data Center バージョンの製品用に作成されています。Data Center 固有ではない機能の Data Center KB は、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。 Server* 製品のサポートは 2024 年 2 月 15 日に終了しました。Server 製品を実行している場合は、 アトラシアン Server サポート終了 のお知らせにアクセスして、移行オプションを確認してください。
*Fisheye および Crucible は除く
要約
問題
When having Jira configured for OIDC with Keycloak IdP, authentication fails with the following error in the atlassian-jira.log:
Exchanging authorization tokens failed. Error: {"error_description":"Unexpected error when authenticating client: null","error":"unauthorized_client"}
com.atlassian.plugins.authentication.impl.web.usercontext.AuthenticationFailedException: Exchanging authorization tokens failed. Error: {"error_description":"Unexpected error when authenticating client: null","error":"unauthorized_client"}
at com.atlassian.plugins.authentication.impl.web.oidc.OidcConsumerServlet.toException(OidcConsumerServlet.java:267)
at com.atlassian.plugins.authentication.impl.web.oidc.OidcConsumerServlet.exchangeAuthorizationCodeForTokens(OidcConsumerServlet.java:204)
at com.atlassian.plugins.authentication.impl.web.oidc.OidcConsumerServlet.getOidcTokens(OidcConsumerServlet.java:163)
at com.atlassian.plugins.authentication.impl.web.oidc.OidcConsumerServlet.doGet(OidcConsumerServlet.java:118)診断
環境
The instance is running on JIRA 8.15 or newer.
The authentication method is configured using OIDC, integrated with Keycloak IdP
原因
When configuring the Client on Keycloak, the admin put "/" in Client ID, for example, https://jira.internal.com
ソリューション
ソリューション
Change the Client Id in both Jira and Keycloak to only have alphanumeric characters. Use something like JiraApp or JiraOIDC.
この内容はお役に立ちましたか?