메서드: delegate
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
이 호출은 엔티티가 원래 인증 JWT에서 인증된 사용자를 대신하여 지정된 리소스에 액세스할 수 있도록 하는 새로운 인증 JSON 웹 토큰 (JWT)을 반환합니다. 이 속성은 다른 항목이 사용자를 대신하여 작동해야 하는 경우 범위가 지정된 액세스 권한을 wrap 또는 unwrap에 위임하는 데 사용됩니다.
HTTP 요청
POST https://<base_url>/delegate
<base_url>
을 키 액세스 제어 목록 서비스 (KACLS) URL로 바꿉니다.
경로 매개변수
없음
요청 본문
요청 본문에는 요청의 JSON 표현이 포함됩니다.
JSON 표현 |
{
"authentication": string,
"authorization": string,
"reason": string
}
|
필드 |
authentication |
string
사용자가 누구인지 어설션하는 서드 파티에서 발급한 JWT입니다. 자세한 내용은 인증 섹션을 참고하세요.
|
authorization |
string
delegated_to 클레임으로 식별된 항목이 사용자를 대신하여 resource_name 에 액세스할 수 있음을 어설션하는 delegated_to 및 resource_name 클레임이 있는 JWT입니다. 자세한 내용은 승인 토큰을 참고하세요.
|
reason |
string (UTF-8)
작업에 관한 추가 컨텍스트를 제공하는 통과 JSON 문자열입니다. 제공된 JSON은 표시되기 전에 정리해야 합니다. 최대 크기: 1KB
|
필수 처리 단계
KACLS는 다음 단계를 하나 이상 실행해야 합니다.
- 승인 및 인증 토큰을 모두 검증합니다. 자세한 내용은 승인 토큰 및 인증 토큰을 참고하세요.
- 승인 및 인증 토큰이 동일한 사용자를 위한 것인지 확인합니다.
자세한 내용은 데이터 암호화 및 복호화를 참고하세요.
- 승인 토큰의
kacls_url
클레임이 현재 KACLS URL과 일치하는지 확인합니다. 이를 통해 내부자 또는 악성 도메인 관리자가 구성한 잠재적인 중간자 서버를 감지할 수 있습니다.
- 승인 토큰에
kacls_owner_domain
클레임이 있는 경우 값이 KACLS 소유자의 Google Workspace 도메인과 일치하는지 확인합니다. 이렇게 하면 승인되지 않은 사용자가 Google에 KACLS를 등록하는 것을 방지할 수 있습니다.
- 작업을 기록합니다. 여기에는 작업을 시작한 사용자,
delegated_to
, resource_name
, 요청에 전달된 이유가 포함됩니다.
- 승인 토큰에서
delegated_to
및 resource_name
클레임을 포함하는 JWT 토큰을 생성하고 서명하고 반환합니다.
KACLS는 JWT 클레임 기반 검사를 비롯한 추가 보안 검사를 무료로 실행할 수 있습니다.
응답 본문
성공하면 이 메서드는 delegated_to
및 resource_name
클레임이 포함된 인증 JWT를 반환합니다. 이 토큰은 나중에 Wrap 및 Unwrap 메서드 호출 시 인증에 사용할 수 있습니다. 오류가 발생한 경우 구조화된 오류 응답을 반환해야 합니다.
JSON 표현 |
{
"delegated_authentication": string
}
|
필드 |
delegated_authentication |
string
원래 인증 JWT에 언급된 사용자가 resource_name 에 액세스하는 데 유효한 위임된 인증 JWT입니다. 자세한 내용은 delegate 용 KACLS 인증 토큰을 참고하세요.
|
예
요청
POST https://mykacls.example.com/v1/delegate
{
"authentication": "eyJhbGciOi...",
"authorization": "eyJhbGciOi...delegated_to\":\"other_entity_id\",\"resource_name\":\"meeting_id\"...}",
"reason": "{client:'meet' op:'delegate_access'}"
}
응답
{
"delegated_authentication": "eyJhbGciOi...delegated_to_from_authz_token...resource_name_from_authz_token...}"
}
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-26(UTC)
[null,null,["최종 업데이트: 2025-07-26(UTC)"],[],[],null,["# Method: delegate\n\nThis call returns a new authentication JSON Web Token (JWT) that allows\nan entity to access a specified resource on behalf of the user\nauthenticated in the original authentication JWT. It is used to delegate\nscoped access to [wrap](/workspace/cse/reference/wrap) or\n[unwrap](/workspace/cse/reference/unwrap) to another entity when that\nentity needs to act on behalf of the user.\n\n### HTTP request\n\n`POST https://\u003cbase_url\u003e/delegate`\n\nReplace `\u003cbase_url\u003e` with the Key Access Control List Service (KACLS) URL.\n\n### Path parameters\n\nNone.\n\n### Request body\n\nThe request body contains a JSON representation of the request:\n\n| JSON representation ||\n|---------------------------------------------------------------------------------|---|\n| ``` { \"authentication\": string, \"authorization\": string, \"reason\": string } ``` |\n\n| Fields ||\n|------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `authentication` | `string` A JWT issued by a third-party asserting who the user is. See the authentication section for details. |\n| `authorization` | `string` A JWT with `delegated_to` and `resource_name` claims asserting that the entity identified by `delegated_to` claim is allowed to access `resource_name` on behalf of the user. For more information, see [Authorization Tokens](/workspace/cse/reference/authorization-tokens). |\n| `reason` | `string (UTF-8)` A passthrough JSON string providing additional context about the operation. The JSON provided should be sanitized before being displayed. Max size: 1 KB. |\n\n### Required processing steps\n\nThe KACLS must perform at least these steps:\n\n- Validate both authorization and authentication tokens. For more information, see [Authorization Tokens](/workspace/cse/reference/authorization-tokens) and [Authentication Tokens](/workspace/cse/reference/authentication-tokens).\n- Check that authorization and authentication tokens are for the same user. For more information, see [Encrypt and decrypt data](/workspace/cse/guides/encrypt-and-decrypt-data).\n- Check that the `kacls_url` claim in the authorization token matches the current KACLS URL. This allows detection of potential man-in-the-middle servers configured by insiders or rogue domain admins.\n- If the `kacls_owner_domain` claim exists in the authorization token, check that the value matches the KACLS owner's Google Workspace domain. This helps prevent unauthorized users from registering your KACLS with Google.\n- Log the operation, including the user originating it, the `delegated_to`, the `resource_name`, and the reason passed in the request.\n- Generate, sign, and return a JWT token containing `delegated_to` and `resource_name` claims from the authorization token.\n\nThe KACLS is free to perform additional security checks, including JWT claim\nbased ones.\n\n### Response body\n\nIf successful, this method returns an authentication JWT containing\n`delegated_to` and `resource_name` claims. This token can later be used for\nauthentication in calls to the Wrap and Unwrap methods. In case of an error, a\n[structured error reply](/workspace/cse/reference/structured-errors)\nshould be returned.\n\n| JSON representation ||\n|------------------------------------------------|---|\n| ``` { \"delegated_authentication\": string } ``` |\n\n| Fields ||\n|----------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `delegated_authentication` | `string` A delegated authentication JWT valid for accessing `resource_name` by the user mentioned in the original authentication JWT. For more information, see [KACLS authentication token for `delegate`](/workspace/cse/reference/authentication-tokens#kacls_authentication_token_for_delegate). |\n\n### Example\n\n#### Request\n\n POST https://mykacls.example.com/v1/delegate\n {\n \"authentication\": \"eyJhbGciOi...\",\n \"authorization\": \"eyJhbGciOi...delegated_to\\\":\\\"other_entity_id\\\",\\\"resource_name\\\":\\\"meeting_id\\\"...}\",\n \"reason\": \"{client:'meet' op:'delegate_access'}\"\n }\n\n#### Response\n\n {\n \"delegated_authentication\": \"eyJhbGciOi...delegated_to_from_authz_token...resource_name_from_authz_token...}\"\n }"]]