

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

# Transfer Family 웹 앱에 대한 CloudTrail 로깅
<a name="webapp-cloudtrail"></a>

CloudTrail은 내에서 수행된 작업의 레코드를 AWS 서비스 생성하는 입니다 AWS 계정. 콘솔 로그인, AWS Command Line Interface 명령 및 SDK/API 작업과 같은 활동에 대한 API 작업을 지속적으로 모니터링하고 기록합니다. 이를 통해 누가 언제 어디서 어떤 조치를 취했는지에 대한 로그를 유지할 수 있습니다. CloudTrail은 AWS 환경의 모든 활동에 대한 기록을 제공하여 감사, 액세스 관리 및 규정 준수를 지원합니다.

Transfer Family 웹 앱의 경우 사용자가 수행한 인증 이벤트와 데이터 액세스 작업을 모두 추적할 수 있습니다. 포괄적인 로깅을 활성화하려면 다음을 수행해야 합니다.

1. 인증 활동을 추적하기 위한 관리 이벤트를 로깅하도록 CloudTrail을 구성합니다.

1. Amazon S3 데이터 이벤트를 활성화하여 웹 앱을 통해 수행된 파일 작업을 추적합니다.

**참고 항목**
+ [IAM Identity Center의 CloudTrail 사용 사례](https://docs.aws.amazon.com/singlesignon/latest/userguide/sso-cloudtrail-use-cases.html)
+ [IAM Identity Center 로그인 이벤트 이해](https://docs.aws.amazon.com/singlesignon/latest/userguide/understanding-sign-in-events.html)
+ [CloudTrail userIdentity 요소](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-event-reference-user-identity.html)
+ [S3 버킷 및 객체에 대한 CloudTrail 이벤트 로깅 사용 설정](https://docs.aws.amazon.com/AmazonS3/latest/userguide/enable-cloudtrail-logging-for-s3.html)
+ [Amazon S3 CloudTrail 이벤트](https://docs.aws.amazon.com/AmazonS3/latest/userguide/cloudtrail-logging-s3-info.html)

## Amazon S3 데이터 이벤트 활성화
<a name="webapp-enable-s3-data-events"></a>

Amazon S3 버킷에서 Transfer Family 웹 앱을 통해 수행된 파일 작업을 추적하려면 해당 버킷에 대한 데이터 이벤트를 활성화해야 합니다. 데이터 이벤트는 객체 수준 API 활동을 제공하며 웹 앱 사용자가 수행하는 파일 업로드, 다운로드 및 기타 작업을 추적하는 데 특히 유용합니다.

Transfer Family 웹 앱에 대해 Amazon S3 데이터 이벤트를 활성화하려면:

1. [https://console.aws.amazon.com/cloudtrail/](https://console.aws.amazon.com/cloudtrail/)에서 CloudTrail 콘솔을 엽니다.

1. 탐색 창에서 **추적을** 선택한 다음 기존 추적을 선택하거나 새 추적을 생성합니다.

1. **고급 이벤트 선택기**에서 **편집**을 선택합니다.

1. **고급 이벤트 선택기 추가**를 선택합니다.

1. 첫 번째 필드 선택기의 경우:
   + **필드를** 로 설정 `eventCategory`
   + **연산**자를 **같음**으로 설정
   + **값을** 로 설정 `Data`

1. **필드 추가**를 선택하고 두 번째 필드 선택기를 선택합니다.
   + **필드를** 로 설정 `resources.type`
   + **연산**자를 **같음**으로 설정
   + **값을** 로 설정 `AWS::S3::Object`

1. (선택 사항) 특정 버킷에 대해서만 이벤트를 로깅하려면 **필드 추가**를 선택하고 다음을 추가합니다.
   + **필드를** 로 설정 `resources.ARN`
   + **연산**자를 **로 시작**으로 설정
   + **값을** 로 설정 `arn:aws:s3:::your-bucket-name/`

1. **변경 사항 저장**을 선택합니다.

또는 레거시 데이터 이벤트 구성을 사용할 수 있습니다.

1. **데이터 이벤트**에서 **편집**을 선택합니다.

1. **데이터 이벤트 유형**에서 **S3 버킷 및 객체 이벤트를** 선택합니다.

1. 데이터 이벤트를 로깅할 Amazon S3 버킷을 선택합니다. **모든 현재 및 미래 S3 버킷을** 선택하거나 개별 버킷을 지정할 수 있습니다.

1. **읽기** 이벤트, **쓰기** 이벤트 또는 둘 다를 로깅할지 여부를 선택합니다.

1. **변경 사항 저장**을 선택합니다.

데이터 이벤트를 활성화한 후 CloudTrail용으로 구성된 Amazon S3 버킷에서 이러한 로그에 액세스할 수 있습니다. 로그에는 작업을 수행한 사용자, 작업 타임스탬프, 영향을 받는 특정 객체, Transfer Family 웹 앱을 통해 수행된 작업에 `userId` 대해를 추적하는 데 도움이 되는 `onBehalfOf` 필드와 같은 세부 정보가 포함됩니다.

### 로그 찾기 및 보기
<a name="webapp-find-view-logs"></a>

Transfer Family 웹 앱에 대한 CloudTrail 로그를 찾고 보는 방법에는 여러 가지가 있습니다.

#### CloudTrail 콘솔 사용
<a name="webapp-find-logs-console"></a>

최근 이벤트를 보는 가장 빠른 방법:

1. [https://console.aws.amazon.com/cloudtrail/](https://console.aws.amazon.com/cloudtrail/)에서 CloudTrail 콘솔을 엽니다.

1. **이벤트 기록**을 선택합니다.

1. 다음을 기준으로 이벤트를 필터링합니다.
   + **이벤트 소스**: 웹 앱 이벤트`signin.amazonaws.com`용
   + **이벤트 소스**: 파일 작업`s3.amazonaws.com`용

1. 이벤트를 클릭하면 자세한 정보를 볼 수 있습니다.

#### Amazon S3에서 로그 액세스
<a name="webapp-find-logs-s3"></a>

Amazon S3에 저장된 전체 로그 파일에 액세스하려면:

1. CloudTrail 추적의 Amazon S3 버킷을 식별합니다.

   ```
   aws cloudtrail describe-trails --query 'trailList[*].[Name,S3BucketName]' --output table
   ```

1. Amazon S3의 로그 파일로 이동합니다.

   ```
   aws s3 ls s3://your-cloudtrail-bucket/AWSLogs/account-id/CloudTrail/region/YYYY/MM/DD/
   ```

1. 웹 앱 ID에 대한 로그 파일을 다운로드하고 검색합니다.

   ```
   aws s3 cp s3://your-cloudtrail-bucket/AWSLogs/account-id/CloudTrail/region/YYYY/MM/DD/ . --recursive
   gunzip *.json.gz
   grep -l "webapp-1a2b3c4d5e6f7g8h9" *.json
   ```

#### AWS CLI 를 사용하여 이벤트 검색
<a name="webapp-find-logs-cli"></a>

 AWS CLI다음을 사용하여 특정 웹 앱 이벤트를 검색합니다.

```
aws logs filter-log-events \
  --log-group-name /aws/cloudtrail/your-trail-name \
  --filter-pattern "webapp-1a2b3c4d5e6f7g8h9" \
  --start-time $(date -d "1 day ago" +%s)000
```

또는 인증 이벤트를 검색합니다.

```
aws logs filter-log-events \
  --log-group-name /aws/cloudtrail/your-trail-name \
  --filter-pattern "UserAuthentication" \
  --start-time $(date -d "1 day ago" +%s)000
```

## 인증 로그 예제
<a name="webapp-authentication-log-examples"></a>

CloudTrail은 Transfer Family 웹 앱에 대한 인증 이벤트를 로깅하므로 성공 및 실패한 로그인 시도를 추적하는 데 도움이 될 수 있습니다. 이러한 로그는 보안 모니터링 및 규정 준수 목적에 특히 유용합니다.

**Topics**
+ [자격 증명 확인을 위한 로그 항목의 예](#webapp-credential-verification-example)
+ [로그인 인증을 위한 로그 항목 예제](#webapp-signin-authentication-example)
+ [ListCallerAccessGrants의 로그 항목 예제](#webapp-list-caller-access-grants-example)
+ [GetDataAccess 이벤트에 대한 로그 항목 예제](#webapp-get-data-access-example)

### 자격 증명 확인을 위한 로그 항목의 예
<a name="webapp-credential-verification-example"></a>

다음 예제는 인증 프로세스 중에 발생하는 자격 증명 확인 이벤트에 대한 CloudTrail 로그 항목을 보여줍니다.

```
{
    "eventVersion": "1.09",
    "userIdentity": {
        "type": "Unknown",
        "principalId": "123456789012",
        "arn": "",
        "accountId": "123456789012",
        "accessKeyId": "",
        "userName": "demo-user-2",
        "onBehalfOf": {
            "userId": "f12bb510-a011-702f-10dd-5607e2776dbc",
            "identityStoreArn": "arn:aws:identitystore::123456789012:identitystore/d-9a670c546e"
        },
        "credentialId": "58138a11-87e5-401d-8f0b-7161c9389112"
    },
    "eventTime": "2025-08-08T15:29:30Z",
    "eventSource": "signin.amazonaws.com",
    "eventName": "CredentialVerification",
    "awsRegion": "us-east-2",
    "sourceIPAddress": "192.0.2.224",
    "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36",
    "requestParameters": null,
    "responseElements": null,
    "additionalEventData": {
        "AuthWorkflowID": "f304a48b-7b6d-41c8-b136-4f49c91c1f31",
        "CredentialType": "PASSWORD"
    },
    "requestID": "ff936828-4a81-453c-802d-81368b6bca1a",
    "eventID": "70cb7008-493d-42c2-a9eb-38bf168af6a8",
    "readOnly": false,
    "eventType": "AWS ServiceEvent",
    "managementEvent": true,
    "recipientAccountId": "123456789012",
    "serviceEventDetails": {
        "CredentialVerification": "Success"
    },
    "eventCategory": "Management"
}
```

이 이벤트는 사용된 특정 자격 증명 ID 및 인증 워크플로 ID를 보여주는 인증 프로세스의 자격 증명 확인 단계에 대한 추가 세부 정보를 제공합니다.

### 로그인 인증을 위한 로그 항목 예제
<a name="webapp-signin-authentication-example"></a>

다음 예제는 IAM Identity Center를 사용하여 웹 앱 로그인 중 성공적인 사용자 인증 이벤트에 대한 CloudTrail 로그 항목을 보여줍니다.

```
{
    "eventVersion": "1.09",
    "userIdentity": {
        "type": "Unknown",
        "principalId": "123456789012",
        "arn": "",
        "accountId": "123456789012",
        "accessKeyId": "",
        "userName": "demo-user-2",
        "onBehalfOf": {
            "userId": "f12bb510-a011-702f-10dd-5607e2776dbc",
            "identityStoreArn": "arn:aws:identitystore::123456789012:identitystore/d-9a670c546e"
        },
        "credentialId": "b41f0a02-1635-4d07-a414-aecf9e14b906"
    },
    "eventTime": "2025-08-07T14:09:07Z",
    "eventSource": "signin.amazonaws.com",
    "eventName": "UserAuthentication",
    "awsRegion": "us-east-2",
    "sourceIPAddress": "192.0.2.14",
    "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36",
    "requestParameters": null,
    "responseElements": null,
    "additionalEventData": {
        "AuthWorkflowID": "7a4ef12c-7c4b-4bc3-b5bd-c2469afcc795",
        "LoginTo": "https://example.awsapps.com/start/",
        "CredentialType": "PASSWORD"
    },
    "requestID": "fc91bcf0-ac53-4454-a1a0-fb911eacc095",
    "eventID": "18522007-1e60-4a71-b2b5-150baf504ab3",
    "readOnly": false,
    "eventType": "AWS ServiceEvent",
    "managementEvent": true,
    "recipientAccountId": "123456789012",
    "serviceEventDetails": {
        "UserAuthentication": "Success"
    },
    "eventCategory": "Management"
}
```

이 예제에서는 다음 중요 필드를 기록해 둡니다.
+ `eventSource`: "signin.amazonaws.com"를 표시합니다. 이는 IAM Identity Center 인증 이벤트임을 나타냅니다.
+ `userIdentity.onBehalfOf`: 웹 앱 사용자의 사용자 ID 및 자격 증명 스토어 ARN을 포함합니다.
+ `additionalEventData.LoginTo`: 액세스 중인 IAM Identity Center 애플리케이션 URL을 표시합니다.
+ `additionalEventData.CredentialType`: 사용된 인증 방법(PASSWORD)을 나타냅니다.
+ `serviceEventDetails`: 인증 결과(성공)를 표시합니다.

### ListCallerAccessGrants의 로그 항목 예제
<a name="webapp-list-caller-access-grants-example"></a>

다음 예제는 Transfer Family 웹 앱이 사용자에 대해 사용 가능한 액세스 권한을 쿼리할 때 발생하는 ListCallerAccessGrants 이벤트에 대한 CloudTrail 로그 항목을 보여줍니다.

```
{
    "eventVersion": "1.11",
    "userIdentity": {
        "type": "AssumedRole",
        "principalId": "AROAEXAMPLEID:aws-transfer",
        "arn": "arn:aws:sts::123456789012:assumed-role/AWS TransferWebAppIdentityBearer-us-east-2/aws-transfer",
        "accountId": "123456789012",
        "accessKeyId": "ASIAEXAMPLEKEY",
        "sessionContext": {
            "sessionIssuer": {
                "type": "Role",
                "principalId": "AROAEXAMPLEID",
                "arn": "arn:aws:iam::123456789012:role/service-role/AWS TransferWebAppIdentityBearer-us-east-2",
                "accountId": "123456789012",
                "userName": "AWS TransferWebAppIdentityBearer-us-east-2"
            },
            "attributes": {
                "creationDate": "2025-08-08T15:29:34Z",
                "mfaAuthenticated": "false"
            }
        },
        "invokedBy": "transfer.amazonaws.com",
        "onBehalfOf": {
            "userId": "f12bb510-a011-702f-10dd-5607e2776dbc",
            "identityStoreArn": "arn:aws:identitystore::123456789012:identitystore/d-9a670c546e"
        }
    },
    "eventTime": "2025-08-08T15:29:35Z",
    "eventSource": "s3.amazonaws.com",
    "eventName": "ListCallerAccessGrants",
    "awsRegion": "us-east-2",
    "sourceIPAddress": "transfer.amazonaws.com",
    "userAgent": "transfer.amazonaws.com",
    "requestParameters": {
        "Host": "123456789012.s3-control.dualstack.us-east-2.amazonaws.com",
        "allowedByApplication": "true",
        "maxResults": "100"
    },
    "responseElements": null,
    "additionalEventData": {
        "SignatureVersion": "SigV4",
        "CipherSuite": "TLS_AES_128_GCM_SHA256",
        "bytesTransferredIn": 0,
        "AuthenticationMethod": "AuthHeader",
        "x-amz-id-2": "1g34AaAELn/fntxwrifVsr41VDl8dp5ygWFasHJFNVq5FDCWYfX0ye7s4tWHEJC8ppI5lLePYLIcw3iTXAgn5Q==",
        "bytesTransferredOut": 462
    },
    "requestID": "48485MTZEDWT0ANT",
    "eventID": "3de5dd60-b7cf-474c-a1ab-631467c1a5c3",
    "readOnly": true,
    "resources": [
        {
            "accountId": "123456789012",
            "type": "AWS:S3::AccessGrantsInstance",
            "ARN": "arn:aws:s3:us-east-2:123456789012:access-grants/default"
        }
    ],
    "eventType": "AWS ApiCall",
    "managementEvent": true,
    "recipientAccountId": "123456789012",
    "eventCategory": "Management"
}
```

이 예제에서는 다음 중요 필드를 기록해 둡니다.
+ `eventName`: 사용 가능한 S3 액세스 권한 부여를 쿼리하는 ListCallerAccessGrants 이벤트임을 보여줍니다.
+ `requestParameters.allowedByApplication`: 쿼리가 애플리케이션에서 허용하는 권한 부여로 필터링됨을 나타냅니다.
+ `requestParameters.maxResults`: 응답에 반환할 최대 권한 부여 수를 표시합니다.
+ `userIdentity.onBehalfOf`: 요청을 특정 웹 앱 사용자에게 연결합니다.

이 이벤트는 Transfer Family 웹 앱이 사용자가 액세스할 수 있는 S3 리소스를 쿼리하는 시기를 추적하여 액세스 권한 부여 검색 작업에 대한 가시성을 제공합니다.

### GetDataAccess 이벤트에 대한 로그 항목 예제
<a name="webapp-get-data-access-example"></a>

다음 예제는 Transfer Family 웹 앱이 사용자를 대신하여 S3 리소스에 대한 액세스 권한을 요청할 때 발생하는 GetDataAccess 이벤트에 대한 CloudTrail 로그 항목을 보여줍니다.

```
{
    "eventVersion": "1.11",
    "userIdentity": {
        "type": "AssumedRole",
        "principalId": "AROASEQRAEABP7ADWEZA5:aws-transfer",
        "arn": "arn:aws:sts::123456789012:assumed-role/AWSTransferWebAppIdentityBearer-ap-southeast-1/aws-transfer",
        "accountId": "123456789012",
        "accessKeyId": "ASIAEXAMPLEKEY",
        "sessionContext": {
            "sessionIssuer": {
                "type": "Role",
                "principalId": "AROASEQRAEABP7ADWEZA5",
                "arn": "arn:aws:iam::123456789012:role/service-role/AWSTransferWebAppIdentityBearer-ap-southeast-1",
                "accountId": "123456789012",
                "userName": "AWSTransferWebAppIdentityBearer-ap-southeast-1"
            },
            "attributes": {
                "creationDate": "2025-05-08T16:09:05Z",
                "mfaAuthenticated": "false"
            }
        },
        "invokedBy": "transfer.amazonaws.com",
        "onBehalfOf": {
            "identityStoreArn": "arn:aws:identitystore::123456789012:identitystore/d-9667b0da7a",
            "userId": "191a35ec-10a1-70c1-e4ab-e2802411e13e"
        }
    },
    "eventTime": "2025-05-08T16:10:25Z",
    "eventSource": "s3.amazonaws.com",
    "eventName": "GetDataAccess",
    "awsRegion": "ap-southeast-1",
    "sourceIPAddress": "transfer.amazonaws.com",
    "userAgent": "transfer.amazonaws.com",
    "requestParameters": {
        "Host": "123456789012.s3-control.dualstack.ap-southeast-1.amazonaws.com",
        "durationSeconds": 900,
        "permission": "READWRITE",
        "target": "s3://amzn-s3-demo-bucket/users/john.doe/documents/*"
    },
    "responseElements": null,
    "additionalEventData": {
        "AuthenticationMethod": "AuthHeader",
        "CipherSuite": "TLS_AES_128_GCM_SHA256",
        "SignatureVersion": "SigV4",
        "bytesTransferredIn": 0,
        "bytesTransferredOut": 2244,
        "x-amz-id-2": "8ce8sZOgNwsaj9w1mzagyA+csONjYl8FgEw4FGpE8DARi90aNC0RFWlTYNEn7ChqE9RCJrTzMvS+ru7Vz2xXHrkQt/1uQ9exZTZdlhX+/fM="
    },
    "requestID": "BXGSKKQXCWS5RAHB",
    "eventID": "c11db1d1-dfb8-431e-8625-48eba2ebadfe",
    "readOnly": true,
    "resources": [
        {
            "type": "AWS:S3::AccessGrantsInstance",
            "ARN": "arn:aws:s3:ap-southeast-1:123456789012:access-grants/default",
            "accountId": "123456789012"
        }
    ],
    "eventType": "AwsApiCall",
    "managementEvent": true,
    "recipientAccountId": "123456789012",
    "eventCategory": "Management"
}
```

이 예제에서는 다음 중요 필드를 기록해 둡니다.
+ `eventName`: Transfer Family가 S3 리소스에 대한 액세스 권한을 요청할 때 발생하는 GetDataAccess 이벤트임을 보여줍니다.
+ `userIdentity.onBehalfOf`: 액세스 요청을 특정 웹 앱 사용자에게 연결하는 자격 증명 스토어 ARN 및 사용자 ID를 포함합니다.
+ `requestParameters.target`: 액세스가 요청된 S3 경로 패턴을 표시합니다.
+ `requestParameters.permission`: 요청된 액세스 유형(READWRITE, READ 또는 WRITE)을 나타냅니다.
+ `requestParameters.durationSeconds`: 액세스 권한 부여가 유효한 기간을 표시합니다(일반적으로 900초/15분).
+ `sourceIPAddress` 및 `userAgent`: 둘 다 "transfer.amazonaws.com"을 표시합니다. 이는 내부 서비스 요청임을 나타냅니다.

GetDataAccess 이벤트는 Transfer Family 웹 앱 사용자에게 특정 S3 리소스에 대한 액세스 권한이 부여되는 시점을 추적하는 데 특히 유용하므로 액세스 패턴을 모니터링하고 적절한 인증을 보장하는 데 도움이 됩니다.

## CloudTrail 로그 항목 보기
<a name="webapp-view-log-entries"></a>

Transfer Family 웹 앱의 CloudTrail 로그 항목을 보고 분석하는 방법에는 여러 가지가 있습니다.

### CloudTrail 콘솔 사용
<a name="webapp-view-logs-console"></a>

CloudTrail 콘솔은 로그 항목을 보고 필터링할 수 있는 사용자 친화적 인터페이스를 제공합니다.

1. [https://console.aws.amazon.com/cloudtrail/](https://console.aws.amazon.com/cloudtrail/)에서 CloudTrail 콘솔을 엽니다.

1. 탐색 창에서 **Event history(이벤트 내역)**를 선택합니다.

1. 필터 옵션을 사용하여 이벤트의 범위를 좁힙니다.
   + Transfer Family 이벤트만 `transfer.amazonaws.com` 보려면 이벤트 **소스를** 로 설정합니다.
   + **이벤트 이름을** 기준으로 필터링하여와 같은 특정 작업을 확인합니다`UserAuthentication`.
   + **시간 범위를** 사용하여 특정 기간 내의 이벤트에 집중합니다.

1. 이벤트를 클릭하여 세부 정보를 확인합니다.

### Amazon S3에서 로그 액세스
<a name="webapp-view-logs-s3"></a>

Amazon S3 버킷에 로그를 전송하도록 CloudTrail 추적을 구성한 경우 원시 로그 파일에 직접 액세스할 수 있습니다.

1. [https://console.aws.amazon.com/s3/](https://console.aws.amazon.com/s3/)에서 S3 콘솔을 엽니다.

1. CloudTrail 로그가 저장되는 버킷 및 접두사로 이동합니다.

1. 로그는 연도, 월, 일 및 리전별로 구성됩니다. 적절한 디렉터리로 이동합니다.

1. JSON 형식의 로그 파일을 다운로드하여 엽니다.