

# AWS Signature Version 4(SigV4) 인증별 정책 키
<a name="s3-outposts-bucket-policy-s3-sigv4-conditions"></a>

다음 표는 Amazon S3 on Outposts와 함께 사용할 수 있는 AWS Signature Version 4(SigV4) 인증과 관련된 조건 키를 보여줍니다. 버킷 정책에서 이러한 조건을 추가하여 서명 버전 4를 사용하여 요청이 인증될 때 특정 동작을 적용할 수 있습니다. 예시 정책은 [서명 버전 4 관련 조건 키를 사용하는 버킷 정책 예제](#s3-outposts-bucket-policy-sig-v4-condition-key-example) 섹션을 참조하세요. 서명 버전 4를 사용한 요청 인증에 대한 자세한 내용은 [Amazon Simple Storage Service API 참조](https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html)의 *요청 인증(AWS 서명 버전 4)*을 참조하세요.


| 적용 가능한 키 | 설명 | 
| --- | --- | 
| `s3-outposts:authType` | S3 on Outposts는 다양한 인증 방법을 지원합니다. 특정 인증 방법을 사용하도록 수신 요청을 제한하려면 이 선택적 조건 키를 사용할 수 있습니다. 예를 들어 이 조건 키를 사용하여 요청 인증에 HTTP `Authorization` 헤더만 사용하도록 허용할 수 있습니다.<br />유효한 값: <br />`REST-HEADER` <br />`REST-QUERY-STRING`  | 
| `s3-outposts:signatureAge` | 인증된 요청에서 서명이 유효한 시간(밀리초)입니다.<br />이 조건은 미리 서명된 URL에만 적용됩니다.<br />서명 버전 4에서는 서명 키가 최대 7일간 유효합니다. 따라서 서명도 최대 7일간 유효합니다. 자세한 내용은 *Amazon Simple Storage Service API 참조*의 [서명 요청 소개](https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html#signing-request-intro)를 참조하세요. 이 조건을 사용하여 서명 연령을 추가로 제한할 수 있습니다.<br />예시 값: `600000` | 
| `s3-outposts:x-amz-content-sha256` | 이 조건 키를 사용하여 버킷에서 서명되지 않은 콘텐츠를 허용하지 않을 수 있습니다.<br />서명 버전 4를 사용할 때 `Authorization` 헤더를 사용하는 요청에 대해 서명 계산에 `x-amz-content-sha256` 헤더를 추가한 다음 해당 값을 해시 페이로드로 설정합니다.<br />버킷 정책에서 이 조건 키를 사용하여 페이로드가 서명되지 않은 업로드를 거부할 수 있습니다. 예:[See the AWS documentation website for more details](http://docs.aws.amazon.com/ko_kr/AmazonS3/latest/s3-outposts/s3-outposts-bucket-policy-s3-sigv4-conditions.html)<br />유효한 값: `UNSIGNED-PAYLOAD` | 

## 서명 버전 4 관련 조건 키를 사용하는 버킷 정책 예제
<a name="s3-outposts-bucket-policy-sig-v4-condition-key-example"></a>

다음 예제를 사용하려면 {{`user input placeholders`}}를 사용자의 정보로 대체합니다.

**Example : `s3-outposts:signatureAge`**  
다음 버킷 정책은 서명이 10분 이상 지난 경우 `example-outpost-bucket`의 객체에 대한 URL 요청이 사전 서명된 S3 on Outposts를 거부합니다.    
****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "Deny a presigned URL request if the signature is more than 10 minutes old",
            "Effect": "Deny",
            "Principal": {"AWS":"{{444455556666}}"},
            "Action": "s3-outposts:*",
            "Resource": "arn:aws:s3-outposts:{{us-east-1}}:{{111122223333}}:outpost/{{op-01ac5d28a6a232904}}/bucket/{{example-outpost-bucket}}/object/*",
            "Condition": {
                "NumericGreaterThan": {"s3-outposts:signatureAge": 600000},
                "StringEquals": {"s3-outposts:authType": "REST-QUERY-STRING"}
            }
        }
    ]
}
```

**Example : `s3-outposts:authType`**  
다음 버킷 정책은 요청 인증에 `Authorization` 헤더를 사용하는 요청만 허용합니다. 미리 서명된 URL은 쿼리 매개변수를 사용하여 요청 및 인증 정보를 제공하기 때문에 미리 서명된 URL 요청은 거부됩니다. 자세한 내용은 *Amazon Simple Storage Service API 참조*의 [인증 방법](https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html)을 참조하세요.    
****  

```
{
   "Version":"2012-10-17",		 	 	 
   "Statement": [
         {
               "Sid": "Allow only requests that use the Authorization header for request authentication. Deny presigned URL requests.",
               "Effect": "Deny",
               "Principal": {"AWS":"{{111122223333}}"},
               "Action": "s3-outposts:*",
               "Resource": "arn:aws:s3-outposts:{{us-east-1}}:{{111122223333}}:outpost/{{op-01ac5d28a6a232904}}/bucket/{{example-outpost-bucket}}/object/*",
               "Condition": {
                     "StringNotEquals": {
                           "s3-outposts:authType": "REST-HEADER"
                     }
               }
         }
   ]
}
```

**Example : `s3-outposts:x-amz-content-sha256`**  
다음 버킷 정책은 사전 서명된 URL을 사용하는 업로드와 같이 서명되지 않은 페이로드가 있는 모든 업로드를 거부합니다. 자세한 내용은 *Amazon Simple Storage Service API 참조*의 [인증 요청 ](https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html#query-string-auth-v4-signing) 및 [인증 방법](https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html)을 참조하세요.    
****  

```
{
   "Version":"2012-10-17",		 	 	 
   "Statement": [
         {
               "Sid": "Deny uploads with unsigned payloads.",
               "Effect": "Deny",
               "Principal": {"AWS":"{{111122223333}}"},
               "Action": "s3-outposts:*",
               "Resource": "arn:aws:s3-outposts:{{us-east-1}}:{{111122223333}}:outpost/{{op-01ac5d28a6a232904}}/bucket/{{example-outpost-bucket}}/object/*",
               "Condition": {
                     "StringEquals": {
                           "s3-outposts:x-amz-content-sha256": "UNSIGNED-PAYLOAD"
                     }
               }
         }
   ]
}
```