この文書は自動機械翻訳技術を使用して翻訳されています。 正確な翻訳を提供するように努めておりますが、翻訳された内容の完全性、正確性、信頼性については一切保証いたしません。 相違がある場合は、元の英語版 英語 が優先され、正式なテキストとなります。

Amazon Cognitoの設定

組織がユーザー認証にAmazon Cognitoを使用している場合、Rancherを設定してAmazon Cognitoの資格情報を使用してログインできるようにすることができます。以下の手順は、RancherがAmazon Cognitoと連携するように設定する方法を説明します:

前提条件

  • Rancherで:

    • Amazon Cognitoは無効になっています。

      ユーザープールを設定するには、Amazon Cognitoの ドキュメントを参照してください。

  • Amazon Cognitoで:

    • 新しいユーザープールを作成するか、既存のものを使用します。

    • App client`設定で、リダイレクトURLをhttps://yourRancherHostURL/verify-authに設定します。`yourRancherHostURL`をRancherインスタンスの実際のホスト名(例:https://rancher.example.com/verify-auth`)に置き換えます。

RancherにおけるAmazon Cognitoの設定

  1. Rancher UIの左上隅で、☰ > ユーザーと認証をクリックします。

  2. 左のナビゲーションバーで、認証プロバイダーをクリックします。

  3. Amazon Cognitoを選択します。

  4. Amazon Cognitoアカウントの設定フォームに記入します。フォームの記入に関するヘルプは、設定リファレンスを参照してください。

  5. 有効]をクリックします。

    RancherはあなたをAmazon Cognitoのログインページにリダイレクトします。Rancherの設定を検証するために、Amazon Cognitoの資格情報を入力してください。

    Amazon Cognitoのログインページを見るためにポップアップブロッカーを無効にする必要があるかもしれません。

結果:RancherはOIDCプロトコルを使用して、あなたのAmazon Cognitoと連携するように設定されています。ユーザーはAmazon Cognitoのログインを使用してRancherにサインインできるようになりました。

Amazon Cognitoではユーザーおよびグループの検索はサポートされていません。プロジェクトまたはクラスターに権限を割り当てる際、ユーザーがまだRancherにログインしていない場合は、Cognitoによって生成されたUserIDを手動で入力する必要があります。ただし、ユーザーが以前にログインしている場合は、ユーザー名またはメールアドレスを使用して権限を割り当てることができます。

構成リファレンス

フィールド 説明

クライアントID

あなたのAmazon CognitoアプリクライアントのクライアントID。

クライアントシークレット

あなたのAmazon Cognitoアプリクライアントの生成されたシークレット。

[発行者]

あなたのAmazon Cognitoアプリクライアントの発行者URL。形式は`https://cognito-idp.{region}.amazonaws.com/{userPoolId}`に従い、アプリクライアント設定ページで見つけることができます。Rancherは発行者URLを使用して、必要なすべてのURLを取得します。

PKCE拡張のためのOIDCサポート

Rancher supports the Proof Key for Code Exchange (PKCE) extension (RFC 7636) for OIDC authentication providers. SHA-256 (S256) is the only supported PKCE verification method. To enable this feature, your authentication provider must use PKCE with S256 for authorization requests.

You can enable this feature by selecting Enable PKCE (S256) in your authentication provider configuration in Rancher. Enabling S256 PKCE token verification allows you to mitigate authorization code interception attacks during OIDC authentication flows.

トラブルシューティング

認証プロバイダーにリダイレクトされません。

Amazon Cognitoアカウントの設定フォームに記入し、有効にするをクリックしてもAmazon Cognitoにリダイレクトされない場合は、Amazon Cognitoの設定を確認してください。

OIDCシングルログアウト(SLO)の設定

Rancher supports the ability to configure OIDC Single Logout (SLO). Options include logging out of the Rancher application only, logging out of Rancher and registered applications tied to the external authentication provider, or a prompt asking the user to choose between the previous options.

Prerequisites

Before configuring OIDC SLO, ensure the following is set up on your IdP:

  • SLO Support: The Log Out behavior configuration section only appears if your OIDC IdP allows for OIDC SLO.

  • Post-Logout Redirect URI: Your Rancher Server URL must be configured as an authorized post-logout redirect URI in your IdP’s OIDC client settings. This URL is used by the IdP to redirect a user back to Rancher after a successful external logout.

OIDC SLO Configuration

Configure the SLO settings when setting up or editing your OIDC authentication provider.

  1. Sign in to Rancher using a standard user or an administrator role.

  2. In the top left corner, select > Users & Authentication.

  3. In the left navigation menu, select Auth Provider.

  4. Under the section Log Out behavior, choose the appropriate SLO setting as described below:

    Setting Description

    Log out of Rancher and not authentication provider

    Choosing this option will only logout the Rancher application and not external authentication providers.

    Log out of Rancher and authentication provider (includes all other applications registered with authentication provider)

    Choosing this option will logout Rancher and all external authentication providers along with any registered applications linked to the provider.

    Allow the user to choose one of the above in an additional log out step

    Choosing this option presents users with a choice of logout method as described above.

  5. If you choose to log out of your IdP, provide an End Session Endpoint. Rancher uses this URL to initiate the external logout.

How to get the End Session Endpoint

The end_session_endpoint is one of the specific URLs published within a standardized JSON object containing the IdP’s metadata and is retrieved from the OIDC Discovery URL. To get the end_session_endpoint from the OIDC Discovery URL, follow these steps:

  1. Obtain the Discovery URL by appending the IdP Issuer URL with the well-known path (.well-known/openid-configuration).

  2. Send an HTTP GET request to the Discovery URL.

  3. In the JSON object, look for the key named end_session_endpoint and retrieve the URL.

    You can also use a curl command to retrieve end_session_endpoint:

    curl -s <ISSUER_URL>/.well-known/openid-configuration | jq '.end_session_endpoint'