收集 Atlassian Jira 日志
概览
此解析器可处理 SYSLOG 和 JSON 格式的 Atlassian Jira 日志。它会先尝试将消息解析为 JSON。如果失败,它会使用 Grok 模式解析 SYSLOG 格式的消息,提取各种字段(例如 IP 地址、用户名、HTTP 方法和响应代码),然后将这些字段映射到 UDM。解析器还会处理特定的 Jira 审核事件,包括登录成功和失败,并将相关字段映射到 UDM 中的安全结果属性。
准备工作
确保您满足以下前提条件:
- Google SecOps 实例。
- 对 Atlassian Jira 的特权访问权限。
设置 Feed
您可以通过两种不同的入口点在 Google SecOps 平台中设置 Feed:
- SIEM 设置 > Feed
- 内容中心 > 内容包
通过“SIEM 设置”>“Feed”设置 Feed
如需配置 Feed,请按以下步骤操作:
- 依次前往 SIEM 设置 > Feed。
- 点击添加新 Feed。
- 在下一页上,点击配置单个 Feed。
- 在 Feed 名称字段中,输入 Feed 的名称(例如 Atlassian Jira 日志)。
- 选择 Webhook 作为来源类型。
- 选择 Atlassian Jira 作为日志类型。
- 点击下一步。
- 可选:为以下输入参数指定值:
- 拆分分隔符:用于分隔日志行的分隔符,例如
\n
。 - 资源命名空间:资源命名空间。
- 注入标签:应用于此 Feed 中事件的标签。
- 拆分分隔符:用于分隔日志行的分隔符,例如
- 点击下一步。
- 在最终确定界面中检查 Feed 配置,然后点击提交。
- 点击生成密钥,生成用于对此 Feed 进行身份验证的密钥。
- 复制并存储密钥。您将无法再次查看此密钥。如有需要,您可以重新生成新的 Secret 密钥,但此操作会使之前的 Secret 密钥失效。
- 在详情标签页中,从端点信息字段复制 Feed 端点网址。您需要在客户端应用中指定此端点网址。
- 点击完成。
设置来自内容中心的 Feed
为以下字段指定值:
- 拆分分隔符:用于分隔日志行的分隔符,例如
\n
。
高级选项
- Feed 名称:用于标识 Feed 的预填充值。
- 来源类型:用于将日志收集到 Google SecOps 中的方法。
- 资源命名空间:与 Feed 关联的命名空间。
提取标签:应用于相应 Feed 中所有事件的标签。
点击生成密钥,生成用于对此 Feed 进行身份验证的密钥。
复制并存储密钥。您将无法再次查看此密钥。如有需要,您可以重新生成新的 Secret 密钥,但此操作会使之前的 Secret 密钥失效。
在详情标签页中,从端点信息字段复制 Feed 端点网址。您需要在客户端应用中指定此端点网址。
为 Webhook Feed 创建 API 密钥
依次前往 Google Cloud 控制台 > 凭据。
点击创建凭据,然后选择 API 密钥。
将 API 密钥访问权限限制为 Google Security Operations API。
指定端点网址
- 在客户端应用中,指定 webhook Feed 中提供的 HTTPS 端点网址。
通过在自定义标头中指定 API 密钥和密钥来启用身份验证,格式如下:
X-goog-api-key = API_KEY X-Webhook-Access-Key = SECRET
建议:将 API 密钥指定为标头,而不是在网址中指定。如果您的 Webhook 客户端不支持自定义标头,您可以使用以下格式的查询参数指定 API 密钥和密钥:
ENDPOINT_URL?key=API_KEY&secret=SECRET
替换以下内容:
ENDPOINT_URL
:Feed 端点网址。API_KEY
:用于向 Google Security Operations 进行身份验证的 API 密钥。SECRET
:您生成的用于验证 Feed 的密钥。
在 Atlassian Jira 中为 Google SecOps 创建 webhook
- 以管理员身份访问 Jira 实例。
- 依次前往设置 设置 > 系统 > WebHook。
- 点击创建 WebHook。
- 配置以下网络钩子详细信息:
- 名称:为 Webhook 提供一个描述性名称(例如 Google SecOps 集成)。
- 网址:输入 Google SecOps API 端点网址。
- 事件:选择应触发 Webhook 的 Jira 事件。选择与您的安全监控需求相关的事件(例如,问题创建、问题更新、添加评论)。如果需要,您可以选择所有活动。
- 可选:JQL 过滤条件:使用 JQL 过滤条件进一步细化哪些事件会触发 Webhook。这有助于您专注于特定项目、问题类型或其他条件。
- 排除正文:请勿选中此复选框。网络钩子需要以 JSON 格式将事件数据发送到 Google SecOps。
- 点击创建以保存网络钩子配置。
UDM 映射表
日志字段 | UDM 映射 | 逻辑 |
---|---|---|
affectedObjects.id |
target.resource.attribute.labels.value |
affectedObjects 数组中每个对象的 id 字段都会映射到一个键为“ID_[index]”的标签,其中 [index] 是相应对象在数组中的位置。 |
affectedObjects.name |
target.resource.attribute.labels.value |
affectedObjects 数组中每个对象的 name 字段都会映射到一个键为“Name_[index]”的标签,其中 [index] 是相应对象在数组中的位置。 |
affectedObjects.type |
target.resource.attribute.labels.value |
affectedObjects 数组中每个对象的 type 字段都会映射到一个键为“Type_[index]”的标签,其中 [index] 是相应对象在数组中的位置。 |
associatedItems.0.id |
target.user.userid |
如果 associatedItems.0.typeName 为“USER”,则此字段会映射到 target.user.userid 。否则,它会映射到 security_result.detection_fields 中键为“associatedItems Id”的标签。 |
associatedItems.0.name |
target.user.user_display_name |
如果 associatedItems.0.typeName 为“USER”,则此字段会映射到 target.user.user_display_name 。否则,它会映射到 security_result.detection_fields 中键为“associatedItems Name”的标签。 |
associatedItems.0.parentId |
target.process.parent_process.pid |
如果 associatedItems.0.typeName 为“USER”,则此字段会映射到 target.process.parent_process.pid 。 |
associatedItems.0.parentName |
target.resource.parent |
如果 associatedItems.0.typeName 为“USER”,则此字段会映射到 target.resource.parent 。 |
associatedItems.0.typeName |
security_result.detection_fields.value |
映射到 security_result.detection_fields 中键为“associatedItems TypeName”的标签。 |
author.id |
principal.user.userid |
映射到 principal.user.userid 。 |
author.name |
principal.user.user_display_name |
映射到 principal.user.user_display_name 。 |
author.type |
principal.resource.attribute.labels.value |
映射到 principal.resource.attribute.labels 中键为“Author Type”的标签。 |
author.uri |
principal.url |
映射到 principal.url 。 |
authorAccountId |
principal.user.userid |
映射到 principal.user.userid 。 |
authorKey |
target.resource.attribute.labels.value |
映射到 target.resource.attribute.labels 中键为“Author Key”的标签。 |
auditType.action |
security_result.summary |
映射到 security_result.summary 。还用于派生 security_result.action 和 metadata.event_type (如果操作包含“登录”,则为 USER_LOGIN;如果包含“成功”,则为 ALLOW;如果包含“失败”,则为 BLOCK)。 |
auditType.area |
metadata.product_event_type |
映射到 metadata.product_event_type 。 |
auditType.category |
security_result.category_details |
映射到 security_result.category_details 。 |
category |
metadata.product_event_type |
映射到 metadata.product_event_type 。 |
changedValues.changedFrom |
security_result.about.resource.attribute.labels.value |
映射到 security_result.about.resource.attribute.labels 中键为“Changed From”的标签。 |
changedValues.changedTo |
security_result.about.resource.attribute.labels.value |
映射到 security_result.about.resource.attribute.labels 中键为“更改为”的标签。 |
changedValues.fieldName |
security_result.about.resource.attribute.labels.value |
映射到 security_result.about.resource.attribute.labels 中键为“FieldName”的标签。 |
changedValues.i18nKey |
security_result.about.resource.attribute.labels.value |
映射到 security_result.about.resource.attribute.labels 中键为“FieldName”的标签。 |
changedValues.key |
security_result.about.resource.attribute.labels.value |
映射到 security_result.about.resource.attribute.labels 中键为“Changed From”的标签。 |
changedValues.to |
security_result.about.resource.attribute.labels.value |
映射到 security_result.about.resource.attribute.labels 中键为“更改为”的标签。 |
created |
metadata.event_timestamp |
已解析并映射到 metadata.event_timestamp 。 |
dst_ip |
target.ip |
映射到 target.ip 。 |
extraAttributes.name |
principal.resource.attribute.labels.value |
映射到 principal.resource.attribute.labels 中键为“名称”的标签。 |
extraAttributes.value |
principal.resource.attribute.labels.value |
映射到 principal.resource.attribute.labels 中键为“Value”的标签。 |
http_method |
network.http.method |
映射到 network.http.method 。 |
http_referral_url |
network.http.referral_url |
映射到 network.http.referral_url 。 |
id |
metadata.product_log_id |
映射到 metadata.product_log_id 。 |
objectItem.id |
security_result.detection_fields.value |
映射到 security_result.detection_fields 中键为“objectItem Id”的标签。 |
objectItem.name |
security_result.detection_fields.value |
映射到 security_result.detection_fields 中键为“objectItem Name”的标签。 |
objectItem.typeName |
security_result.detection_fields.value |
映射到 security_result.detection_fields 中键为“objectItem TypeName”的标签。 |
path |
principal.url |
如果不是“-”或“/status”,则映射到 principal.url 。 |
protocol |
network.ip_protocol |
如果为“HTTP”,则映射到 network.ip_protocol 。 |
remoteAddress |
principal.ip |
映射到 principal.ip 。 |
response_code |
network.http.response_code |
映射到 network.http.response_code 。 |
sent_bytes |
network.sent_bytes |
映射到 network.sent_bytes 。 |
source |
principal.ip |
已解析以提取 IP 地址并合并到 principal.ip 中。 |
src_ip1 、src_ip2 、src_ip3 |
principal.ip |
映射到 principal.ip 。 |
summary |
metadata.description |
映射到 metadata.description 。 |
user_agent |
network.http.user_agent |
映射到 network.http.user_agent 。 |
user_name |
principal.user.userid |
映射到 principal.user.userid 。如果 auditType.action 包含“登录”,则设置为“机器”。如果解析的是 syslog,则派生自 date_time ;如果解析的是 JSON,则派生自 created 。如果 JSON 中提供了 timestamp ,则使用该值,而不是 created 。如果这些都不存在,则使用批次中的 create_time 。根据是否存在其他字段派生:如果存在 dst_ip ,则为 NETWORK_HTTP;如果存在 user_name 或(associatedItems.0.typeName 为“USER”且存在 associatedItems.0.id ),则为 USER_UNCATEGORIZED;如果存在 src_ip1 、src_ip2 、src_ip3 或 remoteAddress ,则为 STATUS_UPDATE;否则为 GENERIC_EVENT。如果 auditType.action 包含“login”,则会被替换为 USER_LOGIN。始终设置为“ATLASSIAN_JIRA”。始终设置为“ATLASSIAN_JIRA”。如果 auditType.action 包含“登录成功”,则设置为“ALLOW”;如果 auditType.action 包含“登录失败”,则设置为“BLOCK”。 |
需要更多帮助?从社区成员和 Google SecOps 专业人士那里获得解答。