

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# Verified Access トラストデータのデフォルトコンテキスト
<a name="trust-data-default-context"></a>

AWS Verified Access には、設定された信頼プロバイダーに関係なく、すべての Cedar 評価に現在のリクエストに関するいくつかの要素がデフォルトで含まれています。必要に応じて、データに対して評価を行うポリシーを作成できます。

以下は、評価に含まれるデータの例です。

**Topics**
+ [HTTP リクエスト](#default-context-http-request)
+ [TCP フロー](#default-context-tcp-flow)

## HTTP リクエスト
<a name="default-context-http-request"></a>

ポリシーが評価されると、Verified Access は `context.http_request`キーの Cedar コンテキストに現在の HTTP リクエストに関するデータを含めます。

```
{
    "title": "HTTP Request data included by Verified Access",
    "type": "object",
    "properties": {
        "http_method": {
            "type": "string",
            "description": "The HTTP method",
            "example": "GET"
        },
        "hostname": {
            "type": "string",
            "description": "The host subcomponent of the authority component of the URI",
            "example": "example.com"
        },
        "path": {
            "type": "string",
            "description": "The path component of the URI",
            "example": "app/images"
        },
        "query": {
            "type": "string",
            "description": "The query component of the URI",
            "example": "value1=1&value2=2"
        },
        "x_forwarded_for": {
            "type": "string",
            "description": "The value of the X-Forwarded-For request header",
            "example": "17.7.7.1"
        },
        "port": { 
           "type": "integer",
           "description": "The endpoint port",
           "example": 443
        },
        "user_agent": {
            "type": "string",
            "description": "The value of the User-Agent request header",
            "example": "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0"
        },
        "client_ip": {
            "type": "string",
            "description": "The IP address connecting to the endpoint",
            "example": "15.248.6.6"
        }
    }
}
```

**ポリシーの例**  
以下は、HTTP リクエストデータを使用する Cedar ポリシーの例です。

```
forbid(principal, action, resource) when {
   context.http_request.http_method == "POST"
   && !(context.identity.roles.contains("Administrator"))
 };
```

## TCP フロー
<a name="default-context-tcp-flow"></a>

ポリシーが評価されると、Verified Access は`context.tcp_flow`キーの下の Cedar コンテキストに現在の TCP フローに関するデータを含めます。

```
{
    "title": "TCP flow data included by Verified Access",
    "type": "object",
    "properties": {
        "destination_ip": {
            "type": "string",
            "description": "The IP address of the target",
            "example": "192.100.1.3"
        },
        "destination_port": {
            "type": "string",
            "description": "The target port",
            "example": 22
        },
        "client_ip": {
            "type": "string",
            "description": "The IP address connecting to the endpoint",
            "example": "172.154.16.9"
        }
    }
}
```