# MongoDB Atlas 로그

## 개요

Panther는 다음을 쿼리하여 MongoDB Atlas 이벤트 로그를 가져올 수 있습니다 [MongoDB Atlas 관리 API](https://www.mongodb.com/docs/atlas/configure-api-access/). Panther는 특별히 다음 MongoDB Atlas 이벤트를 모니터링합니다:

* [조직 이벤트](https://www.mongodb.com/docs/atlas/reference/api/events-orgs-get-all/) 호스트, 암호화, 청구, 사용자 접근 등과 관련된 다양한 항목.
* [프로젝트 이벤트](https://www.mongodb.com/docs/atlas/reference/api/events-projects-get-all/) 호스트, 암호화, 청구, 사용자 접근 등과 관련된 다양한 항목.

Panther에 MongoDB Atlas를 로그 소스로 설정하려면 MongoDB 계정에서 API 키를 생성한 다음 Panther에서 MongoDB Atlas를 로그 소스로 설정해야 합니다.

## MongoDB Atlas 로그를 Panther에 온보딩하는 방법

### 단계 1: MongoDB Atlas에서 API 키 생성

1. 콘솔로. **액세스 관리자** 조직 페이지.
   1. 이미 표시되지 않은 경우, 탐색 메뉴에서 원하는 조직을 선택하세요 **조직** 탐색 메뉴의 메뉴.
   2. 탐색 메뉴에서 클릭하세요 **액세스 관리자**, 그런 다음 조직을 선택하세요.
2. 를 선택하고 Panther가 설치된 계정 ID를 입력하십시오. **새로 추가** > **API 키**.\ <img src="https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-525c97b7b88466fb76c975c4237e8e0afd519554%2Fimage%20(28).png?alt=media" alt="An arrow is drawn from an &#x22;Add new&#x22; button to an &#x22;API Key&#x22; option in a menu." data-size="original">
3. 에서 **API 키 정보 입력**, 필드들을 입력하세요:
   * **설명**: API 키에 대한 설명을 입력하세요. 예: `Panther 로그 풀러`.
   * **조직 권한**: API 키에 대해 하나 이상의 [역할](https://www.mongodb.com/docs/atlas/reference/user-roles/#std-label-organization-roles) 을 선택하세요. 예: `조직 읽기 전용`.\
     ![Under a "Create API Key" header, there are Description and Organization Permissions form fields.](https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-3e362f9b9562cf92a3e31c05e15cef1770fa11f6%2Fimage%20\(29\).png?alt=media)
4. 를 선택하고 Panther가 설치된 계정 ID를 입력하십시오. **다음**.
5. 공개 키를 복사하여 안전한 장소에 보관하세요. 공개 키는 API 요청 시 사용자 이름 역할을 합니다.
6. 비공개 키를 복사하여 안전한 장소에 보관하세요. 비공개 키는 API 요청 시 비밀번호 역할을 합니다.
7. 를 선택하고 Panther가 설치된 계정 ID를 입력하십시오. **를 사용할 수 있습니다.**.

### 단계 2: Panther에서 새 MongoDB Atlas 로그 소스 생성

1. Panther 콘솔의 왼쪽 탐색 창에서 **구성** > **로그 소스**.
2. 오른쪽 상단에서 클릭하세요 **새로 만들기.**
3. "MongoDB Atlas"를 검색한 다음 해당 타일을 클릭하세요.
4. 를 선택하고 Panther가 설치된 계정 ID를 입력하십시오. **설정 시작.**
5. 다음 화면에서 소스에 대한 기억하기 쉬운 이름을 입력하세요. 예: `내 MongoDB Atlas 로그`.
6. 를 선택하고 Panther가 설치된 계정 ID를 입력하십시오. **Panther 콘솔에서 필드에 값을 입력하세요:**
7. 페이지에서 **자격증명 설정** 페이지에서 양식을 작성하세요:
   * Panther는 이 값을 **생성한 API 키** 를 MongoDB Atlas에서 API 키 필드로 가져오세요.
8. 를 선택하고 Panther가 설치된 계정 ID를 입력하십시오. **설정**. 성공 화면으로 이동됩니다:\\

   <figure><img src="https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-e55cedf82c6a6adc66ec5c14ebdcb164c3b1dcca%2FScreenshot%202023-08-03%20at%204.33.30%20PM.png?alt=media" alt="The success screen reads, &#x22;Everything looks good! Panther will now automatically pull &#x26; process logs from your account&#x22;" width="281"><figcaption></figcaption></figure>

   * 성공 화면으로 이동됩니다: [선택적으로 하나 이상의](https://docs.panther.com/detections/panther-managed/packs).
   * 사용자를 사용할 것이며, **가 활성화될 수 있습니다** "이벤트가 처리되지 않을 때 알러트를 트리거" **설정의 기본값은**. 로그 소스에서 일정 기간 동안 데이터 흐름이 중단되면 알림을 받으므로 이 옵션을 활성화 상태로 두는 것을 권장합니다. 시간 범위는 구성 가능하며 기본값은 24시간입니다.\\

     <figure><img src="https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-c48119abd559990173004bde99ff4907fdd2ded2%2FScreenshot%202023-08-03%20at%204.26.54%20PM.png?alt=media" alt="The &#x22;Trigger an alert when no events are processed&#x22; toggle is set to YES. The &#x22;How long should Panther wait before it sends you an alert that no events have been processed&#x22; setting is set to 1 Day" width="320"><figcaption></figcaption></figure>

## Panther 관리 디텍션

참조 [Panther 관리](https://docs.panther.com/ko/detections/panther-managed) MongoDB Atlas에 대한 룰 [panther-analysis GitHub 리포지토리](https://github.com/panther-labs/panther-analysis/tree/main/rules/mongodb_rules).

## 지원되는 로그 유형

### MongoDB.OrganizationEvent

```yaml
# Panther가 생성한 코드; 수정하지 마세요. (@generated)
스키마: MongoDB.OrganizationEvent
파서:
  네이티브:
    이름: MongoDB.OrganizationEvent
설명: 조직에 대한 모든 이벤트.
참조 URL: https://www.mongodb.com/docs/atlas/reference/api/events-orgs-get-all
필드:
  - 이름: alertId
    설명: 이벤트에 연결된 알러트의 고유 식별자
    type: string
  - 이름: alertConfigId
    설명: alertId에 연결된 알러트 구성의 고유 식별자
    type: string
  - 이름: apiKeyId
    설명: 이벤트를 발생시킨 API 키의 고유 식별자. 이 필드가 응답에 존재하면 Atlas는 userId 필드를 반환하지 않습니다
    type: string
    지표:
      - username
  - 이름: clusterName
    설명: 클러스터에 연결된 이름
    type: string
  - 이름: collection
    설명: 이벤트가 발생한 컬렉션의 이름. 이 필드는 eventTypeName이 DATA_EXPLORER 또는 DATA_EXPLORER_CRUD일 때 존재할 수 있습니다
    type: string
  - 이름: created
    required: true
    설명: rfc3339 표준 형식의 이벤트 날짜 및 시간
    type: timestamp
    시간 형식: rfc3339
    isEventTime: true
  - 이름: currentValue
    설명: 이벤트 시점의 metricName 값에 대해 설명합니다
    type: object
    필드:
      - 이름: number
        설명: 이벤트 시점의 metricName 값
        type: float
      - 이름: units
        설명: currentValue.number의 측정 단위
        type: string
  - 이름: database
    설명: 이벤트가 발생한 데이터베이스의 이름. 이 필드는 eventTypeName이 DATA_EXPLORER 또는 DATA_EXPLORER_CRUD일 때 존재할 수 있습니다
    type: string
  - 이름: eventTypeName
    required: true
    설명: 이벤트 유형을 나타내는 사람이 읽을 수 있는 레이블
    type: string
  - 이름: groupId
    설명: 이벤트가 발생한 프로젝트의 고유 식별자
    type: string
  - 이름: hostname
    설명: 이벤트와 연관된 Atlas 호스트 머신의 호스트명
    type: string
    지표:
      - hostname
  - 이름: id
    required: true
    설명: 이벤트의 고유 식별자
    type: string
  - 이름: invoiceId
    설명: 이벤트와 연관된 송장(인보이스)의 고유 식별자
    type: string
  - 이름: isGlobalAdmin
    설명: 이벤트를 발생시킨 사용자가 MongoDB 직원인지 여부를 나타냅니다
    유형: boolean
  - name: links
    설명: 하위 리소스 및/또는 관련 리소스로 연결되는 하나 이상의 URL. 웹 링크 명세(https://tools.ietf.org/html/5988)는 URL 간의 relation-type을 설명합니다
    type: array
    element:
      type: object
      필드:
        - name: href
          설명: 링크 대상, URL 또는 URL 프래그먼트
          type: string
          지표:
            - url
        - 이름: rel
          설명: 현재 문서와 링크된 문서 간의 관계(예: self)
          type: string
  - 이름: metricName
    설명: alertId에 연결된 메트릭의 이름
    type: string
  - 이름: opType
    설명: 발생한 작업의 유형. 이 필드는 eventTypeName이 DATA_EXPLORER 또는 DATA_EXPLORER_CRUD일 때 존재합니다
    type: string
  - 이름: orgId
    설명: 이벤트가 발생한 조직의 고유 식별자
    type: string
  - 이름: paymentId
    설명: 이벤트와 연관된 송장 결제의 고유 식별자
    type: string
  index: 0
    설명: mongod 또는 mongos가 수신하는 포트
    type: bigint
  - 이름: publicKey
    설명: 이벤트를 발생시킨 API 키와 연결된 공개 키. 이 필드가 응답에 존재하면 Atlas는 username 필드를 반환하지 않습니다
    type: string
    지표:
      - username
  - name: raw
    설명: 이벤트에 대한 추가 메타 정보
    유형: json
  - 이름: remoteAddress
    설명: 이벤트를 발생시킨 userId Atlas 사용자의 IP 주소
    type: string
    지표:
      - ip
  - 이름: replicaSetName
    설명: 이벤트와 연관된 레플리카 세트의 이름
    type: string
  - 이름: shardName
    설명: 이벤트와 연관된 샤드의 이름
    type: string
  - 이름: targetPublicKey
    설명: 이벤트가 대상으로 한 API 키의 공개 키
    type: string
    지표:
      - username
  - 이름: targetUsername
    설명: 이벤트가 대상으로 한 Atlas 사용자의 사용자 이름
    type: string
    지표:
      - username
  - 이름: teamId
    설명: 이벤트와 연관된 Atlas 팀의 고유 식별자
    type: string
  - 이름: userAlias
    설명: 클러스터 노드의 사용자 친화적 호스트명. 사용자 친화적 호스트명은 일반적으로 클러스터 노드의 표준 호스트명이며 연결 문자열에 hostname 필드의 값 대신 표시됩니다
    type: string
    지표:
      - hostname
  - name: userId
    설명: 이벤트를 발생시킨 Atlas 사용자의 고유 식별자. 이 필드가 응답에 존재하면 Atlas는 apiKeyId 필드를 반환하지 않습니다
    type: string
    지표:
      - username
  - 이름: username
    설명: 이벤트를 발생시킨 Atlas 사용자의 사용자 이름. 이 필드가 응답에 존재하면 Atlas는 publicKey 필드를 반환하지 않습니다
    type: string
    지표:
      - username
  - 이름: whitelistEntry
    설명: 이벤트가 대상으로 한 API 키의 화이트리스트 항목
    type: string

```

### MongoDB.ProjectEvent

```yaml
# Panther가 생성한 코드; 수정하지 마세요. (@generated)
스키마: MongoDB.ProjectEvent
파서:
  네이티브:
    이름: MongoDB.ProjectEvent
설명: 조직에 속한 프로젝트와 연관된 모든 이벤트.
참조 URL: https://www.mongodb.com/docs/atlas/reference/api/events-projects-get-all
필드:
  - 이름: alertId
    설명: 이벤트에 연결된 알러트의 고유 식별자
    type: string
  - 이름: alertConfigId
    설명: alertId에 연결된 알러트 구성의 고유 식별자
    type: string
  - 이름: apiKeyId
    설명: 이벤트를 발생시킨 API 키의 고유 식별자. 이 필드가 응답에 존재하면 Atlas는 userId 필드를 반환하지 않습니다
    type: string
    지표:
      - username
  - 이름: clusterName
    설명: 클러스터에 연결된 이름
    type: string
  - 이름: collection
    설명: 이벤트가 발생한 컬렉션의 이름. 이 필드는 eventTypeName이 DATA_EXPLORER 또는 DATA_EXPLORER_CRUD일 때 존재할 수 있습니다
    type: string
  - 이름: created
    required: true
    설명: rfc3339 표준 형식의 이벤트 날짜 및 시간
    type: timestamp
    시간 형식: rfc3339
    isEventTime: true
  - 이름: currentValue
    설명: 이벤트 시점의 metricName 값에 대해 설명합니다
    type: object
    필드:
      - 이름: number
        설명: 이벤트 시점의 metricName 값
        type: float
      - 이름: units
        설명: currentValue.number의 측정 단위
        type: string
  - 이름: database
    설명: 이벤트가 발생한 데이터베이스의 이름. 이 필드는 eventTypeName이 DATA_EXPLORER 또는 DATA_EXPLORER_CRUD일 때 존재할 수 있습니다
    type: string
  - 이름: eventTypeName
    required: true
    설명: 이벤트 유형을 나타내는 사람이 읽을 수 있는 레이블
    type: string
  - 이름: groupId
    설명: 이벤트가 발생한 프로젝트의 고유 식별자
    type: string
  - 이름: hostname
    설명: 이벤트와 연관된 Atlas 호스트 머신의 호스트명
    type: string
    지표:
      - hostname
  - 이름: id
    required: true
    설명: 이벤트의 고유 식별자
    type: string
  - 이름: invoiceId
    설명: 이벤트와 연관된 송장(인보이스)의 고유 식별자
    type: string
  - 이름: isGlobalAdmin
    설명: 이벤트를 발생시킨 사용자가 MongoDB 직원인지 여부를 나타냅니다
    유형: boolean
  - name: links
    설명: 하위 리소스 및/또는 관련 리소스로 연결되는 하나 이상의 URL. 웹 링크 명세(https://tools.ietf.org/html/5988)는 URL 간의 relation-type을 설명합니다
    type: array
    element:
      type: object
      필드:
        - name: href
          설명: 링크 대상, URL 또는 URL 프래그먼트
          type: string
          지표:
            - url
        - 이름: rel
          설명: 현재 문서와 링크된 문서 간의 관계(예: self)
          type: string
  - 이름: metricName
    설명: alertId에 연결된 메트릭의 이름
    type: string
  - 이름: opType
    설명: 발생한 작업의 유형. 이 필드는 eventTypeName이 DATA_EXPLORER 또는 DATA_EXPLORER_CRUD일 때 존재합니다
    type: string
  - 이름: orgId
    설명: 이벤트가 발생한 조직의 고유 식별자
    type: string
  - 이름: paymentId
    설명: 이벤트와 연관된 송장 결제의 고유 식별자
    type: string
  index: 0
    설명: mongod 또는 mongos가 수신하는 포트
    type: bigint
  - 이름: publicKey
    설명: 이벤트를 발생시킨 API 키와 연결된 공개 키. 이 필드가 응답에 존재하면 Atlas는 username 필드를 반환하지 않습니다
    type: string
    지표:
      - username
  - name: raw
    설명: 이벤트에 대한 추가 메타 정보
    유형: json
  - 이름: remoteAddress
    설명: 이벤트를 발생시킨 userId Atlas 사용자의 IP 주소
    type: string
    지표:
      - ip
  - 이름: replicaSetName
    설명: 이벤트와 연관된 레플리카 세트의 이름
    type: string
  - 이름: shardName
    설명: 이벤트와 연관된 샤드의 이름
    type: string
  - 이름: targetPublicKey
    설명: 이벤트가 대상으로 한 API 키의 공개 키
    type: string
    지표:
      - username
  - 이름: targetUsername
    설명: 이벤트가 대상으로 한 Atlas 사용자의 사용자 이름
    type: string
    지표:
      - username
  - 이름: teamId
    설명: 이벤트와 연관된 Atlas 팀의 고유 식별자
    type: string
  - 이름: userAlias
    설명: 클러스터 노드의 사용자 친화적 호스트명. 사용자 친화적 호스트명은 일반적으로 클러스터 노드의 표준 호스트명이며 연결 문자열에 hostname 필드의 값 대신 표시됩니다
    type: string
    지표:
      - hostname
  - name: userId
    설명: 이벤트를 발생시킨 Atlas 사용자의 고유 식별자. 이 필드가 응답에 존재하면 Atlas는 apiKeyId 필드를 반환하지 않습니다
    type: string
    지표:
      - username
  - 이름: username
    설명: 이벤트를 발생시킨 Atlas 사용자의 사용자 이름. 이 필드가 응답에 존재하면 Atlas는 publicKey 필드를 반환하지 않습니다
    type: string
    지표:
      - username
  - 이름: whitelistEntry
    설명: 이벤트가 대상으로 한 API 키의 화이트리스트 항목
    type: string
```
