• 极狐gitlab发送组内审计日志到远端


    极狐gitlab发送组内审计日志到远端

    极狐gitlab v14.10.0 新增将组内所有审计事件流发送到远端 http 服务的功能。

    参考:Audit event streaming | GitLab

    1. 搭建测试 http 服务

    用于接收 gitlab 实例发送过来的审计事件,项目地址:https://jihulab.com/ffli/gitlab-audit-events-receive

    2. 开启审计事件流发送

    2.1 设置 HTTP 接收断

    由于是内网测试环境,首先设置出站请求:

    admin -- settings -- network -- Outbound requests -- 勾选 Allow requests to the local network from web hooks and services
    

    然后设置 Audit event Streams 地址:

    在组视图下点击左侧 Security & Compliance --> Audit event --> Streams 选项卡 -- Add stream
    

    2.2 开启功能 flag

    参考官方文档 Audit event streaming | GitLab

    开启 flag audit_event_streaming_git_operations

    $ gitlab-rails console
    --------------------------------------------------------------------------------
     Ruby:         ruby 2.7.5p203 (2021-11-24 revision f69aeb8314) [x86_64-linux]
     GitLab:       14.10.0-jh (562b1ccffb3) EE
     GitLab Shell: 13.25.1
     PostgreSQL:   12.7
    ------------------------------------------------------------[ booted in 21.64s ]
    Loading production environment (Rails 6.1.4.7)
    irb(main):001:0> Feature.enable(:audit_event_streaming_git_operations)
    => true
    irb(main):002:0> 
    irb(main):003:0> Feature.enabled?(:audit_event_streaming_git_operations)
    => true
    irb(main):004:0> 
    

    3. 审计事件流发送测试

    审计事件会存放到本地日志:/var/log/gitlab/gitlab-rails/audit_json.log

    然后按照官方文档的意思是接受所有 all audit events:

    那么测试一下常用场景日志情况(测试基于极狐gitlab v14.10.0)

    3.1 日志统计

    序号 场景 HTTP远端 本地日志
    1 创建子组
    2 修改子组名称
    3 删除子组
    4 创建分支
    5 删除分支
    6 创建tag
    7 删除tag
    8 锁定文件
    9 解锁文件
    10 下载zip、tar.gz、tar.bz2、tar源码
    11 创建项目
    12 修改项目名称
    13 修改项目path
    14 删除项目
    15 web ide push
    16 http clone
    17 http push
    18 ssh clone
    19 ssh push
    20 http fetch
    21 ssh fetch
    23 创建mr
    24 审核mr
    25 取消mr审核
    26 合并mr
    27 fork项目
    28 创建issue
    29 修改issue
    30 删除issue
    31 创建Snippets
    32 修改Snippets名称与描述
    33 修改Snippets文件内容
    34 http clone Snippets
    35 ssh clone Snippets
    36 下载Snippets中文件
    37 http push Snippets
    38 ssh push Snippets
    39 删除Snippets
    40 创建项目TOKEN
    41 删除项目TOKEN
    42 创建组TOKEN
    43 删除组TOKEN
    44 添加项目CI变量
    45 修改项目CI变量
    46 删除项目CI变量
    47 创建pipeline
    48 添加定时任务 pipeline
    49 修改定时任务pipeline
    50 删除定时任务pipeline
    51 改变组可见性
    52 改变项目可见性
    53 改变Merge request approvals规则
    54 添加组成员到项目
    55 从项目删除组成员
    56 添加成员到项目
    57 改变项目成员角色
    58 从项目删除成员
    59 添加组成员到组
    60 从组删除组成员
    61 添加成员到组
    62 改变组成员角色
    63 从组删除成员

    3.2 日志重复

    根据 官方文档 描述,可能会存在重复发送的情况:

    这时候接收端需要用 id 去重,经过测试发现使用 http clone 与 fetch 时,的确会重复发送:

    # http clone 
    {"id": 1651824803, "author_id": 1, "entity_id": 2, "entity_type": "Project", "details": {"author_name": "Administrator", "target_id": 2, "target_type": "Project", "target_details": "test", "custom_message": {"protocol": "http", "action": "git-upload-pack"}, "ip_address": "10.10.10.1", "entity_path": "leffss/test"}, "ip_address": "10.10.10.1", "author_name": "Administrator", "entity_path": "leffss/test", "target_details": "test", "created_at": "2022-05-06T08:13:23.623Z", "target_type": "Project", "target_id": 2}
    {"id": 1651824803, "author_id": 1, "entity_id": 2, "entity_type": "Project", "details": {"author_name": "Administrator", "target_id": 2, "target_type": "Project", "target_details": "test", "custom_message": {"protocol": "http", "action": "git-upload-pack"}, "ip_address": "10.10.10.1", "entity_path": "leffss/test"}, "ip_address": "10.10.10.1", "author_name": "Administrator", "entity_path": "leffss/test", "target_details": "test", "created_at": "2022-05-06T08:13:23.846Z", "target_type": "Project", "target_id": 2}
    
    # http fetch:
    {"id": 1651825472, "author_id": 1, "entity_id": 2, "entity_type": "Project", "details": {"author_name": "Administrator", "target_id": 2, "target_type": "Project", "target_details": "test", "custom_message": {"protocol": "http", "action": "git-upload-pack"}, "ip_address": "10.10.10.1", "entity_path": "leffss/test"}, "ip_address": "10.10.10.1", "author_name": "Administrator", "entity_path": "leffss/test", "target_details": "test", "created_at": "2022-05-06T08:24:32.199Z", "target_type": "Project", "target_id": 2}
    {"id": 1651825472, "author_id": 1, "entity_id": 2, "entity_type": "Project", "details": {"author_name": "Administrator", "target_id": 2, "target_type": "Project", "target_details": "test", "custom_message": {"protocol": "http", "action": "git-upload-pack"}, "ip_address": "10.10.10.1", "entity_path": "leffss/test"}, "ip_address": "10.10.10.1", "author_name": "Administrator", "entity_path": "leffss/test", "target_details": "test", "created_at": "2022-05-06T08:24:32.349Z", "target_type": "Project", "target_id": 2}
    

    4. 附录:日志格式

    创建子组

    HTTP远端:

    本地日志:

    {"severity":"INFO","time":"2022-05-06T07:43:22.778Z","correlation_id":"01G2C55GY1BVWEPZPZ61AEXEX8","author_id":1,"author_name":"Administrator","entity_id":6,"entity_type":"Group","created_at":"2022-05-06T07:43:22.775+00:00","ip_address":"10.10.10.1","add":"group","target_id":6,"target_type":"Group","target_details":"leffss/subgroup","entity_path":"leffss/subgroup"}
    

    修改子组名称

    HTTP远端:

    本地日志:

    {"severity":"INFO","time":"2022-05-06T07:44:40.356Z","correlation_id":"01G2C57WRM4Y8HB77WXWS1NBJX","author_id":1,"author_name":"Administrator","entity_id":6,"entity_type":"Group","created_at":"2022-05-06T07:44:40.354+00:00","ip_address":"10.10.10.1","change":"name","from":"subgroup","to":"subgroup1","target_id":6,"target_type":"Group","target_details":"subgroup1","entity_path":"leffss/subgroup"}
    

    删除子组

    HTTP远端:

    本地日志:

    # 预删除:
    {"severity":"INFO","time":"2022-05-06T07:45:38.432Z","correlation_id":"01G2C59NHM53TZYNBK3YPB0Q31","author_id":1,"author_name":"Administrator","entity_id":6,"entity_type":"Group","created_at":"2022-05-06T07:45:38.428+00:00","ip_address":"10.10.10.1","custom_message":"Group marked for deletion","target_id":6,"target_type":"Group","target_details":"leffss/subgroup","entity_path":"leffss/subgroup"}
    # 实际删除:
    {"severity":"INFO","time":"2022-05-06T07:46:22.098Z","correlation_id":"01G2C5AZZ34PAQY8550ZA19JX0","author_id":1,"author_name":"Administrator","entity_id":6,"entity_type":"Group","created_at":"2022-05-06T07:46:22.097+00:00","ip_address":"10.10.10.1","remove":"group","target_id":6,"target_type":"Group","target_details":"leffss/subgroup","entity_path":"leffss/subgroup"}
    

    创建分支

    HTTP远端:

    {"id": 1651823799, "author_id": 1, "entity_id": 2, "entity_type": "Project", "details": {"author_name": "Administrator", "target_id": 2, "target_type": "Project", "target_details": "test", "custom_message": {"protocol": "web", "action": "git-receive-pack"}, "ip_address": "127.0.0.1", "entity_path": "leffss/test"}, "ip_address": "127.0.0.1", "author_name": "Administrator", "entity_path": "leffss/test", "target_details": "test", "created_at": "2022-05-06T07:56:39.169Z", "target_type": "Project", "target_id": 2}
    

    本地日志:

    删除分支

    HTTP远端:

    {"id": 1651824048, "author_id": 1, "entity_id": 2, "entity_type": "Project", "details": {"author_name": "Administrator", "target_id": 2, "target_type": "Project", "target_details": "test", "custom_message": {"protocol": "web", "action": "git-receive-pack"}, "ip_address": "127.0.0.1", "entity_path": "leffss/test"}, "ip_address": "127.0.0.1", "author_name": "Administrator", "entity_path": "leffss/test", "target_details": "test", "created_at": "2022-05-06T08:00:48.473Z", "target_type": "Project", "target_id": 2}
    

    本地日志:

    创建tag

    HTTP远端:

    {"id": 1651824129, "author_id": 1, "entity_id": 2, "entity_type": "Project", "details": {"author_name": "Administrator", "target_id": 2, "target_type": "Project", "target_details": "test", "custom_message": {"protocol": "web", "action": "git-receive-pack"}, "ip_address": "127.0.0.1", "entity_path": "leffss/test"}, "ip_address": "127.0.0.1", "author_name": "Administrator", "entity_path": "leffss/test", "target_details": "test", "created_at": "2022-05-06T08:02:09.620Z", "target_type": "Project", "target_id": 2}
    

    本地日志:

    删除tag

    HTTP远端:

    {"id": 1651824166, "author_id": 1, "entity_id": 2, "entity_type": "Project", "details": {"author_name": "Administrator", "target_id": 2, "target_type": "Project", "target_details": "test", "custom_message": {"protocol": "web", "action": "git-receive-pack"}, "ip_address": "127.0.0.1", "entity_path": "leffss/test"}, "ip_address": "127.0.0.1", "author_name": "Administrator", "entity_path": "leffss/test", "target_details": "test", "created_at": "2022-05-06T08:02:46.491Z", "target_type": "Project", "target_id": 2}
    

    本地日志:

    下载zip、tar.gz、tar.bz2、tar源码

    HTTP远端:

    {"id": 14, "author_id": 1, "entity_id": 2, "entity_type": "Project", "details": {"custom_message": "Repository Download Started", "author_name": "Administrator", "target_id": 2, "target_type": "Project", "target_details": "leffss/test", "ip_address": "10.10.10.1", "entity_path": "leffss/test"}, "ip_address": "10.10.10.1", "author_name": "Administrator", "entity_path": "leffss/test", "target_details": "leffss/test", "created_at": "2022-05-06T08:04:44.288Z", "target_type": "Project", "target_id": 2}
    

    本地日志:

    {"severity":"INFO","time":"2022-05-06T08:04:44.291Z","correlation_id":"01G2C6CMK2RGW7C2Q9926HQ74H","author_id":1,"author_name":"Administrator","entity_id":2,"entity_type":"Project","created_at":"2022-05-06T08:04:44.288+00:00","ip_address":"10.10.10.1","custom_message":"Repository Download Started","target_id":2,"target_type":"Project","target_details":"leffss/test","entity_path":"leffss/test"}
    

    创建项目

    HTTP远端:

    {"id": 17, "author_id": 1, "entity_id": 4, "entity_type": "Project", "details": {"add": "project", "author_name": "Administrator", "target_id": 4, "target_type": "Project", "target_details": "leffss/p2", "ip_address": "10.10.10.1", "entity_path": "leffss/p2"}, "ip_address": "10.10.10.1", "author_name": "Administrator", "entity_path": "leffss/p2", "target_details": "leffss/p2", "created_at": "2022-05-06T08:06:30.040Z", "target_type": "Project", "target_id": 4}
    

    本地日志:

    {"severity":"INFO","time":"2022-05-06T08:06:30.044Z","correlation_id":"01G2C6FVDKXNY8YYFK1F6PBWXE","author_id":1,"author_name":"Administrator","entity_id":4,"entity_type":"Project","created_at":"2022-05-06T08:06:30.040+00:00","ip_address":"10.10.10.1","add":"project","target_id":4,"target_type":"Project","target_details":"leffss/p2","entity_path":"leffss/p2"}
    

    修改项目名称

    HTTP远端:

    {"id": 18, "author_id": 1, "entity_id": 4, "entity_type": "Project", "details": {"change": "name", "from": "leffss / p2", "to": "leffss / p23", "author_name": "Administrator", "target_id": 4, "target_type": "Project", "target_details": "leffss/p2", "ip_address": "10.10.10.1", "entity_path": "leffss/p2"}, "ip_address": "10.10.10.1", "author_name": "Administrator", "entity_path": "leffss/p2", "target_details": "leffss/p2", "created_at": "2022-05-06T08:07:34.288Z", "target_type": "Project", "target_id": 4}
    

    本地日志:

    {"severity":"INFO","time":"2022-05-06T08:07:34.290Z","correlation_id":"01G2C6HTEWMYK3291G8QG0NNHT","author_id":1,"author_name":"Administrator","entity_id":4,"entity_type":"Project","created_at":"2022-05-06T08:07:34.288+00:00","ip_address":"10.10.10.1","change":"name","from":"leffss / p2","to":"leffss / p23","target_id":4,"target_type":"Project","target_details":"leffss/p2","entity_path":"leffss/p2"}
    

    修改项目path

    HTTP远端:

    {"id": 19, "author_id": 1, "entity_id": 4, "entity_type": "Project", "details": {"change": "path", "from": "leffss/p2", "to": "leffss/p23", "author_name": "Administrator", "target_id": 4, "target_type": "Project", "target_details": "leffss/p23", "ip_address": "10.10.10.1", "entity_path": "leffss/p23"}, "ip_address": "10.10.10.1", "author_name": "Administrator", "entity_path": "leffss/p23", "target_details": "leffss/p23", "created_at": "2022-05-06T08:08:31.192Z", "target_type": "Project", "target_id": 4}
    

    本地日志:

    {"severity":"INFO","time":"2022-05-06T08:08:31.195Z","correlation_id":"01G2C6KHMFXXMB0AZS73HZFQDE","author_id":1,"author_name":"Administrator","entity_id":4,"entity_type":"Project","created_at":"2022-05-06T08:08:31.192+00:00","ip_address":"10.10.10.1","change":"path","from":"leffss/p2","to":"leffss/p23","target_id":4,"target_type":"Project","target_details":"leffss/p23","entity_path":"leffss/p23"}
    

    删除项目

    HTTP远端:

    本地日志:

    {"severity":"INFO","time":"2022-05-06T08:09:18.300Z","correlation_id":"01G2C6MZJ74A5FZ69DZ40E7KTD","author_id":1,"author_name":"Administrator","entity_id":4,"entity_type":"Project","created_at":"2022-05-06T08:09:18.298+00:00","ip_address":"10.10.10.1","remove":"project","target_id":4,"target_type":"Project","target_details":"leffss/p23","entity_path":"leffss/p23"}
    

    web ide push

    HTTP远端:

    {"id": 1651824738, "author_id": 1, "entity_id": 2, "entity_type": "Project", "details": {"author_name": "Administrator", "target_id": 2, "target_type": "Project", "target_details": "test", "custom_message": {"protocol": "web", "action": "git-receive-pack"}, "ip_address": "127.0.0.1", "entity_path": "leffss/test"}, "ip_address": "127.0.0.1", "author_name": "Administrator", "entity_path": "leffss/test", "target_details": "test", "created_at": "2022-05-06T08:12:18.343Z", "target_type": "Project", "target_id": 2}
    {"id": 1651824738, "author_id": 1, "entity_id": 2, "entity_type": "Project", "details": {"author_name": "Administrator", "target_id": 2, "target_type": "Project", "target_details": "test", "custom_message": {"protocol": "web", "action": "git-receive-pack"}, "ip_address": "127.0.0.1", "entity_path": "leffss/test"}, "ip_address": "127.0.0.1", "author_name": "Administrator", "entity_path": "leffss/test", "target_details": "test", "created_at": "2022-05-06T08:12:18.343Z", "target_type": "Project", "target_id": 2}
    

    本地日志:

    http clone

    HTTP远端:

    {"id": 1651824803, "author_id": 1, "entity_id": 2, "entity_type": "Project", "details": {"author_name": "Administrator", "target_id": 2, "target_type": "Project", "target_details": "test", "custom_message": {"protocol": "http", "action": "git-upload-pack"}, "ip_address": "10.10.10.1", "entity_path": "leffss/test"}, "ip_address": "10.10.10.1", "author_name": "Administrator", "entity_path": "leffss/test", "target_details": "test", "created_at": "2022-05-06T08:13:23.846Z", "target_type": "Project", "target_id": 2}
    

    本地日志:

    http push

    HTTP远端:

    {"id": 1651824900, "author_id": 1, "entity_id": 2, "entity_type": "Project", "details": {"author_name": "Administrator", "target_id": 2, "target_type": "Project", "target_details": "test", "custom_message": {"protocol": "http", "action": "git-receive-pack"}, "ip_address": "127.0.0.1", "entity_path": "leffss/test"}, "ip_address": "127.0.0.1", "author_name": "Administrator", "entity_path": "leffss/test", "target_details": "test", "created_at": "2022-05-06T08:15:00.979Z", "target_type": "Project", "target_id": 2}
    

    本地日志:

    ssh clone

    HTTP远端:

    {"id": 1651825128, "author_id": 1, "entity_id": 2, "entity_type": "Project", "details": {"author_name": "Administrator", "target_id": 2, "target_type": "Project", "target_details": "test", "custom_message": {"protocol": "ssh", "action": "git-upload-pack"}, "ip_address": "127.0.0.1", "entity_path": "leffss/test"}, "ip_address": "127.0.0.1", "author_name": "Administrator", "entity_path": "leffss/test", "target_details": "test", "created_at": "2022-05-06T08:18:48.401Z", "target_type": "Project", "target_id": 2}
    

    本地日志:

    ssh push

    HTTP远端:

    {"id": 1651825186, "author_id": 1, "entity_id": 2, "entity_type": "Project", "details": {"author_name": "Administrator", "target_id": 2, "target_type": "Project", "target_details": "test", "custom_message": {"protocol": "ssh", "action": "git-receive-pack"}, "ip_address": "127.0.0.1", "entity_path": "leffss/test"}, "ip_address": "127.0.0.1", "author_name": "Administrator", "entity_path": "leffss/test", "target_details": "test", "created_at": "2022-05-06T08:19:46.165Z", "target_type": "Project", "target_id": 2}
    

    本地日志:

    http fetch

    HTTP远端:

    {"id": 1651825472, "author_id": 1, "entity_id": 2, "entity_type": "Project", "details": {"author_name": "Administrator", "target_id": 2, "target_type": "Project", "target_details": "test", "custom_message": {"protocol": "http", "action": "git-upload-pack"}, "ip_address": "10.10.10.1", "entity_path": "leffss/test"}, "ip_address": "10.10.10.1", "author_name": "Administrator", "entity_path": "leffss/test", "target_details": "test", "created_at": "2022-05-06T08:24:32.349Z", "target_type": "Project", "target_id": 2}
    

    本地日志:

    ssh fetch

    HTTP远端:

    {"id": 1651825423, "author_id": 1, "entity_id": 2, "entity_type": "Project", "details": {"author_name": "Administrator", "target_id": 2, "target_type": "Project", "target_details": "test", "custom_message": {"protocol": "ssh", "action": "git-upload-pack"}, "ip_address": "127.0.0.1", "entity_path": "leffss/test"}, "ip_address": "127.0.0.1", "author_name": "Administrator", "entity_path": "leffss/test", "target_details": "test", "created_at": "2022-05-06T08:23:43.485Z", "target_type": "Project", "target_id": 2}
    

    本地日志:

    改变Merge request approvals规则

    HTTP远端:

    {"id": 52, "author_id": 1, "entity_id": 2, "entity_type": "Project", "details": {"change": "prevent merge request approval from authors", "from": false, "to": true, "author_name": "Administrator", "target_id": 2, "target_type": "Project", "target_details": "leffss/test", "ip_address": "10.10.10.1", "entity_path": "leffss/test"}, "ip_address": "10.10.10.1", "author_name": "Administrator", "entity_path": "leffss/test", "target_details": "leffss/test", "created_at": "2022-05-07T01:18:41.689Z", "target_type": "Project", "target_id": 2}
    

    本地日志:

    {"severity":"INFO","time":"2022-05-07T01:18:41.691Z","correlation_id":"01G2E1HVJXF9VV3NEV93SECKJF","author_id":1,"author_name":"Administrator","entity_id":2,"entity_type":"Project","created_at":"2022-05-07T01:18:41.689+00:00","ip_address":"10.10.10.1","change":"prevent merge request approval from authors","from":"false","to":"true","target_id":2,"target_type":"Project","target_details":"leffss/test","entity_path":"leffss/test"}
    

    审核mr

    HTTP远端:

    {"id": 1651825963, "author_id": 1, "entity_id": 2, "entity_type": "Project", "details": {"author_name": "Administrator", "target_id": 2, "target_type": "MergeRequest", "target_details": "Update README.md", "custom_message": "Approved merge request", "ip_address": "10.10.10.1", "entity_path": "leffss/test"}, "ip_address": "10.10.10.1", "author_name": "Administrator", "entity_path": "leffss/test", "target_details": "Update README.md", "created_at": "2022-05-06T08:32:43.062Z", "target_type": "MergeRequest", "target_id": 2}
    

    本地日志:

    合并mr

    HTTP远端:

    {"id": 1651826040, "author_id": 1, "entity_id": 2, "entity_type": "Project", "details": {"author_name": "Administrator", "target_id": 2, "target_type": "Project", "target_details": "test", "custom_message": {"protocol": "web", "action": "git-receive-pack"}, "ip_address": "127.0.0.1", "entity_path": "leffss/test"}, "ip_address": "127.0.0.1", "author_name": "Administrator", "entity_path": "leffss/test", "target_details": "test", "created_at": "2022-05-06T08:34:00.228Z", "target_type": "Project", "target_id": 2}
    

    本地日志:

    fork项目

    HTTP远端:

    本地日志:

    {"severity":"INFO","time":"2022-05-06T08:35:19.961Z","correlation_id":"01G2C84KY1CD7GE4K3ZFW68B0D","author_id":1,"author_name":"Administrator","entity_id":5,"entity_type":"Project","created_at":"2022-05-06T08:35:19.958+00:00","ip_address":"10.10.10.1","custom_message":"Added protected branch with [allowed to push: ["Maintainers"], allowed to merge: ["Maintainers"], allow force push: false, code owner approval required: false]","target_id":3,"target_type":"ProtectedBranch","target_details":"main","push_access_levels":["Maintainers"],"merge_access_levels":["Maintainers"],"allow_force_push":false,"code_owner_approval_required":false,"entity_path":"root/test"}
    

    创建Snippets

    HTTP远端:

    {"id": 1651826462, "author_id": 1, "entity_id": 2, "entity_type": "Project", "details": {"author_name": "Administrator", "target_id": 2, "target_type": "Project", "target_details": "test", "custom_message": {"protocol": "web", "action": "git-receive-pack"}, "ip_address": "127.0.0.1", "entity_path": "leffss/test"}, "ip_address": "127.0.0.1", "author_name": "Administrator", "entity_path": "leffss/test", "target_details": "test", "created_at": "2022-05-06T08:41:02.816Z", "target_type": "Project", "target_id": 2}
    

    本地日志:

    修改Snippets文件内容

    HTTP远端:

    {"id": 1651826568, "author_id": 1, "entity_id": 2, "entity_type": "Project", "details": {"author_name": "Administrator", "target_id": 2, "target_type": "Project", "target_details": "test", "custom_message": {"protocol": "web", "action": "git-receive-pack"}, "ip_address": "127.0.0.1", "entity_path": "leffss/test"}, "ip_address": "127.0.0.1", "author_name": "Administrator", "entity_path": "leffss/test", "target_details": "test", "created_at": "2022-05-06T08:42:48.611Z", "target_type": "Project", "target_id": 2}
    

    本地日志:

    http clone Snippets

    HTTP远端:

    {"id": 1651826622, "author_id": 1, "entity_id": 2, "entity_type": "Project", "details": {"author_name": "Administrator", "target_id": 2, "target_type": "Project", "target_details": "test", "custom_message": {"protocol": "http", "action": "git-upload-pack"}, "ip_address": "10.10.10.1", "entity_path": "leffss/test"}, "ip_address": "10.10.10.1", "author_name": "Administrator", "entity_path": "leffss/test", "target_details": "test", "created_at": "2022-05-06T08:43:42.420Z", "target_type": "Project", "target_id": 2}
    

    本地日志:

    ssh clone Snippets

    HTTP远端:

    {"id": 1651826665, "author_id": 1, "entity_id": 2, "entity_type": "Project", "details": {"author_name": "Administrator", "target_id": 2, "target_type": "Project", "target_details": "test", "custom_message": {"protocol": "ssh", "action": "git-upload-pack"}, "ip_address": "127.0.0.1", "entity_path": "leffss/test"}, "ip_address": "127.0.0.1", "author_name": "Administrator", "entity_path": "leffss/test", "target_details": "test", "created_at": "2022-05-06T08:44:25.154Z", "target_type": "Project", "target_id": 2}
    

    本地日志:

    http push Snippets

    HTTP远端:

    {"id": 1651826794, "author_id": 1, "entity_id": 2, "entity_type": "Project", "details": {"author_name": "Administrator", "target_id": 2, "target_type": "Project", "target_details": "test", "custom_message": {"protocol": "http", "action": "git-receive-pack"}, "ip_address": "127.0.0.1", "entity_path": "leffss/test"}, "ip_address": "127.0.0.1", "author_name": "Administrator", "entity_path": "leffss/test", "target_details": "test", "created_at": "2022-05-06T08:46:34.600Z", "target_type": "Project", "target_id": 2}
    

    本地日志:

    ssh push Snippets

    HTTP远端:

    {"id": 1651826920, "author_id": 1, "entity_id": 2, "entity_type": "Project", "details": {"author_name": "Administrator", "target_id": 2, "target_type": "Project", "target_details": "test", "custom_message": {"protocol": "ssh", "action": "git-receive-pack"}, "ip_address": "127.0.0.1", "entity_path": "leffss/test"}, "ip_address": "127.0.0.1", "author_name": "Administrator", "entity_path": "leffss/test", "target_details": "test", "created_at": "2022-05-06T08:48:40.751Z", "target_type": "Project", "target_id": 2}
    

    本地日志:

    创建项目TOKEN

    HTTP远端:

    {"id": 38, "author_id": 1, "entity_id": 2, "entity_type": "Project", "details": {"target_id": 1, "target_type": "PersonalAccessToken", "target_details": "token", "action": "custom", "custom_message": "Created project access token with token_id: 1 with scopes: ["api", "read_api", "read_repository", "write_repository"] and Maintainer access level.", "ip_address": "10.10.10.1", "entity_path": "leffss/test", "author_name": "Administrator"}, "ip_address": "10.10.10.1", "author_name": "Administrator", "entity_path": "leffss/test", "target_details": "token", "created_at": "2022-05-06T08:51:33.958Z", "target_type": "PersonalAccessToken", "target_id": 1}
    

    本地日志:

    {"severity":"INFO","time":"2022-05-06T08:51:33.626Z","correlation_id":"01G2C92BN4QC5155K4EPBQKWMM","author_id":4,"author_name":"token","entity_id":4,"entity_type":"User","created_at":"2022-05-06T08:51:33.624+00:00","ip_address":"10.10.10.1","add":"email","target_id":null,"target_type":"Email","target_details":null,"entity_path":"project_2_bot"}
    {"severity":"INFO","time":"2022-05-06T08:51:33.673Z","correlation_id":"01G2C92BN4QC5155K4EPBQKWMM","author_id":1,"author_name":"Administrator","entity_id":4,"entity_type":"User","created_at":"2022-05-06T08:51:33.671+00:00","ip_address":"10.10.10.1","add":"user","target_id":4,"target_type":"User","target_details":"project_2_bot","entity_path":"project_2_bot"}
    {"severity":"INFO","time":"2022-05-06T08:51:33.949Z","correlation_id":"01G2C92BN4QC5155K4EPBQKWMM","author_id":4,"author_name":"token","entity_id":4,"entity_type":"User","created_at":"2022-05-06T08:51:33.948+00:00","ip_address":"10.10.10.1","custom_message":"Created personal access token with id 1","target_id":4,"target_type":"User","target_details":"project_2_bot","entity_path":"project_2_bot"}
    {"severity":"INFO","time":"2022-05-06T08:51:33.960Z","correlation_id":"01G2C92BN4QC5155K4EPBQKWMM","author_id":1,"author_name":"Administrator","entity_id":2,"entity_type":"Project","created_at":"2022-05-06T08:51:33.958+00:00","ip_address":"10.10.10.1","target_id":1,"target_type":"PersonalAccessToken","target_details":"token","action":"custom","custom_message":"Created project access token with token_id: 1 with scopes: ["api", "read_api", "read_repository", "write_repository"] and Maintainer access level.","entity_path":"leffss/test"}
    

    删除项目TOKEN

    HTTP远端:

    {"id": 39, "author_id": 1, "entity_id": 2, "entity_type": "Project", "details": {"target_id": 1, "target_type": "PersonalAccessToken", "target_details": "token", "action": "custom", "custom_message": "Revoked project access token with token_id: 1", "ip_address": "10.10.10.1", "entity_path": "leffss/test", "author_name": "Administrator"}, "ip_address": "10.10.10.1", "author_name": "Administrator", "entity_path": "leffss/test", "target_details": "token", "created_at": "2022-05-06T08:52:45.098Z", "target_type": "PersonalAccessToken", "target_id": 1}
    

    本地日志:

    {"severity":"INFO","time":"2022-05-06T08:52:45.101Z","correlation_id":"01G2C94HGZFDPHHQW38B7JC84W","author_id":1,"author_name":"Administrator","entity_id":2,"entity_type":"Project","created_at":"2022-05-06T08:52:45.098+00:00","ip_address":"10.10.10.1","target_id":1,"target_type":"PersonalAccessToken","target_details":"token","action":"custom","custom_message":"Revoked project access token with token_id: 1","entity_path":"leffss/test"}
    {"severity":"INFO","time":"2022-05-06T08:52:46.093Z","correlation_id":"01G2C94HGZFDPHHQW38B7JC84W","author_id":1,"author_name":"Administrator","entity_id":4,"entity_type":"User","created_at":"2022-05-06T08:52:46.091+00:00","ip_address":"10.10.10.1","remove":"user","target_id":4,"target_type":"User","target_details":"project_2_bot","entity_path":"project_2_bot"}
    

    创建组TOKEN

    HTTP远端:

    {"id": 44, "author_id": 1, "entity_id": 4, "entity_type": "Group", "details": {"target_id": 2, "target_type": "PersonalAccessToken", "target_details": "gtoken", "action": "custom", "custom_message": "Created group token with token_id: 2 with scopes: ["api"].", "ip_address": "10.10.10.1", "entity_path": "leffss", "author_name": "Administrator"}, "ip_address": "10.10.10.1", "author_name": "Administrator", "entity_path": "leffss", "target_details": "gtoken", "created_at": "2022-05-06T08:53:39.945Z", "target_type": "PersonalAccessToken", "target_id": 2}
    

    本地日志:

    {"severity":"INFO","time":"2022-05-06T08:53:39.702Z","correlation_id":"01G2C96723XC2XJ6PWYV69PX6V","author_id":6,"author_name":"gtoken","entity_id":6,"entity_type":"User","created_at":"2022-05-06T08:53:39.699+00:00","ip_address":"10.10.10.1","add":"email","target_id":null,"target_type":"Email","target_details":null,"entity_path":"group_4_bot"}
    {"severity":"INFO","time":"2022-05-06T08:53:39.751Z","correlation_id":"01G2C96723XC2XJ6PWYV69PX6V","author_id":1,"author_name":"Administrator","entity_id":6,"entity_type":"User","created_at":"2022-05-06T08:53:39.748+00:00","ip_address":"10.10.10.1","add":"user","target_id":6,"target_type":"User","target_details":"group_4_bot","entity_path":"group_4_bot"}
    {"severity":"INFO","time":"2022-05-06T08:53:39.935Z","correlation_id":"01G2C96723XC2XJ6PWYV69PX6V","author_id":6,"author_name":"gtoken","entity_id":6,"entity_type":"User","created_at":"2022-05-06T08:53:39.867+00:00","ip_address":"10.10.10.1","custom_message":"Created personal access token with id 2","target_id":6,"target_type":"User","target_details":"group_4_bot","entity_path":"group_4_bot"}
    {"severity":"INFO","time":"2022-05-06T08:53:39.947Z","correlation_id":"01G2C96723XC2XJ6PWYV69PX6V","author_id":1,"author_name":"Administrator","entity_id":4,"entity_type":"Group","created_at":"2022-05-06T08:53:39.945+00:00","ip_address":"10.10.10.1","target_id":2,"target_type":"PersonalAccessToken","target_details":"gtoken","action":"custom","custom_message":"Created group token with token_id: 2 with scopes: ["api"].","entity_path":"leffss"}
    

    删除组TOKEN

    HTTP远端:

    {"id": 45, "author_id": 1, "entity_id": 4, "entity_type": "Group", "details": {"target_id": 2, "target_type": "PersonalAccessToken", "target_details": "gtoken", "action": "custom", "custom_message": "Revoked group access token with token_id: 2", "ip_address": "10.10.10.1", "entity_path": "leffss", "author_name": "Administrator"}, "ip_address": "10.10.10.1", "author_name": "Administrator", "entity_path": "leffss", "target_details": "gtoken", "created_at": "2022-05-06T08:54:03.857Z", "target_type": "PersonalAccessToken", "target_id": 2}
    

    本地日志:

    {"severity":"INFO","time":"2022-05-06T08:54:03.860Z","correlation_id":"01G2C96YECRJ00VRADDBRQ0WJW","author_id":1,"author_name":"Administrator","entity_id":4,"entity_type":"Group","created_at":"2022-05-06T08:54:03.857+00:00","ip_address":"10.10.10.1","target_id":2,"target_type":"PersonalAccessToken","target_details":"gtoken","action":"custom","custom_message":"Revoked group access token with token_id: 2","entity_path":"leffss"}
    {"severity":"INFO","time":"2022-05-06T08:54:04.121Z","correlation_id":"01G2C96YECRJ00VRADDBRQ0WJW","author_id":1,"author_name":"Administrator","entity_id":6,"entity_type":"User","created_at":"2022-05-06T08:54:04.119+00:00","ip_address":"10.10.10.1","remove":"user","target_id":6,"target_type":"User","target_details":"group_4_bot","entity_path":"group_4_bot"}
    

    添加项目CI变量

    HTTP远端:

    {"id": 47, "author_id": 1, "entity_id": 2, "entity_type": "Project", "details": {"add": "ci_variable", "author_name": "Administrator", "target_id": "TEST", "target_type": "CiVariable", "target_details": "TEST", "ip_address": "10.10.10.1", "entity_path": "leffss/test"}, "ip_address": "10.10.10.1", "author_name": "Administrator", "entity_path": "leffss/test", "target_details": "TEST", "created_at": "2022-05-06T08:58:08.603Z", "target_type": "CiVariable", "target_id": "TEST"}
    

    本地日志:

    {"severity":"INFO","time":"2022-05-06T08:58:08.605Z","correlation_id":"01G2C9EDFYXZCEDRRH5WRMZAN7","author_id":1,"author_name":"Administrator","entity_id":2,"entity_type":"Project","created_at":"2022-05-06T08:58:08.603+00:00","ip_address":"10.10.10.1","add":"ci_variable","target_id":"TEST","target_type":"CiVariable","target_details":"TEST","entity_path":"leffss/test"}
    

    删除项目CI变量

    HTTP远端:

    {"id": 48, "author_id": 1, "entity_id": 2, "entity_type": "Project", "details": {"remove": "ci_variable", "author_name": "Administrator", "target_id": "TEST", "target_type": "CiVariable", "target_details": "TEST", "ip_address": "10.10.10.1", "entity_path": "leffss/test"}, "ip_address": "10.10.10.1", "author_name": "Administrator", "entity_path": "leffss/test", "target_details": "TEST", "created_at": "2022-05-06T08:59:43.975Z", "target_type": "CiVariable", "target_id": "TEST"}
    

    本地日志:

    {"severity":"INFO","time":"2022-05-06T08:59:43.977Z","correlation_id":"01G2C9HAK105XFD0G8Z3CDBZ65","author_id":1,"author_name":"Administrator","entity_id":2,"entity_type":"Project","created_at":"2022-05-06T08:59:43.975+00:00","ip_address":"10.10.10.1","remove":"ci_variable","target_id":"TEST","target_type":"CiVariable","target_details":"TEST","entity_path":"leffss/test"}
    

    改变组可见性

    HTTP远端:

    {"id": 49, "author_id": 1, "entity_id": 4, "entity_type": "Group", "details": {"change": "visibility", "from": "Private", "to": "Internal", "author_name": "Administrator", "target_id": 4, "target_type": "Group", "target_details": "leffss", "ip_address": "10.10.10.1", "entity_path": "leffss"}, "ip_address": "10.10.10.1", "author_name": "Administrator", "entity_path": "leffss", "target_details": "leffss", "created_at": "2022-05-07T01:15:29.785Z", "target_type": "Group", "target_id": 4}
    

    本地日志:

    {"severity":"INFO","time":"2022-05-07T01:15:29.787Z","correlation_id":"01G2E1C0FSQ9C5VZCHCSQT2MWR","author_id":1,"author_name":"Administrator","entity_id":4,"entity_type":"Group","created_at":"2022-05-07T01:15:29.785+00:00","ip_address":"10.10.10.1","change":"visibility","from":"Private","to":"Internal","target_id":4,"target_type":"Group","target_details":"leffss","entity_path":"leffss"}
    

    改变项目可见性

    HTTP远端:

    {"id": 50, "author_id": 1, "entity_id": 2, "entity_type": "Project", "details": {"change": "visibility", "from": "Private", "to": "Internal", "author_name": "Administrator", "target_id": 2, "target_type": "Project", "target_details": "leffss/test", "ip_address": "10.10.10.1", "entity_path": "leffss/test"}, "ip_address": "10.10.10.1", "author_name": "Administrator", "entity_path": "leffss/test", "target_details": "leffss/test", "created_at": "2022-05-07T01:16:55.029Z", "target_type": "Project", "target_id": 2}
    {"id": 51, "author_id": 1, "entity_id": 2, "entity_type": "Project", "details": {"change": "metrics_dashboard_access_level", "from": "Internal", "to": "Public", "author_name": "Administrator", "target_id": 2, "target_type": "ProjectFeature", "target_details": "leffss/test", "ip_address": "10.10.10.1", "entity_path": "leffss/test"}, "ip_address": "10.10.10.1", "author_name": "Administrator", "entity_path": "leffss/test", "target_details": "leffss/test", "created_at": "2022-05-07T01:16:55.061Z", "target_type": "ProjectFeature", "target_id": 2}
    

    本地日志:

    {"severity":"INFO","time":"2022-05-07T01:16:55.032Z","correlation_id":"01G2E1EK9DGXV78HTC7JTKDKJQ","author_id":1,"author_name":"Administrator","entity_id":2,"entity_type":"Project","created_at":"2022-05-07T01:16:55.029+00:00","ip_address":"10.10.10.1","change":"visibility","from":"Private","to":"Internal","target_id":2,"target_type":"Project","target_details":"leffss/test","entity_path":"leffss/test"}
    {"severity":"INFO","time":"2022-05-07T01:16:55.064Z","correlation_id":"01G2E1EK9DGXV78HTC7JTKDKJQ","author_id":1,"author_name":"Administrator","entity_id":2,"entity_type":"Project","created_at":"2022-05-07T01:16:55.061+00:00","ip_address":"10.10.10.1","change":"metrics_dashboard_access_level","from":"Internal","to":"Public","target_id":2,"target_type":"ProjectFeature","target_details":"leffss/test","entity_path":"leffss/test"}
    

    添加组成员到项目

    HTTP远端:

    本地日志:

    {"severity":"INFO","time":"2022-05-07T01:21:14.991Z","correlation_id":"01G2E1PHD31EKFH9QHQ6WYZSWZ","author_id":1,"author_name":"Administrator","entity_id":12,"entity_type":"Group","created_at":"2022-05-07T01:21:14.963+00:00","ip_address":"10.10.10.1","add":"project_access","as":"Reporter","target_id":2,"target_type":"Project","target_details":"leffss/test","entity_path":"leffss2"}
    

    从项目删除组成员

    HTTP远端:

    本地日志:

    {"severity":"INFO","time":"2022-05-07T01:22:12.404Z","correlation_id":"01G2E1R9HGJTN0D5ZVFEM3VF54","author_id":1,"author_name":"Administrator","entity_id":12,"entity_type":"Group","created_at":"2022-05-07T01:22:12.376+00:00","ip_address":"10.10.10.1","remove":"project_access","target_id":2,"target_type":"Project","target_details":"leffss/test","entity_path":"leffss2"}
    

    添加成员到项目

    HTTP远端:

    {"id": 55, "author_id": 1, "entity_id": 2, "entity_type": "Project", "details": {"add": "user_access", "as": "Reporter", "author_name": "Administrator", "target_id": 3, "member_id": 11, "target_type": "User", "target_details": "test2", "ip_address": "10.10.10.1", "entity_path": "leffss/test"}, "ip_address": "10.10.10.1", "author_name": "Administrator", "entity_path": "leffss/test", "target_details": "test2", "created_at": "2022-05-07T01:23:05.274Z", "target_type": "User", "target_id": 3}
    

    本地日志:

    {"severity":"INFO","time":"2022-05-07T01:23:05.276Z","correlation_id":"01G2E1SX4JN2ZYM0NBT0CSG2N7","author_id":1,"author_name":"Administrator","entity_id":2,"entity_type":"Project","created_at":"2022-05-07T01:23:05.274+00:00","ip_address":"10.10.10.1","add":"user_access","as":"Reporter","target_id":3,"member_id":11,"target_type":"User","target_details":"test2","entity_path":"leffss/test"}
    

    改变项目成员角色

    HTTP远端:

    {"id": 56, "author_id": 1, "entity_id": 2, "entity_type": "Project", "details": {"change": "access_level", "from": "Reporter", "to": "Developer", "expiry_from": null, "expiry_to": null, "author_name": "Administrator", "target_id": 3, "member_id": 11, "target_type": "User", "target_details": "test2", "ip_address": "10.10.10.1", "entity_path": "leffss/test"}, "ip_address": "10.10.10.1", "author_name": "Administrator", "entity_path": "leffss/test", "target_details": "test2", "created_at": "2022-05-07T01:24:27.145Z", "target_type": "User", "target_id": 3}
    

    本地日志:

    {"severity":"INFO","time":"2022-05-07T01:24:27.148Z","correlation_id":"01G2E1WD7F4RAN4RJDZSRWXQCP","author_id":1,"author_name":"Administrator","entity_id":2,"entity_type":"Project","created_at":"2022-05-07T01:24:27.145+00:00","ip_address":"10.10.10.1","change":"access_level","from":"Reporter","to":"Developer","expiry_from":null,"expiry_to":null,"target_id":3,"member_id":11,"target_type":"User","target_details":"test2","entity_path":"leffss/test"}
    

    从项目删除成员

    HTTP远端:

    {"id": 57, "author_id": 1, "entity_id": 2, "entity_type": "Project", "details": {"remove": "user_access", "author_name": "Administrator", "target_id": 3, "member_id": 11, "target_type": "User", "target_details": "test2", "ip_address": "10.10.10.1", "entity_path": "leffss/test"}, "ip_address": "10.10.10.1", "author_name": "Administrator", "entity_path": "leffss/test", "target_details": "test2", "created_at": "2022-05-07T01:25:17.238Z", "target_type": "User", "target_id": 3}
    

    本地日志:

    {"severity":"INFO","time":"2022-05-07T01:25:17.270Z","correlation_id":"01G2E1XXSGK0ZTJ1P50M14QWPY","author_id":1,"author_name":"Administrator","entity_id":2,"entity_type":"Project","created_at":"2022-05-07T01:25:17.238+00:00","ip_address":"10.10.10.1","remove":"user_access","target_id":3,"member_id":11,"target_type":"User","target_details":"test2","entity_path":"leffss/test"}
    

    添加成员到组

    HTTP远端:

    {"id": 58, "author_id": 1, "entity_id": 4, "entity_type": "Group", "details": {"add": "user_access", "as": "Maintainer", "author_name": "Administrator", "target_id": 2, "member_id": 12, "target_type": "User", "target_details": "test1", "ip_address": "10.10.10.1", "entity_path": "leffss"}, "ip_address": "10.10.10.1", "author_name": "Administrator", "entity_path": "leffss", "target_details": "test1", "created_at": "2022-05-07T01:29:19.846Z", "target_type": "User", "target_id": 2}
    

    本地日志:

    {"severity":"INFO","time":"2022-05-07T01:29:19.918Z","correlation_id":"01G2E25AXKQXYAXD7AWZ5V3014","author_id":1,"author_name":"Administrator","entity_id":4,"entity_type":"Group","created_at":"2022-05-07T01:29:19.914+00:00","ip_address":"10.10.10.1","add":"user_access","as":"Maintainer","target_id":3,"member_id":13,"target_type":"User","target_details":"test2","entity_path":"leffss"}
    

    改变组成员角色

    HTTP远端:

    {"id": 60, "author_id": 1, "entity_id": 4, "entity_type": "Group", "details": {"change": "access_level", "from": "Maintainer", "to": "Developer", "expiry_from": null, "expiry_to": null, "author_name": "Administrator", "target_id": 2, "member_id": 12, "target_type": "User", "target_details": "test1", "ip_address": "10.10.10.1", "entity_path": "leffss"}, "ip_address": "10.10.10.1", "author_name": "Administrator", "entity_path": "leffss", "target_details": "test1", "created_at": "2022-05-07T01:30:11.290Z", "target_type": "User", "target_id": 2}
    

    本地日志:

    {"severity":"INFO","time":"2022-05-07T01:30:11.293Z","correlation_id":"01G2E26X42P5SCRH807JQPVKN8","author_id":1,"author_name":"Administrator","entity_id":4,"entity_type":"Group","created_at":"2022-05-07T01:30:11.290+00:00","ip_address":"10.10.10.1","change":"access_level","from":"Maintainer","to":"Developer","expiry_from":null,"expiry_to":null,"target_id":2,"member_id":12,"target_type":"User","target_details":"test1","entity_path":"leffss"}
    

    从组删除成员

    HTTP远端:

    {"id": 61, "author_id": 1, "entity_id": 4, "entity_type": "Group", "details": {"remove": "user_access", "author_name": "Administrator", "target_id": 2, "member_id": 12, "target_type": "User", "target_details": "test1", "ip_address": "10.10.10.1", "entity_path": "leffss"}, "ip_address": "10.10.10.1", "author_name": "Administrator", "entity_path": "leffss", "target_details": "test1", "created_at": "2022-05-07T01:30:54.689Z", "target_type": "User", "target_id": 2}
    

    本地日志:

    {"severity":"INFO","time":"2022-05-07T01:30:54.692Z","correlation_id":"01G2E287D9VBVT83NXVBK9S161","author_id":1,"author_name":"Administrator","entity_id":4,"entity_type":"Group","created_at":"2022-05-07T01:30:54.689+00:00","ip_address":"10.10.10.1","remove":"user_access","target_id":2,"member_id":12,"target_type":"User","target_details":"test1","entity_path":"leffss"}
    
  • 相关阅读:
    AB测试原理及样本量计算的Python实现
    数据分析-A/B test
    数据分析-分类分析
    数据分析-漏斗模型(AARRR模型)
    置信区间的I型错误和II型错误
    tableau 计算字段
    tableau数据分层、数据组、数据集
    tableau 地图
    tableau 进阶
    tableau 基础
  • 原文地址:https://www.cnblogs.com/leffss/p/16476374.html
Copyright © 2020-2023  润新知