收集 ForgeRock OpenAM 日志

支持的语言:

本文档介绍了如何使用 Bindplane 将 ForgeRock OpenAM 日志注入到 Google Security Operations。解析器会从 CSV、Syslog + KV 或 JSON 格式的日志中提取字段,对其进行归一化处理,然后将其映射到统一数据模型 (UDM)。它可处理各种 OpenAM 事件类型,包括登录/退出、访问结果和常规日志,同时使用用户、群组和网络信息来丰富数据,并针对不同的日志格式和事件类型执行特定转换。解析器会优先解析 JSON,然后回退到 Syslog+KV,最后是 CSV,并舍弃不支持的格式的日志。

准备工作

请确保满足以下前提条件:

  • Google SecOps 实例
  • Windows 2016 或更高版本,或者具有 systemd 的 Linux 主机
  • 如果在代理后运行,防火墙端口处于开放状态
  • 对 Forgerock OpenAM 的特权访问权限(例如 amAdmin)

获取 Google SecOps 注入身份验证文件

  1. 登录 Google SecOps 控制台。
  2. 依次前往 SIEM 设置 > 收集代理
  3. 下载注入身份验证文件。将该文件安全地保存在将要安装 Bindplane 的系统上。

获取 Google SecOps 客户 ID

  1. 登录 Google SecOps 控制台。
  2. 依次前往 SIEM 设置 > 配置文件
  3. 复制并保存组织详细信息部分中的客户 ID

安装 Bindplane 代理

按照以下说明在 Windows 或 Linux 操作系统上安装 Bindplane 代理。

Windows 安装

  1. 以管理员身份打开命令提示符PowerShell
  2. 运行以下命令:

    msiexec /i "https://github.com/observIQ/bindplane-agent/releases/latest/download/observiq-otel-collector.msi" /quiet
    

Linux 安装

  1. 打开具有 root 或 sudo 权限的终端。
  2. 运行以下命令:

    sudo sh -c "$(curl -fsSlL https://github.com/observiq/bindplane-agent/releases/latest/download/install_unix.sh)" install_unix.sh
    

其他安装资源

如需了解其他安装选项,请参阅安装指南

配置 Bindplane 代理以注入 Syslog 并将其发送到 Google SecOps

  1. 访问配置文件:
    • 找到 config.yaml 文件。通常,它位于 Linux 上的 /etc/bindplane-agent/ 目录中或 Windows 上的安装目录中。
    • 使用文本编辑器(例如 nanovi 或记事本)打开该文件。
  2. 按如下方式修改 config.yaml 文件:

    receivers:
        udplog:
            # Replace the port and IP address as required
            listen_address: "0.0.0.0:514"
    
    exporters:
        chronicle/chronicle_w_labels:
            compression: gzip
            # Adjust the path to the credentials file you downloaded in Step 1
            creds_file_path: '/path/to/ingestion-authentication-file.json'
            # Replace with your actual customer ID from Step 2
            customer_id: <customer_id>
            endpoint: malachiteingestion-pa.googleapis.com
            # Add optional ingestion labels for better organization
            ingestion_labels:
                log_type: 'OPENAM'
                raw_log_field: body
    
    service:
        pipelines:
            logs/source0__chronicle_w_labels-0:
                receivers:
                    - udplog
                exporters:
                    - chronicle/chronicle_w_labels
    
  3. 根据基础架构的需要替换端口和 IP 地址。

  4. <customer_id> 替换为实际的客户 ID。

  5. /path/to/ingestion-authentication-file.json 更新为获取 Google SecOps 提取身份验证文件部分中保存身份验证文件的路径。

重启 Bindplane 代理以应用更改

  • 如需在 Linux 中重启 Bindplane 代理,请运行以下命令:

    sudo systemctl restart bindplane-agent
    
  • 如需在 Windows 中重启 Bindplane 代理,您可以使用服务控制台,也可以输入以下命令:

    net stop BindPlaneAgent && net start BindPlaneAgent
    

在 Forgerock OpenAM 中配置审核日志记录

  1. 登录 AM 控制台。
  2. 依次前往配置 > 全局服务 > 审核日志记录
  3. 启用审核日志记录以启动审核日志记录功能。
  4. 在“字段许可名单过滤条件”和“字段屏蔽名单过滤条件”列表中,输入要包含(许可名单)或排除(屏蔽名单)在审核事件日志中的值。
  5. 点击保存

为 Forgerock OpenAM 配置 Syslog 处理程序

  1. 以管理员身份(例如 amAdmin)登录 AM 控制台。
  2. 如需在全局配置中创建事件处理脚本,请依次前往配置 > 全局服务 > 审核日志记录
  3. 如需在领域中创建事件处理脚本,请依次前往领域 > 领域名称 > 服务 > 审核日志记录
  4. 依次点击添加辅助配置 > Syslog
  5. 提供以下配置详细信息:
    • 名称:输入事件处理脚本的名称(例如 Google SecOps Syslog Event Handler)。
    • 服务器主机名:输入 Bindplane 代理 IP 地址。
    • 服务器端口:输入 Bindplane 代理端口号(例如,针对 UDP 输入 514)。
    • 传输协议:选择 UDP
    • 连接超时时间:输入连接所需的秒数(例如 120)。
    • 可选:启用缓冲选项。
  6. 点击创建
  7. 创建 syslog 审核事件处理脚本后,系统会显示多个配置标签页。
  8. 常规处理程序配置标签页上,选择已启用以激活事件处理脚本(如果已停用)。
  9. 选择审核日志的主题:
    • 访问
    • 活动
    • 身份验证
    • 配置
  10. 点击保存
  11. Syslog 配置标签页中,提供以下配置详细信息:
    • 服务器主机名:输入 Bindplane 代理的 IP 地址。
    • 服务器端口:输入 Bindplane 代理端口号。
    • 连接超时时间:输入连接所需的秒数(例如 120)。
    • 传输协议:选择 UDP
    • 设备:选择 Local0
    • 所有主题都将严重程度设置为信息
  12. 点击保存
  13. 缓冲标签页上,选择已启用缓冲以将其激活。

  14. 点击保存

UDM 映射表

日志字段 UDM 映射 逻辑
client.ip principal.ip 发出请求的客户端的 IP 地址。
client.ip principal.asset.ip 发出请求的客户端资产的 IP 地址。
client.port principal.port 发出请求的客户端使用的端口。
entries[0].info.authLevel principal.resource.resource_subtype 与事件关联的身份验证级别。以“authLevel:”为前缀。
entries[0].info.displayName security_result.description 身份验证树中节点的描述性名称。
entries[0].info.ipAddress principal.asset.ip 与事件中的正文相关联的 IP 地址。
entries[0].info.ipAddress principal.ip 与事件中的正文相关联的 IP 地址。
entries[0].info.nodeId principal.resource.id 身份验证树中节点的唯一标识符。以“nodeId:”为前缀。
entries[0].info.nodeOutcome principal.resource.attribute.labels.value 身份验证树中节点的输出结果。
entries[0].info.nodeType principal.resource.type 身份验证树中节点的类型。以“nodeType:”为前缀。
entries[0].info.treeName principal.resource.name 身份验证树的名称。以“treeName:”为前缀。
eventName metadata.product_event_type OpenAM 日志中的原始事件名称。
http.request.headers.host[0] target.asset.hostname host 标头中提取的目标服务器的主机名。
http.request.headers.host[0] target.hostname host 标头中提取的目标服务器的主机名。
http.request.headers.user-agent[0] network.http.user_agent HTTP 请求的用户代理。
http.request.method network.http.method 请求中使用的 HTTP 方法。
http.request.path target.url HTTP 请求网址的路径。
info.failureReason security_result.summary 身份验证失败的原因。硬编码为“SSO”。由基于 eventName 和其他字段的逻辑确定。可以是 GENERIC_EVENTUSER_LOGINUSER_LOGOUTNETWORK_HTTPSTATUS_UPDATE。硬编码为“OPENAM”。硬编码为“OpenAM”。硬编码为“ForgeRock”。
principal target.user.userid 事件涉及的用户 ID,从 userIdprincipalrunAs 字段中提取。
result security_result.action_details 事件的结果(例如,“SUCCESSFUL”“FAILED”)。
response.detail.reason security_result.summary 访问结果事件中出现失败的原因。
response.status security_result.action_details 访问结果事件中响应的状态。
runAs target.user.userid 事件涉及的用户 ID,从 userIdprincipalrunAs 字段中提取。
security_result.action security_result.action 因安全事件而采取的操作(例如,"ALLOW"、"BLOCK")。
server.ip target.asset.ip 目标服务器的 IP 地址。
server.ip target.ip 目标服务器的 IP 地址。
server.port target.port 目标服务器的端口。
timestamp metadata.event_timestamp 事件的时间戳。
trackingIds metadata.product_log_id 与事件关联的跟踪 ID。
transactionId metadata.product_deployment_id 与相应事件关联的交易 ID。
userId target.user.userid 事件涉及的用户 ID,从 userIdprincipalrunAs 字段中提取。
userId target.user.group_identifiers 与用户相关联的群组标识符。
am_group target.user.group_identifiers 与用户相关联的群组标识符。
am_user target.user.email_addresses 用户的电子邮件地址(如果 am_user 字段中存在)。
loginID[0] target.user.userid 相应事件中使用的登录 ID。
loginID[0] target.user.email_addresses 用于登录的电子邮件地址(如果存在于 loginID 字段中)。
hostip intermediary.hostname 中间设备的 hostname。
hostip intermediary.ip 中间设备的 IP 地址。
src_ip principal.asset.ip 来源 IP 地址。
src_ip principal.ip 来源 IP 地址。
desc metadata.description 活动的说明。
payload metadata.description 事件的载荷。

需要更多帮助?从社区成员和 Google SecOps 专业人士那里获得解答。