引力子/引力子服务包审计跟踪

用于引力子/引力子的审计跟踪包

v3.0.0 2022-03-08 10:31 UTC

This package is auto-updated.

Last update: 2024-09-17 14:17:59 UTC


README

内部审计工具包

该工具旨在作为隐藏服务运行,以了解每个用户请求或修改的内容。它不会限制或干扰用户请求,但仅存储更改和接收到的数据。

  • x-header-audit-thread → id-string-uuid
  • 列出线程的API:/auditing/?eq(thread,string:id-string-uuid)`

版本

  • v0.1.0: 2016/09/28 第一个版本,默认启用基本审计,收集更改。

配置

  • 需要 Graviton ^v0.77.0,因此模型事件在文档更新时触发。
  • AuditTracking/Resources/config/parameters.yml 中设置配置。
parameters:
    graviton_audit_tracking:
        # General on/off switch
        log_enabled: true
        # Localhost and not Real User on/off switch
        log_test_calls: false
        # Store request log also on 400 error
        log_on_failure: false
        # Request methods to be saved, array PUT,POST,DELETE,PATCH...
        requests: []
        # Store full request header request data.
        request_headers: false
        # Store full request content body. if true full lenght, can be limited with a integer
        request_content: false
        # Store reponse basic information. if true full lenght, can be limited with a integer
        response: false
        # Store full response header request data.
        response_headers: false
        # Store response body content
        response_content: false
        # Store data base events, array of events, insert, update, delete
        database: ['insert','update','delete']
        # Store all exception
        exceptions: false
        # Exclude header status exceptions code, 400=bad request, form validation
        exceptions_exclude: [400]
        # Exclude listed URLS, array
        exlude_urls: ["/auditing"]

在 Graviton 中进行测试

  • composer require graviton/graviton-service-bundle-audit-tracking
  • 在引力子内部加载该包:GravitonBundleBundle:getBundles - 添加新包的加载
  • 在配置中启用 log_test_calls: true(此外,这样您就可以在开发模式下使用该包)

在包装器中启用

  • 在 resources/configuration.sh 中启用新包:\\Graviton\\AuditTrackingBundle\\GravitonAuditTrackingBundle
  • composer require graviton/graviton-service-bundle-audit-tracking
  • sh dev-cleanstart.sh