Confluence Data Center で SAML をバイパスするデフォルトのログイン ページを有効化する
この記事は SSO for Atlassian Data Center アプリのバージョン 4.0 に適用されます。ご利用の Confluence バージョンにバンドルされているアプリ バージョンは異なる場合があります。
以降で古いバージョン用のドキュメントをご確認ください。
目的
The SSO plugin supports a bypass parameter to login to Confluence directly without using your configured IDP. This query parameter, auth_fallback
is disabled by default, works only on the login page URL, and is useful for troubleshooting SSO issues. An example of such a URL for Confluence is http://confluence.com/login.action?auth_fallback. If the application is configured to allow bypassing SSO authentication, then users will be able to access the default login page directly by providing this parameter.
You can also enable SSO bypass for all users and all URLs by setting the Login mode to Use OpenID Connect / SAML as secondary authentication in SSO 2.0 configuration. With this option enabled, all users will be able to log in through the default login page directly and will be able to log in through your IDP by going to https://<base-url>/plugins/servlet/external-login.
Note that enabling this will mean that users are not automatically redirected to log in through your IDP when visiting Confluence, and may find this disruptive. To minimize disruption to active users, you may prefer the approach detailed below.
Method-1: REST API
この機能を利用するには、REST API 経由で allow-redirect-override フラグを有効化する必要があります。これは他の REST クライアントや cURL 経由で行えますが、ユーザー フレンドリーな方法は次のとおりです。
1. ご利用のブラウザ用に Postman をダウンロードします (別の REST クライアントをお持ちの場合はご自身のものを使えます)
2. Postman を開きます。
3. ドロップダウン メニューから GET を選択し、[Authorization] タブで [Basic Auth] を選択します (Confluence の管理用の資格情報を入力)。
Please bear in mind, the '
{"message":"Basic Authentication has been disabled on this instance."
4. ご利用の環境に合わせて変更した次の URL を入力します。http(s)://<ベース URL>/rest/authconfig/1.0/sso (例: https://confluence.com/rest/authconfig/1.0/sso)
5. OIDC が構成されている場合、SEND をクリックすると次のような内容が返されます。
{
"sso-type": "OIDC",
"redirect-on-login": true,
"allow-redirect-override": false,
"include-customer-logins": false,
"enable-remember-me": true,
"issuer-url": "https://<redacted>-testing.okta.com",
"client-id": "<redacted>gUe4x5",
"discovery-enabled": true,
"username-claim": "preferred_username"
}
SAML が構成されている場合は次のような出力になります。
6. これを行うには、Postman で新しいタブを開きます。
7. ドロップダウンから [PATCH] を選択し、次の URL を入力します。http(s)://<ベース URL>/rest/authconfig/1.0/sso (例: https://confluence.com/rest/authconfig/1.0/sso)
- Confluence の一部のバージョンではこの操作を試行したときに 405 - Method Not Allowed エラーが返される可能性があります。この場合は PATCH の代わりに PUT を使うか、逆方向の入れ替えを行ってください。以降のすべての情報が引き続き適用されます。
415 - Unsupported Media Type クライアント エラーが表示される場合、ペイロードのフォーマットがサポート対象外であるためにサーバーがリクエストの受け入れを拒否しています。Header で Content-type が application/json に設定されていることをご確認ください。
8. [Authorization] タブで [Basic Auth] を選択し、管理アカウントの資格情報を入力します。
9. [Body] タブに移動し、ラジオ ボタンから [raw] を選択します。ドロップダウン メニューから [JSON (application/json)] を選択します。
10. 以降の JSON 本文を利用して関連するパラメーターを true に設定します。
11. [Send] ボタンをクリックすると 200 または 304 ステータスが返されます。
12. これで、http://confluence.com/login.action?auth_fallback にアクセスして SSO をバイパスできるようになります。意図された挙動を復元するため、メンテナンスが完了したらこのフラグを false に戻すことを忘れないようにしてください。これを行うには、同じ PATCH リクエストを true ではなく false で発行します。
13. Once this is done, verify that allow-redirect-override or enable-authentication-fallback is back to false by sending the same GET request to http(s)://<base-url>/rest/authconfig/1.0/sso described earlier.
Method-2: Database
SSO 構成は次のクエリを通じてデータベースで直接確認することもできます。
Method-3: Recover Admin User Rights
If none of the above methods did help you you may consider starting Confluence in recovery mode to recover your admin user rights. Please refer to the Restore Passwords To Recover Admin User Rights.
アプリ バージョン 3.2 以前の場合
SSO for Atlassian Data Center アプリのバージョン 3.2 以前を実行している場合、手順が異なります。