AI 에이전트의 경우: 문서 인덱스는 https://www.mongodb.com/ko-kr/docs/llms.txt에서 사용할 수 있으며, 모든 페이지의 마크다운 버전은 어떤 URL 경로에 .md를 추가하여 사용할 수 있습니다.
Docs Menu

OCSF 스키마 감사 메시지

OCSF 스키마 에서 기록된 로그 메시지의 구문은 다음과 같습니다.

{
"activity_id" : <int>,
"category_uid" : <int>,
"class_uid" : <int>,
"time" : <int>,
"severity_id" : <int>,
"type_uid" : <int>,
"metadata" : <document>
"actor" : {
"user" : {
"type_id" : <int>,
"name" : <string>,
"groups" : <array of documents>
}
},
"src_endpoint" : {
"ip": <string>, // IP address for origin client computer
"port": <int>, // Port for origin client computer
"intermediate_ips": [ {
// IP address and port for mongos or load balancer
"ip": <string>,
"port": <int>
}, {
// IP address and port for mongos or load balancer
"ip": <string>,
"port": <int>
} ]
},
"dst_endpoint" : {
// IP address and port for local MongoDB server
"ip": <string>,
"port": <int>
},
"direct_endpoint" : {
// IP address and port for the host that connects directly to
// the MongoDB instance
"ip": <string>,
"port": <int>
}
}

다음 표에서는 로그 메시지의 필드에 대해 설명합니다.

필드
유형
설명

activity_id

Integer

Activity type. See OCSF Type Mapping.

category_uid

Integer

Audit event category. See OCSF Category Mapping.

class_uid

Integer

Audit event class. See OCSF Class Mapping.

time

Integer

이벤트 가 발생한 유닉스 시간 이후의 밀리초 수입니다.

severity_id

Integer

감사된 이벤트 의 심각도입니다.

type_uid

Integer

Combination of the audited event's class, activity, and category. See OCSF Type Mapping.

metadata

문서

제품 및 스키마 버전과 같은 이벤트 에 대한 메타데이터입니다.

actor

문서

조치 을 수행한 사용자에 대한 정보입니다.

src_endpoint

문서

MongoDB 8.1부터 클라이언트 애플리케이션 이 로드 밸런서 통해 mongos 에 연결하면 원본 클라이언트 컴퓨터와 로드 밸런서 IP 주소 및 포트가 감사 로그 에 포함됩니다. 로그 사용하여 감사 이벤트 원본 클라이언트 컴퓨터와 일치시킬 수 있습니다.

src_endpoint IP 주소 및 포트에 대한 정보를 저장합니다. intermediate_ips 배열 의 각 요소는 원본 클라이언트 컴퓨터 요청 전달한 로드 밸런서 또는 mongos 의 IP 주소 및 포트가 있는 문서 입니다.

요청 이 로드 밸런서 통과하는 경우:

  • src_endpoint 프록시 프로토콜 헤더에서 읽은 원본 클라이언트 컴퓨터 IP 주소 와 포트를 저장합니다.

  • src_endpoint.intermediate_ips 로드 밸런서 IP 주소 와 포트를 저장합니다.

샤드 에서 감사 이벤트 발생하는 경우:

  • src_endpoint 원본 클라이언트 컴퓨터의 IP 주소 와 포트를 저장합니다. 프록시 프로토콜 헤더에서 주소 와 포트를 읽거나, 원본 클라이언트 컴퓨터가 mongos에 연결된 경우 클라이언트 컴퓨터 연결에서 주소 와 포트를 읽습니다.

  • src_endpoint.intermediate_ips mongos IP 주소 와 포트를 저장합니다. 그리고 로드 밸런서 사용하는 경우, 로드 밸런서 의 IP 주소 와 포트를 저장하는 추가 src_endpoint.intermediate_ips 이(가) 있습니다.

The direct_endpoint field records the host that opens the connection when a load balancer or reverse proxy asserts the client address.

버전 8.1에서 변경되었습니다.

dst_endpoint

문서

로컬 MongoDB 서버 의 IP 주소 및 포트입니다.

버전 8.1에서 변경되었습니다.

direct_endpoint

문서

IP address and port of the host that connects directly to the MongoDB instance. If the client connects through a Unix domain socket, direct_endpoint stores an interface field set to unix and omits the port field.

이 주소 로드 밸런서 또는 역방향 프록시가 다른 클라이언트 주소 어설션하는 경우에도 연결을 여는 호스팅하다 식별합니다.

MongoDB 특정 포트에서 프록시 프로토콜 연결을 허용합니다. 해당 포트에 연결할 수 있는 모든 호스팅하다 임의의 클라이언트 주소 어설션할 수 있습니다. 기록된 주소 신뢰할 수 있도록 유지하려면 해당 포트에 대한 액세스 로드 밸런서 또는 역방향 프록시로 제한합니다.

샤드 에 의해 기록된 감사 이벤트의 경우, 보고된 주소 는 샤드 요청 수신하는 방식에 따라 달라집니다.

  • If a mongos instance routes the request, the address repeats the client address that mongos forwards.

  • If the request comes directly from mongos, the address records the mongos instance.

버전 8 의 새로운 기능입니다.3.9.

참고

로그 메시지에는 기록된 이벤트 에 따라 추가 필드가 포함될 수 있습니다.

이 표에서는 category_uid 값에 대해 설명합니다.

category_uid
카테고리

1

시스템 활동

2

결과

3

IAM

4

네트워크 활동

5

Discovery

6

애플리케이션 활동

For a complete list of OCSF class_uids and how they map to different classes, see the OCSF Documentation.

type_uid 필드 는 감사된 이벤트의 클래스, 활동 및 카테고리의 조합을 나타냅니다. 결과 UUID는 발생한 활동 유형을 나타냅니다.

구체적으로, type_uid( class_uid * 100 ) + (activity_id) 이며, category_idclass_id 의 천 단위 자리입니다.

이 표에서는 감사된 작업이 type_uid 에 매핑되는 방법을 설명합니다.

작업 유형
type_uid
카테고리
클래스
활동

addShard

500101

구성

장치 구성 상태

Log

applicationMessage

100799

시스템

프로세스 활동

기타

auditConfigure

500201 or 500203

Discovery

장치 구성 상태

  • 1 is Create

  • 3 is Update

authzCheck

600301 - 600304

애플리케이션

API 활동

  • 1 is Create

  • 2 is Read

  • 3 is Update

  • 4 삭제입니다.

authenticate

300201

IAM

인증

로그온

clientMetadata

400101

네트워크

네트워크 활동

열기

createCollection

300401

IAM

엔티티 관리

만들기

createDatabase

300401

IAM

엔티티 관리

만들기

createIndex

300401

IAM

엔티티 관리

만들기

createRole

300101

IAM

계정 변경

만들기

createUser

300101

IAM

계정 변경

만들기

directAuthMutation

300100

IAM

계정 변경

알 수 없음

dropAllRolesFromDatabase

300106

IAM

계정 변경

삭제

dropAllUsersFromDatabase

300106

IAM

계정 변경

삭제

dropCollection

300404

IAM

엔티티 관리

삭제

dropDatabase

300404

IAM

엔티티 관리

삭제

dropIndex

300404

IAM

엔티티 관리

삭제

dropPrivilegesToRole

300107

IAM

계정 변경

정책 첨부

dropRole

300106

IAM

계정 변경

삭제

dropUser

300106

IAM

계정 변경

삭제

enableSharding

500201

구성

장치 구성 상태

Log

getClusterParameter

600302

애플리케이션

API 활동

읽기

grantRolesToRole

300107

IAM

계정 변경

정책 첨부

grantRolesToUser

300107

IAM

계정 변경

정책 첨부

importCollection

300401

IAM

엔티티 관리

만들기

logout

300202

IAM

인증

로그오프

refineCollectionShardKey

500201

구성

장치 구성 상태

Log

removeShard

500201

구성

장치 구성 상태

Log

renameCollection

300403

IAM

엔티티 관리

Update

replSetReconfig

500201

구성

장치 구성 상태

Log

revokePrivilegesFromRole

300108

IAM

계정 변경

분리 정책

revokeRolesFromRole

300108

IAM

계정 변경

분리 정책

revokeRolesFromUser

300108

IAM

계정 변경

분리 정책

rotateLog

100799

시스템

프로세스

기타

setClusterParameter

500201

구성

장치 구성 상태

Log

shardCollection

500201

구성

장치 구성 상태

Log

shutdown

100702

시스템

프로세스

종료

startup

100701

시스템

프로세스

Launch

updateCachedClusterServerParameter

500201

구성

장치 구성 상태

Log

updateRole

300199

IAM

계정 변경

기타

updateUser

300199

IAM

계정 변경

기타

다음 예는 다양한 조치 유형에 대한 OCSF 스키마 로그 메시지를 보여줍니다.

{
"activity_id" : 1,
"category_uid" : 3,
"class_uid" : 3002,
"time" : 1710715316123,
"severity_id" : 1,
"type_uid" : 300201,
"metadata" : {
"correlation_uid" : "20ec4769-984d-445c-aea7-da0429da9122",
"product" : "MongoDB Server",
"version" : "1.0.0"
},
"actor" : {
"user" : {
"type_id" : 1,
"name" : "admin.admin",
"groups" : [ { "name" : "admin.root" } ]
}
},
"src_endpoint" : { "ip" : "127.0.0.1", "port" : 56692 },
"dst_endpoint" : { "ip" : "127.0.0.1", "port" : 20040 },
"user" : { "type_id" : 1, "name" : "admin.admin" },
"auth_protocol" : "SCRAM-SHA-256",
"unmapped" : { "atype" : "authenticate" }
}
{
"activity_id" : 0,
"category_uid" : 6,
"class_uid" : 6003,
"time" : 1710715315002,
"severity_id" : 1,
"type_uid" : 600300,
"metadata" : {
"correlation_uid" : "af4510fb-0a9f-49aa-b988-06259a7a861d",
"product" : "MongoDB Server",
"version" : "1.0.0"
},
"actor" : {},
"src_endpoint" : { "ip" : "127.0.0.1", "port" : 45836 },
"dst_endpoint" : { "ip" : "127.0.0.1", "port" : 20040 },
"api" : {
"operation" : "getParameter",
"request" : { "uid" : "admin" },
"response" : { "code" : 13, "error" : "Unauthorized" }
}
}