收集 Ergon Informatik Airlock IAM 日志
本文档介绍了如何使用 Bindplane 代理将 Ergon Informatik Airlock IAM 日志注入到 Google Security Operations。
Airlock IAM 是一种身份和访问权限管理解决方案,可提供身份验证、授权和用户自助服务功能。它会针对登录事件、用户轨迹活动、审核日志以及 Loginapp、Adminapp、交易审批、服务容器和 API 政策服务模块中的管理操作生成结构化 JSON 日志。
准备工作
请确保满足以下前提条件:
- Google SecOps 实例
- Windows Server 2016 或更高版本,或者具有
systemd的 Linux 主机 - Bindplane 代理与 Airlock IAM 服务器之间的网络连接
- 如果通过代理运行,请确保防火墙端口已根据 Bindplane 代理要求打开
- 对 Airlock IAM 实例的管理员访问权限
- 对 Airlock IAM 服务器的 SSH 或控制台访问权限,用于修改配置文件
获取 Google SecOps 注入身份验证文件
- 登录 Google SecOps 控制台。
- 依次前往 SIEM 设置 > 收集代理。
下载注入身份验证文件。将该文件安全地保存在将要安装 Bindplane 的系统上。
获取 Google SecOps 客户 ID
- 登录 Google SecOps 控制台。
- 依次前往 SIEM 设置 > 配置文件。
复制并保存组织详细信息部分中的客户 ID。
安装 Bindplane 代理
按照以下说明在 Windows 或 Linux 操作系统上安装 Bindplane 代理。
Windows 安装
- 以管理员身份打开命令提示符或 PowerShell。
运行以下命令:
msiexec /i "https://github.com/observIQ/bindplane-agent/releases/latest/download/observiq-otel-collector.msi" /quiet等待安装完成。
运行以下命令来验证安装:
sc query observiq-otel-collector服务状态应为 RUNNING。
Linux 安装
- 打开具有 root 或 sudo 权限的终端。
运行以下命令:
sudo sh -c "$(curl -fsSlL https://github.com/observiq/bindplane-agent/releases/latest/download/install_unix.sh)" install_unix.sh等待安装完成。
运行以下命令来验证安装:
sudo systemctl status observiq-otel-collector服务状态应为有效(正在运行)。
其他安装资源
如需了解其他安装选项和问题排查信息,请参阅 Bindplane 代理安装指南。
配置 Bindplane 代理以注入 syslog 并将其发送到 Google SecOps
找到配置文件
Linux:
sudo nano /etc/bindplane-agent/config.yamlWindows:
notepad "C:\Program Files\observIQ OpenTelemetry Collector\config.yaml"
修改配置文件
将
config.yaml的全部内容替换为以下配置:receivers: udplog: listen_address: "0.0.0.0:514" exporters: chronicle/airlock_iam: compression: gzip creds_file_path: '/etc/bindplane-agent/ingestion-auth.json' customer_id: 'YOUR_CUSTOMER_ID' endpoint: malachiteingestion-pa.googleapis.com log_type: ERGON_INFORMATIK_AIRLOCK_IAM raw_log_field: body ingestion_labels: env: production source: airlock_iam service: pipelines: logs/airlock_to_chronicle: receivers: - udplog exporters: - chronicle/airlock_iam替换以下占位符:
接收器配置:
listen_address:设置为0.0.0.0:514可在端口 51 上监听所有接口。对于以非 root 身份运行的 Linux 系统,请使用端口1514或更高端口。
导出器配置:
creds_file_path:提取身份验证文件的完整路径:- Linux:
/etc/bindplane-agent/ingestion-auth.json - Windows:
C:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json
- Linux:
YOUR_CUSTOMER_ID:替换为上一步中的 Google SecOps 客户 IDendpoint:区域端点网址:- 美国:
malachiteingestion-pa.googleapis.com - 欧洲:
europe-malachiteingestion-pa.googleapis.com - 亚洲:
asia-southeast1-malachiteingestion-pa.googleapis.com
- 美国:
ingestion_labels:用于对日志进行分类的可选标签(可根据需要进行修改)
Windows 配置示例
receivers: udplog: listen_address: "0.0.0.0:514" exporters: chronicle/airlock_iam: compression: gzip creds_file_path: 'C:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json' customer_id: 'a1b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6' endpoint: malachiteingestion-pa.googleapis.com log_type: ERGON_INFORMATIK_AIRLOCK_IAM raw_log_field: body ingestion_labels: env: production source: airlock_iam service: pipelines: logs/airlock_to_chronicle: receivers: - udplog exporters: - chronicle/airlock_iam
保存配置文件
修改后,保存文件:
- Linux:依次按
Ctrl+O、Enter和Ctrl+X - Windows:依次点击文件 > 保存
重启 Bindplane 代理以应用更改
如需在 Linux 中重启 Bindplane 代理,请执行以下操作:
运行以下命令:
sudo systemctl restart observiq-otel-collector验证服务是否正在运行:
sudo systemctl status observiq-otel-collector检查日志是否存在错误:
sudo journalctl -u observiq-otel-collector -f
如需在 Windows 中重启 Bindplane 代理,请执行以下操作:
请从下列选项中选择一项:
以管理员身份运行命令提示符或 PowerShell:
net stop observiq-otel-collector && net start observiq-otel-collector服务控制台:
- 按
Win+R,输入services.msc,然后按 Enter 键。 - 找到 observIQ OpenTelemetry 收集器。
- 右键点击并选择重新启动。
- 按
验证服务是否正在运行:
sc query observiq-otel-collector检查日志是否存在错误:
type "C:\Program Files\observIQ OpenTelemetry Collector\log\collector.log"
配置 Airlock IAM syslog 转发
- 使用 SSH 或控制台访问权限连接到 Airlock IAM 服务器。
导航到实例目录:
cd /opt/airlock/iam/instances/<instance_name>/修改所有模块的 Log4j 配置文件:
nano log4j/all-modules.xml在
<Appenders>部分中添加 Syslog 附加器配置:<Syslog name="SYSLOG" facility="LOCAL1" host="BINDPLANE_AGENT_IP" port="514" protocol="UDP" format="RFC5424" includeMDC="true" mdcId="mdc" newLine="true"> <ExceptionPattern>%ex{full}</ExceptionPattern> <ThresholdFilter level="INFO"/> </Syslog>配置 Syslog appender 参数:
- host:将
BINDPLANE_AGENT_IP替换为 Bindplane 代理主机(例如192.168.1.100)的 IP 地址 - 端口:设置为
514(如果 Bindplane 代理配置为非特权端口,则设置为1514) - 协议:设置为
UDP(如果您在 Bindplane 中配置了 tcplog 接收器,则设置为TCP) - 格式:设置为
RFC5424表示结构化 syslog 格式 - facility:设置为
LOCAL1(或根据需要设置为其他设备代码:LOCAL0至LOCAL7) - ThresholdFilter 级别:设置为
INFO可发送 INFO 及更高级别的日志,设置为DEBUG可发送所有日志
- host:将
在
<Root>logger 部分内添加 appender 引用:<Loggers> <Root level="${sys:iam.log.level}"> <AppenderRef ref="SYSLOG"/> </Root> </Loggers>完整配置示例:
<?xml version="1.0" encoding="UTF-8"?> <Configuration name="Custom Log4j 2 Configuration for All IAM Modules"> <Appenders> <Syslog name="SYSLOG" facility="LOCAL1" host="192.168.1.100" port="514" protocol="UDP" format="RFC5424" includeMDC="true" mdcId="mdc" newLine="true"> <ExceptionPattern>%ex{full}</ExceptionPattern> <ThresholdFilter level="INFO"/> </Syslog> </Appenders> <Loggers> <Root level="${sys:iam.log.level}"> <AppenderRef ref="SYSLOG"/> </Root> </Loggers> </Configuration>保存配置文件:
依次按
Ctrl+O、Enter和Ctrl+X默认情况下,系统每 60 秒监控一次 Log4j 配置是否发生更改。新的 syslog 转发功能将自动启用,无需重启。
验证日志是否已发送到 Bindplane 代理:
sudo journalctl -u observiq-otel-collector -f验证日志是否已到达 Google SecOps:
- 登录 Google SecOps 控制台。
- 依次前往 SIEM > 搜索。
运行搜索查询:
metadata.log_type = "ERGON_INFORMATIK_AIRLOCK_IAM"验证 Airlock IAM 日志是否显示在搜索结果中。
其他配置选项
配置 TCP Syslog 而不是 UDP
如果您希望使用 TCP 传送而非 UDP 传送:
在 Bindplane 代理
config.yaml文件中,将接收器更改为tcplog:receivers: tcplog: listen_address: "0.0.0.0:514"在 Airlock IAM
log4j/all-modules.xml文件中,将协议更改为TCP:<Syslog name="SYSLOG" facility="LOCAL1" host="192.168.1.100" port="514" protocol="TCP" format="RFC5424" includeMDC="true" mdcId="mdc" newLine="true"> <ExceptionPattern>%ex{full}</ExceptionPattern> <ThresholdFilter level="INFO"/> </Syslog>重启 Bindplane 代理以应用接收器更改。
配置不同的日志级别
如需仅发送严重程度为 WARNING 及更高级别的日志,请执行以下操作:
<ThresholdFilter level="WARN"/>发送所有日志(包括 DEBUG):
<ThresholdFilter level="DEBUG"/>
可用的日志级别(从最低严重程度到最高严重程度):
TRACEDEBUGINFOWARNERRORFATAL
配置多个 Airlock IAM 实例
如果您有多个 Airlock IAM 实例向同一 Bindplane 代理发送数据,请使用提取标签来区分它们:
exporters: chronicle/airlock_iam_prod: compression: gzip creds_file_path: '/etc/bindplane-agent/ingestion-auth.json' customer_id: 'YOUR_CUSTOMER_ID' endpoint: malachiteingestion-pa.googleapis.com log_type: ERGON_INFORMATIK_AIRLOCK_IAM raw_log_field: body ingestion_labels: env: production instance: prod-iam-01 chronicle/airlock_iam_dev: compression: gzip creds_file_path: '/etc/bindplane-agent/ingestion-auth.json' customer_id: 'YOUR_CUSTOMER_ID' endpoint: malachiteingestion-pa.googleapis.com log_type: ERGON_INFORMATIK_AIRLOCK_IAM raw_log_field: body ingestion_labels: env: development instance: dev-iam-01 service: pipelines: logs/airlock_prod: receivers: - udplog exporters: - chronicle/airlock_iam_prod logs/airlock_dev: receivers: - udplog exporters: - chronicle/airlock_iam_dev
问题排查
日志未显示在 Google SecOps 中
验证 Bindplane 代理是否正在接收日志:
sudo journalctl -u observiq-otel-collector -f检查从 Airlock IAM 到 Bindplane 代理的网络连接:
telnet BINDPLANE_AGENT_IP 514验证 Log4j 配置是否有效:
cat /opt/airlock/iam/instances/<instance_name>/log4j/all-modules.xml检查 Airlock IAM 日志是否存在错误:
tail -f /opt/airlock/iam/instances/<instance_name>/logs/loginapp.log
Bindplane 代理错误
检查 Bindplane 代理日志是否存在错误:
sudo journalctl -u observiq-otel-collector -n 100验证
config.yaml语法是否正确。YAML 对缩进敏感。验证提取身份验证文件路径是否正确,以及该文件是否存在。
测试与 Google SecOps 端点的网络连接:
curl -v https://malachiteingestion-pa.googleapis.com
防火墙配置
确保已配置以下防火墙规则:
发送到 Bindplane 代理的入站流量:
- 协议:UDP(如果使用 tcplog,则为 TCP)
- 端口:514(或您配置的端口)
- 来源:Airlock IAM 服务器 IP 地址
来自 Bindplane 代理的出站流量:
- 协议:HTTPS (TCP 443)
- 目标:Google SecOps 区域端点
- 用途:将日志传送给 Google SecOps
UDM 映射表
| 日志字段 | UDM 映射 | 逻辑 |
|---|---|---|
| expire_time | additional.fields | 如果不为空,则合并为键为“expire_time”的标签 |
| 移动 | additional.fields | 如果非空,则合并为键为“mobile”的标签 |
| sn | additional.fields | 如果不为空,则合并为键为“sn”的标签 |
| CONFIG_CONTEXT | additional.fields | 如果不为空,则合并为键为“CONFIG_CONTEXT”的标签 |
| 部门 | additional.fields | 如果非空,则合并为键为“department”的标签 |
| ctxData | additional.fields | 如果不为空,则合并为键为“ctxData”的标签 |
| displayLanguage | additional.fields | 如果不为空,则合并为键为“displayLanguage”的标签 |
| nrPwdTrialsForUserDeletion | additional.fields | 如果不为空,则合并为键为“nrPwdTrialsForUserDeletion”的标签 |
| authInstant | additional.fields | 如果不为空,则合并为键为“authInstant”的标签 |
| auditToken | additional.fields | 如果不为空,则合并为键为“auditToken”的标签 |
| authPlugin | additional.fields | 如果不为空,则合并为键为“authPlugin”的标签 |
| latestIdPropagation | additional.fields | 如果非空,则合并为键为“latestIdPropagation”的标签 |
| 服务 | additional.fields | 如果不为空,则合并为键为“service”的标签 |
| ldap_type | additional.fields | 如果非空,则合并为键为“ldap_type”的标签 |
| report_message | additional.fields | 如果不为空,则合并为键为“report_message”的标签 |
| authenteeProvidedId | additional.fields | 如果非空,则合并为键为“authenteeProvidedId”的标签 |
| representerId | additional.fields | 如果非空,则合并为键为“representerId”的标签 |
| 引擎 | additional.fields | 如果非空,则合并为键为“engine”的标签 |
| 频道 | additional.fields | 如果不为空,则合并为键为“channel”的标签 |
| authnFactor | additional.fields | 如果不为空,则合并为键为“authnFactor”的标签 |
| authnFactorDetail | additional.fields | 如果不为空,则合并为键为“authnFactorDetail”的标签 |
| required_roles | additional.fields | 如果非空,则合并为键为“required_roles”的标签 |
| target_pattern | additional.fields | 如果不为空,则合并为键为“target_pattern”的标签 |
| nameid | additional.fields | 如果不为空,则合并为键为“nameid”的标签 |
| plugin_name | additional.fields | 如果不为空,则合并为键为“plugin_name”的标签 |
| 机制 | additional.fields | 如果不为空,则合并为键为“mechanism”的标签 |
| new_session_id | additional.fields | 如果不为空,则合并为键为“new_session_id”的标签 |
| former_session_id | additional.fields | 如果不为空,则合并为键为“former_session_id”的标签 |
| req_id | additional.fields | 如果非空,则合并为键为“req_id”的标签 |
| auth_method | additional.fields | 如果不为空,则合并为键为“auth_method”的标签 |
| otp | additional.fields | 如果不为空,则合并为键为“otp”的标签 |
| mob_num | additional.fields | 如果非空,则合并为键为“mob_num”的标签 |
| jsessionid | additional.fields | 如果非空,则合并为键为“jsessionid”的标签 |
| 创建日期 | additional.fields | 如果非空,则合并为键为“creationDate”的标签 |
| lastLogin | additional.fields | 如果非空,则合并为键为“lastLogin”的标签 |
| accountStatus | additional.fields | 如果不为空,则合并为键为“accountStatus”的标签 |
| companyAdministrator | additional.fields | 如果非空,则合并为键为“companyAdministrator”的标签 |
| companyCustomer | additional.fields | 如果非空,则合并为键为“companyCustomer”的标签 |
| privateCustomer | additional.fields | 如果不为空,则合并为键为“privateCustomer”的标签 |
| otpNotifyChannel | additional.fields | 如果不为空,则合并为键为“otpNotifyChannel”的标签 |
| nas_identifier | additional.fields | 如果非空,则合并为键为“nas_identifier”的标签 |
| session_id | additional.fields | 如果不为空,则合并为键为“session_id”的标签 |
| authPluginClassName | extensions.auth.auth_details | 如果存在,则直接复制值 |
| authenticator_type | extensions.auth.auth_details | 如果存在且 authPluginClassName 为空,则直接复制该值 |
| logon_type | extensions.auth.mechanism | 直接复制值 |
| 不适用 | 中介 | 从中间对象合并 |
| FORWARD_LOCATION | intermediary.url | 直接复制值 |
| metadata_description | metadata.description | 直接复制值 |
| 不适用 | metadata.event_type | 根据事件上下文设置;由解析器逻辑确定 |
| REQUEST_ID | metadata.product_log_id | 直接复制值 |
| airlock_version | metadata.product_version | 直接复制值 |
| 方法 | network.http.method | 直接复制值 |
| user_agent | network.http.user_agent | 直接复制值 |
| packet_size | network.received_packets | 转换为整数的值 |
| GSID | network.session_id | 直接复制值 |
| 主机 | principal.hostname | 直接复制值 |
| CLIENT_IP | principal.ip | 直接复制值 |
| UID | principal.user.userid | 直接复制值 |
| role_name | role.name | 直接复制值 |
| authenteeType | role.type | 直接复制值 |
| 不适用 | security_result | 从 security_result 对象合并 |
| 操作 | security_result.action_details | 如果存在,则直接复制值 |
| authMethodShortDesc | security_result.action_details | 如果存在,则合并值 |
| action_detail | security_result.action_details | 如果存在,则合并值 |
| category_value | security_result.category | 直接复制值 |
| actionGroup | security_result.category_details | 直接复制值 |
| result_description | security_result.description | 直接复制值 |
| 例外情况 | security_result.summary | 如果存在,则直接复制值 |
| STATLOG | security_result.summary | 如果存在且异常为空,则直接复制值 |
| mob_num | src.asset.type | 直接复制值 |
| src.email | 如果存在,则直接复制值 | |
| 电子邮件 | src.email | 如果存在且电子邮件地址为空,则直接复制值 |
| src_ip | src.ip | 直接复制值 |
| src_port | src.port | 转换为整数的值 |
| 角色 | src.user.attribute.roles | 直接复制值 |
| 公司 | src.user.company_name | 直接复制值 |
| firstName | src.user.first_name | 直接复制值 |
| lastName | src.user.last_name | 直接复制值 |
| 状态 | src.user.user_authentication_status | 直接复制值 |
| displayName | src.user.user_display_name | 如果存在,则直接复制值 |
| 用户名 | src.user.user_display_name | 如果存在且 displayName 为空,则直接复制值 |
| src_user | src.user.user_display_name | 如果存在且 displayName/username 为空,则直接复制值 |
| authenteeId | src.user.userid | 如果存在,则直接复制值 |
| src_userid | src.user.userid | 如果存在该值且 authenteeId 为空,则直接复制该值 |
| UID | src.user.userid | 如果存在且 authenteeId/src_userid 为空,则直接复制值 |
| file_path | target.file.full_path | 直接复制值 |
| target_hostname | target.hostname | 直接复制值 |
| target_port | target.port | 转换为整数的值 |
| task_name | target.resource.name | 直接复制值 |
| target_url | target.url | 直接复制值 |
| 不适用 | metadata.product_name | 设置为“Ergon Informatik Airlock IAM” |
| 不适用 | metadata.vendor_name | 设置为“Ergon Informatik” |
需要更多帮助?获得社区成员和 Google SecOps 专业人士的解答。