Docs 菜单
Docs 主页
/ /

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>
}
}

下表描述了日志消息中的字段。

字段
类型
说明

activity_id

整型

活动类型。 请参阅 OCSF 类型映射。

category_uid

整型

审核事件类别。 请参阅 OCSF 类别映射。

class_uid

整型

审核事件类。 请参阅 OCSF 类映射。

time

整型

事件发生的 Unix 纪元之后的毫秒数。

severity_id

整型

已审核事件的严重性。

type_uid

整型

已审核事件的类、活动和类别的组合。 请参阅 OCSF 类型映射。

metadata

文档

有关事件的元数据,例如产品和模式版本。

actor

文档

有关执行动作的用户的信息。

src_endpoint

文档

从MongoDB 8.1 开始,如果客户端应用程序通过负载负载均衡器连接到 mongodmongos实例,则原始客户端计算机和负载负载均衡器IP地址和端口将包含在Atlas 审核日志中。您可以使用该日志将Atlas 审核事件与源客户端计算机进行匹配。

src_endpoint 存储有关IP地址和端口的信息。intermediate_ips大量中的每个元素都是一个文档,其中包含源客户端端计算机请求传递的负载负载均衡器或 mongos 的IP解决和端口。

如果请求通过负载负载均衡器:

  • src_endpoint 存储从代理协议标头读取的原始客户端端计算机IP解决和端口。

  • src_endpoint.intermediate_ips 存储负载负载均衡器IP解决和端口。

如果Atlas 审核事件发生在分片上:

  • src_endpoint 存储源客户端端计算机IP解决和端口。解决和端口是从代理协议标头中读取的,或者,如果源客户端计算机连接到 mongodmongos,则从客户端计算机连接中读取解决和端口。

  • src_endpoint.intermediate_ips 如果请求由mongos转发,则会存储 mongos IP解决和端口。如果使用负载负载均衡器,则还有一个额外的 src_endpoint.intermediate_ips 用于存储负载负载均衡器的IP解决和端口。

在版本8.1中进行了更改

dst_endpoint

文档

本地MongoDB服务器的IP解决和端口。

在版本8.1中进行了更改

注意

日志消息可能包含其他字段,具体取决于记录的事件。

下表描述了category_uid值:

category_uid
category

1

系统活动

2

调查结果

3

IAM

4

网络活动

5

发现

6

应用程序活动

有关 OCSF class_uids 的完整列表以及它们如何映射到不同类,请参阅 OCSF 文档。

type_uid字段表示已审核事件的类、活动和类别的组合。 生成的 UUID 指示发生的活动类型。

具体来说, type_uid( class_uid * 100 ) + (activity_id) ,其中category_idclass_id中的千位。

下表描述了已审核的操作如何映射到type_uid

操作类型
type_uid
category
活动

addShard

500101

配置

设备配置状态

Log

applicationMessage

100799

记录

进程活动

其他

auditConfigure

500201 or 500203

发现

设备配置状态

  • 1 为 Create

  • 3 是更新

authzCheck

600301 - 600304

应用程序

API活动

  • 1 为 Create

  • 2 已读取

  • 3 是更新

  • 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" }
}
}

后退

mongo schema

在此页面上