권한 부여 흐름
Amazon Bedrock AgentCore Gateway는 수신 요청에 대해 Cedar 정책을 평가합니다. 이 섹션에서는 요청에서 정책 평가로 권한 부여 정보가 흐르는 방법을 설명합니다.
요청 처리
Amazon Bedrock AgentCore Gateway는 각 요청의 두 가지 주요 정보를 처리합니다.
-
JWT 토큰 - 사용자에 대한 OAuth 클레임을 포함합니다.
{ "sub": "12345678-1234-1234-1234-123456789012", "iss": "https://cognito-idp.us-east-1.amazonaws.com/us-east-1_Vg2efaoGO", "username": "refund-agent", "scope": "aws.cognito.signin.user.admin refund:write", "role": "admin", "department": "finance" } -
MCP 도구 호출 요청 - 실제 도구 호출:
{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "RefundTool___process_refund", "arguments": { "orderId": "12345", "amount": 450, "reason": "Defective product" } } }
Cedar 권한 부여 요청
게이트웨이는 두 소스 모두에서 정보를 추출하고 Cedar 권한 부여 요청을 구성합니다.
권한 부여 요청 완료:
{ "principal": "AgentCore::OAuthUser::\"12345678-1234-1234-1234-123456789012\"", "action": "AgentCore::Action::\"RefundTool___process_refund\"", "resource": "AgentCore::Gateway::\"arn:aws:bedrock-agentcore:us-west-2:123456789012:gateway/refund-gateway\"", "context": { "input": { "orderId": "12345", "amount": 450, "reason": "Defective product" } } }
구성 요소:
- 위탁자
-
JWT 토큰의 하위 클레임에서 생성됨:
AgentCore::OAuthUser::"12345678-1234-1234-1234-123456789012" - 작업
-
도구 이름에서 추출:
AgentCore::Action::"RefundTool___process_refund" - Resource
-
게이트웨이 인스턴스:
AgentCore::Gateway::"arn:aws:bedrock-agentcore:us-west-2:123456789012:gateway/refund-gateway" - 컨텍스트
-
도구 인수를 포함합니다.
{ "input": { "orderId": "12345", "amount": 450, "reason": "Defective product" } }
Entity Store - JWT 클레임은 OAuthUser 엔터티에 태그로 저장됩니다.
{ "uid": { "type": "AgentCore::OAuthUser", "id": "12345678-1234-1234-1234-123456789012" }, "attrs": { "id": "12345678-1234-1234-1234-123456789012" }, "tags": { "username": "refund-agent", "iss": "https://cognito-idp.us-east-1.amazonaws.com/us-east-1_Vg2efaoGO", "scope": "aws.cognito.signin.user.admin refund:write", "role": "admin", "department": "finance" } }
정책 평가
Cedar는 다음을 평가합니다.
-
보안 주체 확인: 보안 주체가 OAuthUser입니까? ✓ (일치)
-
작업 확인: 작업이 RefundTool___process_refund입니까? ✓ (일치)
-
리소스 확인: 리소스가 환급 게이트웨이입니까? ✓ (일치)
-
조건 확인:
-
보안 주체에 사용자 이름 태그가 있습니까? ✓ (예, JWT에서)
-
username = "refund-agent"입니까? ✓ (예)
-
context.input.amount가 < 500입니까? ✓ (450 < 500)
-
결과: 허용 - 모든 검사가 통과하면 환불이 승인됩니다.