Sitzungssteuerung für die erneute Authentifizierung konfigurieren
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Mit Sitzungssteuerungen können Sie konfigurieren, wie oft sich Nutzer nach dem Erteilen des Zugriffs neu authentifizieren müssen und ob eine vollständige Anmeldung, nur ein Passwort oder ein Hardware-Sicherheitsschlüssel erforderlich ist.
Mit Sitzungssteuerungen können Sie Folgendes tun:
Häufige Neuanmeldung für privilegierte Nutzer erzwingen: Nutzer mit umfassenderen Berechtigungen wie Projektinhaber und Abrechnungsadministratoren müssen sich häufiger neu anmelden.
Längere Sitzungen für bestimmte Anwendungen konfigurieren: Bestimmte Anwendungen, z. B. kontextbasierte KI-Anwendungen wie Gemini, können längere Sitzungsdauern haben, um das große Kontextfenster beizubehalten, das für eine optimale Leistung erforderlich ist.
Sitzungslänge und Methoden zur erneuten Authentifizierung definieren
Verwenden Sie das Flag --session-length, um die Sitzungsdauer festzulegen, und das Flag --session-reauth-method, um die Methode zur erneuten Authentifizierung anzugeben. Sie können beispielsweise eine Sitzungsdauer von 30 Minuten (30m) und eine LOGIN-, PASSWORD- oder SECURITY_KEY-Methode für die erneute Authentifizierung festlegen.
Diese Einstellung wird auf alle Anwendungen angewendet, sofern sie nicht durch anwendungsspezifische Einstellungen überschrieben wird.
Definieren Sie scopedAccessSettings in einer YAML-Datei, um Sitzungssteuerungen für bestimmte Anwendungen mit clientId anzugeben. So können Sie die Standardeinstellungen für die Sitzungssteuerung für diese Anwendungen überschreiben. Anschließend können Sie die YAML-Datei mit --binding-file flag übergeben.
API
Definieren Sie die Felder sessionLength und sessionReauthMethod innerhalb von sessionSettings object im JSON-Text Ihrer POST-Anfrage, um eine GcpUserAccessBinding-Bindung zu erstellen oder zu aktualisieren. Mit scopedAccessSettings können Sie anwendungsspezifische Sitzungssteuerungen definieren.
Weitere Informationen finden Sie unter Konfigurationen für bestimmte Anwendungen definieren.
Wichtige Überlegungen beim Definieren von Sitzungssteuerungen:
Sie können die Google Cloud Console nicht mit clientId angeben. Wenn Sie Sitzungssteuerungen für die Google Cloud -Konsole erzwingen möchten, definieren Sie sie als Standard und erstellen Sie dann Ausnahmen für andere Anwendungen.
Beim Auflösen von Sitzungssteuerungseinstellungen wird nur die zuletzt erstellte Zugriffsbindung verwendet, die der Anfrage entspricht.
Beispiel für die Konfiguration von Richtlinien
Im Folgenden finden Sie ein Beispiel dafür, wie Sie eine Sitzungssteuerung erstellen, die standardmäßig alle 18 Stunden mit LOGIN und alle zwei Stunden für eine bestimmte Anwendung (SENSITIVE_APP_ID) mit SECURITY_KEY eine erneute Authentifizierung erfordert.
Standardeinstellungen
Mit den Flags --level, --session-length und --session-reauth-method im Google Cloud CLI-Befehl (oder den entsprechenden Feldern im JSON-Body für den API-Aufruf) wird das Standardverhalten für alle Anwendungen festgelegt, die nicht explizit in scopedAccessSettings definiert sind.
Anwendungsspezifische Einstellungen
Im Abschnitt scopedAccessSettings der YAML-Datei (oder des JSON-Bodys) können Sie die Standardeinstellungen für bestimmte Anwendungen überschreiben. In diesem Beispiel legen wir mit SECURITY_KEY eine Anforderung für die erneute Authentifizierung alle zwei Stunden für die Anwendung mit der Client-ID SENSITIVE_APP_ID fest.
Wenn Sie bestimmte Apps von der Sitzungssteuerung ausnehmen möchten, legen Sie das Feld sessionLength auf 0s oder sessionLengthEnabled bis false fest. Die Methode sessionReauthMethod wird dann ignoriert.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-05 (UTC)."],[],[],null,["# Configure session controls for re-authentication\n\n| **Preview\n| --- Session controls**\n|\n|\n| This feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\nSession controls let you configure how often users must re-authenticate after\nbeing granted access, and whether a full login, password only, or hardware\nsecurity key is required.\n\nYou can apply session controls to do the following:\n\n- **Enforce frequent re-authentication for privileged users** Require users with elevated privileges, such as project owners and billing administrators, to re-authenticate more frequently.\n- **Configure longer sessions for certain applications** Allow certain applications, such as context-based AI applications like Gemini, to have longer session durations to preserve the large context window required for optimal performance.\n\n| **Warning:** If you previously managed session controls within Workspace based on Organizational Units (OUs), session controls defined through Access Context Manager bindings will supersede any OU-based policies.\n\nDefine session length and re-authentication methods\n---------------------------------------------------\n\nYou can define session controls when creating an Access Context Manager binding.\nFor details about the session controls, see [Apply policies to user groups using access bindings](/chrome-enterprise-premium/docs/apply-policies-to-user-groups). \n\n### gcloud\n\n- [**Set default session controls for all applications**](/chrome-enterprise-premium/docs/apply-policies-to-user-groups#use_a_single_configuration_for_all_applications)\n\n Use the `--session-length` flag to set the session duration and the\n `--session-reauth-method` flag to specify the re-authentication method. For\n example, you can set a session duration time of 30 minutes (30m) and a\n `LOGIN`, `PASSWORD`, or `SECURITY_KEY` re-authentication method.\n\n This will be applied to all applications unless overridden by\n application-specific settings.\n- [**Set application-specific session controls**](/chrome-enterprise-premium/docs/apply-policies-to-user-groups#define_configurations_for_specific_applications)\n\n Define `scopedAccessSettings` in a YAML file to specify session controls\n for specific applications using `clientId`. This lets you override the\n default session controls for those applications. You can then pass the YAML\n file using the `--binding-file flag`.\n\n### API\n\nDefine the `sessionLength` and `sessionReauthMethod` fields within the\n`sessionSettings object` in the JSON body of your POST request to create\nor update a `GcpUserAccessBinding` binding. Use `scopedAccessSettings` to\ndefine application-specific session controls.\nSee [Define configurations for specific applications](/chrome-enterprise-premium/docs/apply-policies-to-user-groups#api)\nfor details.\n\nKey considerations when defining session controls:\n\n- You cannot specify the Google Cloud console using `clientId`. To enforce session controls for the Google Cloud console, define it as a default and then create exceptions for other applications.\n- Only the most recently created access binding that matches the request is used when resolving session control settings.\n\nExample policy configuration\n----------------------------\n\nFollowing is an example that demonstrates how to create a session control that\nrequires re-authentication every 18 hours by default with `LOGIN`, and every two\nhours for a specific application (`SENSITIVE_APP_ID`) with `SECURITY_KEY`.\n\n**Default settings**\n\nThe `--level`, `--session-length`, and `--session-reauth-method` flags in the\nGoogle Cloud CLI command (or the corresponding fields in the JSON body for the\nAPI call) set the default behavior for all applications not explicitly defined\nin `scopedAccessSettings`.\n\n**Application-specific settings**\n\nThe `scopedAccessSettings` section in the YAML file (or JSON body) lets you\noverride the default settings for specific applications. In the example, we\nset a two hour re-authentication requirement with `SECURITY_KEY` for the\napplication with the client ID `SENSITIVE_APP_ID`.\n\nTo exempt certain apps from session control, set the\n`sessionLength` field to `0s` or `sessionLengthEnabled`\nto `false`. The `sessionReauthMethod` method will then be ignored. \n\n### gcloud\n\nThe settings configuration: \n\n scopedAccessSettings:\n scope:\n clientScope:\n restrictedClientApplication:\n clientId: SENSITIVE_APP_ID\n activeSettings:\n sessionSettings:\n sessionLength: 7200s\n sessionReauthMethod: SECURITY_KEY\n sessionLengthEnabled: true\n\nCreate the access binding: \n\n gcloud access-context-manager cloud-bindings create \\\n --organization ORG_ID \\\n --group-key GROUP_ID \\\n --binding-file BINDING_FILE_PATH \\\n --level DEFAULT_ACCESS_LEVEL\n --session-length 18h \\\n --session-reauth-method LOGIN\n\n### API\n\nJSON body: \n\n {\n \"groupKey\": \"GROUP_ID\",\n \"accessLevels\": [\n \"accessPolicies/POLICY_ID/accessLevels/DEFAULT_ACCESS_LEVEL\"\n ],\n \"scopedAccessSettings\": [\n {\n \"scope\": {\n \"clientScope\": {\n \"restrictedClientApplication\": {\n \"clientId\": \"SENSITIVE_APP_ID\"\n }\n }\n },\n \"activeSettings\": {\n \"accessLevels\": [\n \"accessPolicies/POLICY_ID/accessLevels/ACCESS_LEVEL_NAME\"\n ],\n \"sessionSettings\": [\n {\n \"sessionLength\": \"2h\",\n \"sessionReauthMethod\": \"SECURITY_KEY\",\n \"sessionLengthEnabled\": true\n }\n ]\n }\n }\n ]\n\nPost request: \n\n POST https://accesscontextmanager.googleapis.com/v1/organizations/ORG_ID/gcpUserAccessBindings"]]