# AWS CloudFront

## 개요

Panther는 Amazon Web Services(AWS)를 수집하는 것을 지원합니다 [CloudFront 표준 로그(액세스 로그라고도 함)](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/AccessLogs.html) AWS S3를 통해.

## AWS CloudFront 표준 로그를 Panther에 온보딩하는 방법

### 1단계: CloudFront 배포에서 표준 로깅 활성화

CloudFront 로그를 Panther로 가져오려면 먼저 모니터링하려는 CloudFront 배포에서 표준 로깅을 활성화해야 합니다. 아래 지침은 기존 배포를 편집하는 방법을 설명하지만, 새 배포를 생성할 때 표준 로깅을 활성화하는 것도 가능합니다.

1. AWS 콘솔에서 다음으로 이동하세요 **CloudFront**.
2. 샘플 로그 **배포(Distributions).**
   * 관심 있는 배포를 찾은 다음 클릭하세요.
3. 오른쪽 상단의 **설정** 타일에서 **편집을 클릭**.
4. 아래로 스크롤하여 **표준 로깅** 필드에서 이를 **켜기**. 나타나는 필드를 구성하세요:
   * **S3 버킷**: 로그를 전송할 버킷의 이름을 입력하세요.
   * **로그 접두사 -&#x20;*****선택 사항***: 원한다면 로그 파일 이름 앞에 붙일 접두사 값을 입력하세요.
   * **쿠키 로깅**: 선택적으로 이 필드를 **켜기**.
     * 만약 **쿠키 로깅** 값이 다음으로 설정되어 있습니다 **켜기**되면, [`AWS.CloudFrontAccess`](#aws.cloudfrontaccess) 스키마는 표준 로그에 전송된 쿠키를 캡처합니다.

<figure><img src="https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-37884578526db2832c51d095a39c788685eda60e%2FScreenshot%202024-06-12%20at%202.24.48%20PM.png?alt=media" alt="Under a Standard logging header are Off/On radio buttons. Below those are three fields: S3 bucket, Log prefix - optional, and Cookie logging." width="563"><figcaption></figcaption></figure>

### 2단계: Panther에서 CloudFront 로그 소스 생성

{% hint style="info" %}
CloudFront 표준 로그를 라우팅하는 S3 버킷이 이미 Panther에 온보드된 경우 해당 소스에 `AWS.CloudFrontAccess` 스키마를 연결하고 이 단계를 건너뛸 수 있습니다.
{% endhint %}

1. Panther 콘솔의 왼쪽 탐색 창에서 **구성** > **로그 소스**.
2. 를 선택하고 Panther가 설치된 계정 ID를 입력하십시오. **새로 만들기**.
3. "AWS CloudFront"를 검색한 다음 해당 타일을 클릭하세요.
4. 슬라이드 아웃 패널에서 클릭하세요 **설정 시작**.

   <figure><img src="https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-5db64adf8f15283df5fe20e45e494645d67a3e38%2FScreenshot%202024-06-12%20at%202.33.48%20PM.png?alt=media" alt="An arrow is drawn from an &#x22;AWS CloudFront&#x22; tile in the background to a Start Setup button on a slide-out panel. The panel is titled &#x22;AWS CloudFront.&#x22;"><figcaption></figcaption></figure>
5. 다음을 따르세요 [S3 구성에 대한 Panther 문서](https://docs.panther.com/ko/data-onboarding/data-transports/aws/s3).
   * 1단계에서 사용한 S3 버킷의 이름을 제공해야 합니다.

## 지원되는 로그

### AWS.CloudFrontAccess

```yaml
스키마: AWS.CloudFrontAccess
파서:
    csv:
        구분자: "\t"
        열:
            - date
            - time
            - x-edge-location
            - sc-bytes
            - c-ip
            - cs-method
            - cs-Host
            - cs-uri-stem
            - sc-status
            - cs-Referer
            - cs-UserAgent
            - cs-uri-query
            - cs-Cookie
            - x-edge-result-type
            - x-edge-request-id
            - x-host-header
            - cs-protocol
            - cs-bytes
            - time-taken
            - x-forwarded-for
            - ssl-protocol
            - ssl-cipher
            - x-edge-response-result-type
            - cs-protocol-version
            - fle-status
            - fle-encrypted-fields
            - c-port
            - time-to-first-byte
            - x-edge-detailed-result-type
            - sc-content-type
            - sc-content-len
            - sc-range-start
            - sc-range-end
        skipPrefix: '#'
        emptyValues:
            - '-'
        expandFields:
            timestamp: '%{date} %{time}'
필드:
    - 이름: timestamp
      description: 이벤트가 발생한 날짜 및 시간(날짜와 시간).
      type: timestamp
      timeFormat: '%Y-%m-%d %H:%M:%S'
      isEventTime: true
    - name: x-edge-location
      description: 요청을 처리한 AWS 엣지 로케이션.
      type: string
    - name: sc-bytes
      description: 클라이언트로 전송된 바이트 수.
      type: bigint
    - name: c-ip
      description: 요청을 한 뷰어의 IP 주소.
      type: string
      지표:
        - ip
    - name: cs-method
      description: 요청에 사용된 HTTP 메서드.
      type: string
    - name: cs-Host
      description: 요청의 호스트 헤더.
      type: string
      지표:
        - hostname
    - name: cs-uri-stem
      description: 요청의 URI 스템(stem).
      type: string
    - name: sc-status
      description: 응답의 HTTP 상태 코드.
      type: bigint
    - name: cs-Referer
      description: HTTP 리퍼러.
      type: string
      지표:
        - url
    - name: cs-UserAgent
      description: 요청의 User-Agent 헤더.
      type: string
    - name: cs-uri-query
      description: URI의 쿼리 문자열 부분.
      type: string
    - name: cs-Cookie
      description: 요청의 Cookie 헤더(있는 경우).
      type: string
    - name: x-edge-result-type
      description: 요청의 결과 유형.
      type: string
    - name: x-edge-request-id
      description: CloudFront에서 생성한 고유한 요청 ID.
      type: string
    - name: x-host-header
      description: 요청의 호스트 헤더.
      type: string
    - name: cs-protocol
      description: 요청에 사용된 프로토콜.
      type: string
    - name: cs-bytes
      description: 응답 바이트.
      type: bigint
    - name: time-taken
      description: 서버가 뷰어의 요청을 받은 시점부터 응답의 마지막 바이트를 출력 큐에 쓸 때까지의 초 단위 시간.
      type: float
    - name: x-forwarded-for
      description: 요청을 시작한 뷰어의 IP 주소.
      type: string
      지표:
        - ip
    - name: ssl-protocol
      description: 요청과 응답을 전송하기 위해 협상된 SSL/TLS 프로토콜.
      type: string
    - name: ssl-cipher
      description: 요청과 응답을 암호화하기 위해 협상된 SSL/TLS 암호화 방식(사이퍼).
      type: string
    - name: x-edge-response-result-type
      description: '서버가 뷰어에게 응답을 반환하기 직전에 응답을 어떻게 분류했는지. 값은 다음 중 하나일 수 있습니다: Hit, RefreshHit, Miss, LimitExceeded, CapacityExceeded, Error, Redirect'
      type: string
    - name: cs-protocol-version
      description: 뷰어가 요청에서 지정한 HTTP 버전.
      type: string
    - name: fle-status
      description: 요청 본문이 성공적으로 처리되었는지 여부를 나타내는 필드 수준 암호화 상태.
      type: string
    - name: fle-encrypted-fields
      description: 필드 수준 암호화된 필드의 수로, 암호화되어 오리진으로 전달된 필드 수.
      type: string
    - name: c-port
      description: 뷰어의 요청 포트 번호.
      type: bigint
    - name: time-to-first-byte
      description: 요청을 수신하고 응답의 첫 번째 바이트를 기록할 때까지의 초 단위 시간.
      type: float
    - name: x-edge-detailed-result-type
      description: 특정 오류에 대한 추가 정보를 제공하는 상세한 결과 유형.
      type: string
    - name: sc-content-type
      description: 응답의 HTTP Content-Type 헤더 값.
      type: string
    - name: sc-content-len
      description: 응답의 HTTP Content-Length 헤더 값.
      type: bigint
    - name: sc-range-start
      description: 응답에 HTTP Content-Range 헤더가 포함된 경우의 범위 시작 값.
      type: bigint
    - name: sc-range-end
      description: 응답에 HTTP Content-Range 헤더가 포함된 경우의 범위 끝 값.
      type: bigint
```
