Skip to content

feat(notifications): add user type to actor in event

Jaime Martinez requested to merge 898-add-user-type into master

This MR adds a user_type to the actor field to the notification event.

{
   "events": [
      {
         "id": "a582a0f3-e620-43e6-8e98-ff850fc9d984",
         "timestamp": "2023-01-25T14:45:54.17327+11:00",
         "action": "push",
         "target": {
            "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
            "size": 528,
            "digest": "sha256:af06af3514c44a964d3b905b498cf6493db8f1cde7c10e078213a89c87308ba0",
            "length": 528,
            "repository": "root/test",
            "url": "http://registry.test:5000/v2/root/test/manifests/sha256:af06af3514c44a964d3b905b498cf6493db8f1cde7c10e078213a89c87308ba0",
            "tag": "more-auth"
         },
         "request": {
            "id": "8ef8d69b-f957-45ab-ba2c-9153291f47b6",
            "addr": "172.16.123.1:56969",
            "host": "registry.test:5000",
            "method": "PUT",
            "useragent": "docker/20.10.18 go/go1.18.6 git-commit/e42327a6d3c55ceda3bd5475be7aae6036d02db3 kernel/5.15.68-0-virt os/linux arch/arm64 UpstreamClient(Docker-Client/20.10.22 \\(darwin\\))"
         },
         "actor": {
            "name": "root",
            "user_type": "personal_access_token"
         },
         "source": {
            "addr": "Jaimes-MBP:5000",
            "instanceID": "45681f21-a006-42f2-ab7c-4cc37d8906b4"
         }
      }
   ]

Related to #898 (closed)

Edited by Jaime Martinez

Merge request reports