14.2. 审计日志消息示例


日志消息的格式如下:

{
  "headers": {
    "Accept-Encoding": [
      "gzip"
    ],
    "Content-Length": [
      "586"
    ],
    "Content-Type": [
      "application/json"
    ],
    "User-Agent": [
      "Go-http-client/1.1"
    ]
  },
  "data": {
    "audit": {
      "interaction": "CREATE",
      "method": "UI",
      "request": {
        "endpoint": "/v1/notifiers",
        "method": "POST",
        "source": {
          "requestAddr": "10.131.0.7:58276",
          "xForwardedFor": "8.8.8.8",
        },
        "sourceIp": "8.8.8.8",
        "payload": {
          "@type": "storage.Notifier",
          "enabled": true,
          "generic": {
            "auditLoggingEnabled": true,
            "endpoint": "http://samplewebhookserver.com:8080"
          },
          "id": "b53232ee-b13e-47e0-b077-1e383c84aa07",
          "name": "Webhook",
          "type": "generic",
          "uiEndpoint": "https://localhost:8000"
        }
      },
      "status": "REQUEST_SUCCEEDED",
      "time": "2019-05-28T16:07:05.500171300Z",
      "user": {
        "friendlyName": "John Doe",
        "role": {
          "globalAccess": "READ_WRITE_ACCESS",
          "name": "Admin"
        },
        "username": "john.doe@example.com"
      }
    }
  }
}
Copy to Clipboard Toggle word wrap

请求的源 IP 地址显示在源参数中,这有助于调查审计日志请求并识别其源。

要确定请求的源 IP 地址,RHACS 使用以下参数:

  • XForwardedFor: X-Forwarded-For 标头。
  • requestAddr :远程地址标头。
  • SourceIp :HTTP 请求的 IP 地址。
重要

源 IP 地址的确定取决于您如何在外部公开 Central。您可以考虑以下选项:

  • 如果您在负载均衡器后面公开 Central,例如,如果您在 Google Kubernetes Engine (GKE)或 Amazon Elastic Kubernetes Service (Amazon EKS)上运行 Central,请参阅 保留客户端源 IP
  • 如果您在使用 X-Forwarded-For 标头 转发请求的 Ingress Controller 后公开 Central,则不需要进行任何配置更改。
  • 如果您使用 TLS passthrough 路由公开 Central,则无法确定客户端的源 IP 地址。源参数中会显示集群内部 IP 地址,作为客户端的源 IP 地址。
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat