--session-length 플래그를 사용하여 세션 기간을 설정하고 --session-reauth-method 플래그를 사용하여 재인증 방법을 지정합니다. 예를 들어 세션 지속 시간을 30분 (30m)으로 설정하고 LOGIN, PASSWORD 또는 SECURITY_KEY 재인증 방법을 설정할 수 있습니다.
clientId을 사용하여 특정 애플리케이션의 세션 제어를 지정하려면 YAML 파일에서 scopedAccessSettings를 정의합니다. 이렇게 하면 이러한 애플리케이션의 기본 세션 컨트롤을 재정의할 수 있습니다. 그런 다음 --binding-file flag를 사용하여 YAML 파일을 전달할 수 있습니다.
API
GcpUserAccessBinding 바인딩을 생성하거나 업데이트하기 위해 POST 요청의 JSON 본문에서 sessionSettings object 내에 sessionLength 및 sessionReauthMethod 필드를 정의합니다. scopedAccessSettings를 사용하여 애플리케이션별 세션 컨트롤을 정의합니다.
자세한 내용은 특정 애플리케이션의 구성 정의를 참고하세요.
세션 제어를 정의할 때 고려해야 할 주요 사항:
clientId을 사용하여 Google Cloud 콘솔을 지정할 수 없습니다. Google Cloud 콘솔에 세션 제어를 적용하려면 기본값으로 정의한 다음 다른 애플리케이션에 대한 예외를 만드세요.
세션 제어 설정을 해결할 때는 요청과 일치하는 가장 최근에 생성된 액세스 바인딩만 사용됩니다.
정책 구성 예시
다음은 LOGIN를 사용하여 기본적으로 18시간마다 재인증이 필요하고 SECURITY_KEY를 사용하여 특정 애플리케이션 (SENSITIVE_APP_ID)의 경우 2시간마다 재인증이 필요한 세션 제어를 만드는 방법을 보여주는 예입니다.
기본 설정
Google Cloud CLI 명령어의 --level, --session-length, --session-reauth-method 플래그 (또는 API 호출의 JSON 본문에 있는 해당 필드)는 scopedAccessSettings에 명시적으로 정의되지 않은 모든 애플리케이션의 기본 동작을 설정합니다.
애플리케이션별 설정
YAML 파일 (또는 JSON 본문)의 scopedAccessSettings 섹션을 사용하면 특정 애플리케이션의 기본 설정을 재정의할 수 있습니다. 이 예시에서는 클라이언트 ID가 SENSITIVE_APP_ID인 애플리케이션에 SECURITY_KEY를 사용하여 2시간 재인증 요구사항을 설정합니다.
특정 앱을 세션 제어에서 제외하려면 sessionLength 필드를 0s 또는 sessionLengthEnabled~false로 설정합니다. 그러면 sessionReauthMethod 메서드가 무시됩니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 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"]]