Dieses Dokument wurde mithilfe automatisierter maschineller Übersetzungstechnologie übersetzt. Wir bemühen uns um korrekte Übersetzungen, übernehmen jedoch keine Gewähr für die Vollständigkeit, Richtigkeit oder Zuverlässigkeit der übersetzten Inhalte. Im Falle von Abweichungen ist die englische Originalversion maßgebend und stellt den verbindlichen Text dar.

Amazon Cognito konfigurieren

Wenn Ihre Organisation Amazon Cognito zur Benutzerauthentifizierung verwendet, können Sie Rancher so konfigurieren, dass die Anmeldung mit Amazon Cognito-Anmeldeinformationen ermöglicht wird. Die folgenden Anweisungen beschreiben, wie Sie Rancher für die Verwendung mit Amazon Cognito konfigurieren:

Voraussetzungen

  • In Rancher:

    • Amazon Cognito ist deaktiviert.

      Konsultieren Sie die Amazon Cognito Dokumentation, um den Benutzerpool zu konfigurieren.

  • In Amazon Cognito:

    • Erstellen Sie einen neuen Benutzerpool oder verwenden Sie einen vorhandenen.

    • Setzen Sie in den App client-Einstellungen die Umleitungs-URL auf https://yourRancherHostURL/verify-auth. Ersetzen Sie yourRancherHostURL durch den tatsächlichen Hostnamen Ihrer Rancher-Instanz (z. B. https://rancher.example.com/verify-auth).

Amazon Cognito in Rancher konfigurieren

  1. Klicken Sie in der oberen linken Ecke der Rancher-Benutzeroberfläche auf ☰ > Benutzer & Authentifizierung.

  2. Klicken Sie in der linken Navigationsleiste auf Authentifizierungsanbieter.

  3. Wählen Sie Amazon Cognito aus.

  4. Vervollständigen Sie das Formular Amazon Cognito-Konto konfigurieren. Für Hilfe beim Ausfüllen des Formulars siehe die Konfigurationsreferenz.

  5. Klicken Sie auf Aktivieren.

    Rancher leitet Sie zur Anmeldeseite von Amazon Cognito weiter. Geben Sie Ihre Amazon Cognito-Anmeldeinformationen ein, um Ihre Rancher-Konfiguration zu validieren.

    Möglicherweise müssen Sie Ihren Popup-Blocker deaktivieren, um die Anmeldeseite von Amazon Cognito zu sehen.

Ergebnis: Rancher ist so konfiguriert, dass es mit Ihrem Amazon Cognito über das OIDC-Protokoll funktioniert. Ihre Benutzer können sich jetzt mit ihren Amazon Cognito-Anmeldedaten bei Rancher anmelden.

Die Suche nach Benutzern und Gruppen wird für Amazon Cognito nicht unterstützt. Beim Zuweisen von Berechtigungen zu einem Projekt oder Cluster müssen Sie die von Cognito generierte Benutzer-ID manuell eingeben, wenn der Benutzer sich noch nicht bei Rancher angemeldet hat. Wenn der Benutzer sich jedoch bereits angemeldet hat, können Sie Berechtigungen mit seinem Benutzernamen oder seiner E-Mail-Adresse zuweisen.

Konfigurationsreferenz

Feld Beschreibung

Client-ID

Die Client-ID Ihres Amazon Cognito App Clients.

Client-Geheimnis

Das generierte Geheimnis Ihres Amazon Cognito App Clients.

Aussteller

Die Aussteller-URL Ihres Amazon Cognito App Clients. Sie folgt dem Format https://cognito-idp.{region}.amazonaws.com/{userPoolId} und kann auf der Seite der App-Client-Einstellungen gefunden werden. Rancher verwendet die Aussteller-URL, um alle erforderlichen URLs abzurufen.

OIDC-Unterstützung für PKCE-Erweiterung

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.

Fehlerbehebung

Sie werden nicht zu Ihrem Authentifizierungsanbieter umgeleitet.

Wenn Sie das Formular zur Konfiguration eines Amazon Cognito-Kontos ausfüllen und auf Aktivieren klicken und nicht zu Amazon Cognito umgeleitet werden, überprüfen Sie Ihre Amazon Cognito-Konfiguration.

Konfigurieren von OIDC Single Logout (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'