收集 ForgeRock OpenAM 日志

解析器版本: 4.0

支持的环境:

本文档介绍了如何使用 Bindplane 代理将 ForgeRock OpenAM 日志注入 Google Security Operations。

ForgeRock OpenAM 是一种访问权限管理解决方案,可为身份验证事件、访问权限控制决策、会话活动和配置更改生成 syslog 消息。解析器会从 JSON 格式的审核日志中提取字段,并将其映射到统一数据模型 (UDM)。

准备工作

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

  • Google SecOps 实例
  • Windows Server 2016 或更高版本,或者具有 systemd 的 Linux 主机
  • Bindplane 代理与 ForgeRock OpenAM 服务器之间的网络连接
  • 如果通过代理运行,请确保防火墙端口根据 Bindplane 代理要求处于开放状态
  • 对 AM 控制台的管理员访问权限(例如 amAdmin

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

  1. 登录 Google SecOps 控制台。
  2. 依次前往 SIEM 设置 > 收集代理
  3. 下载注入身份验证文件
  4. 将该文件安全地保存在将安装 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
    
  3. 等待安装完成。

  4. 运行以下命令,验证安装是否成功:

    sc query observiq-otel-collector
    

    该服务应显示为正在运行

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
    
  3. 等待安装完成。

  4. 运行以下命令,验证安装是否成功:

    sudo systemctl status observiq-otel-collector
    

    该服务应显示为活跃 (正在运行)

其他安装资源

如需了解其他安装选项和问题排查信息,请参阅 Bindplane 代理安装指南

配置 Bindplane 代理以注入 syslog 并发送到 Google SecOps

找到配置文件

  • Linux

    sudo nano /opt/observiq-otel-collector/config.yaml
    
  • Windows

    notepad "C:\Program Files\observIQ OpenTelemetry Collector\config.yaml"
    

修改配置文件

  • config.yaml 的全部内容替换为以下配置:

    receivers:
        udplog:
            listen_address: "0.0.0.0:514"
    
    exporters:
        chronicle/openam:
            compression: gzip
            creds_file_path: '/etc/bindplane-agent/ingestion-auth.json'
            customer_id: '<customer_id>'
            endpoint: malachiteingestion-pa.googleapis.com
            log_type: OPENAM
            raw_log_field: body
    
    service:
        pipelines:
            logs/openam_to_chronicle:
                receivers:
                    - udplog
                exporters:
                    - chronicle/openam
    

配置参数

替换以下占位符:

  • 接收器配置

    • listen_address:要监听的 IP 地址和端口:
      • 0.0.0.0 以监听所有接口(推荐)
      • 端口 514 是标准 syslog 端口(在 Linux 上需要 root;对于非 root 用户,请使用 1514
  • 导出器配置

    • creds_file_path:注入身份验证文件的完整路径:
      • Linux: /etc/bindplane-agent/ingestion-auth.json
      • Windows: C:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json
    • customer_id:从 Google SecOps 控制台复制的客户 ID
    • endpoint:区域级端点网址:
      • 美国malachiteingestion-pa.googleapis.com
      • 欧洲: europe-malachiteingestion-pa.googleapis.com
      • 亚洲: asia-southeast1-malachiteingestion-pa.googleapis.com
      • 如需查看完整列表,请参阅区域级端点

保存配置文件

  • 修改后,保存文件:
    • Linux:依次按 Ctrl+OEnterCtrl+X
    • Windows:依次点击文件 > 保存

重启 Bindplane 代理以应用更改

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

    sudo systemctl restart observiq-otel-collector
    
    1. 验证服务正在运行:

      sudo systemctl status observiq-otel-collector
      
    2. 检查日志中的错误:

      sudo journalctl -u observiq-otel-collector -f
      
  • 如需在 Windows 中重启 Bindplane 代理,请选择以下选项之一:

    • 以管理员身份运行命令提示符或 PowerShell:

      net stop observiq-otel-collector && net start observiq-otel-collector
      
    • 服务控制台:

      1. Win+R,输入 services.msc,然后按 Enter 键。
      2. 找到 observIQ OpenTelemetry Collector
      3. 右键点击并选择重启
      4. 验证服务正在运行:

        sc query observiq-otel-collector
        
      5. 检查日志中的错误:

        type "C:\Program Files\observIQ OpenTelemetry Collector\log\collector.log"
        

为 ForgeRock OpenAM 配置 syslog 处理程序

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

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 中间设备的主机名。
hostip intermediary.ip 中间设备的 IP 地址。
src_ip principal.asset.ip 来源 IP 地址。
src_ip principal.ip 来源 IP 地址。
desc metadata.description 事件的说明。
payload metadata.description 事件的载荷。
http.request.headers.host.0 tatget.hostname 从更新日志映射
http.request.headers.user-agent.0 network.http.user_agent 从更新日志映射
extensions.auth.type SSO 从更新日志映射

更新日志

查看此解析器的更新日志

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