Using a webhook, our Docker Registry 2.7.1 is configured to send Portus 2.4.3 notifications when an image is pushed to the registry.
This is, for instance, the notification event received by Portus, when an image is pushed to the registry using the official Docker 19.03.4 Windows client. In this case, everything works as expected.
Handling 'push' event:
{
"id": "e4f8ba20-c7e1-4916-919c-a90803854ccc",
"timestamp": "2020-02-04T11:00:56.708989056Z",
"action": "push",
"target": {
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"size": 1785,
"digest": "sha256:49433a8241d5e44ca711191b978055f1d2ab5ccc862acf7c4d8d73c274342e91",
"length": 1785,
"repository": "testjib/hello-world",
"url": "https://registry/v2/testjib/hello-world/manifests/sha256:49433a8241d5e44ca711191b978055f1d2ab5ccc862acf7c4d8d73c274342e91",
"tag": "latest"
},
"request": {
"id": "b1579a99-7f2b-454a-aeb3-f1bf611b320f",
"addr": "10.255.0.2",
"host": "registry",
"method": "PUT",
"useragent": "docker/19.03.4 go/go1.12.10 git-commit/9013bf5 kernel/4.9.184-linuxkit os/linux arch/amd64 UpstreamClient(Docker-Client/19.03.4 \\(windows\\))"
},
"actor": {
"name": "testjib"
},
"source": {
"addr": "0564da668715:5000",
"instanceID": "4396b935-e643-4384-8526-2e85839e5427"
}
}
But when the image is pushed using the GoogleContainerTools Jib client, the notification message differs by an empty “actor” field :
{
"id": "412c19bc-fe91-4e81-a735-b2ac76f97bf8",
"timestamp": "2020-02-04T10:46:20.116168774Z",
"action": "push",
"target": {
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"size": 1403,
"digest": "sha256:7d13e143448e78c7f81c75aeda012513b7f898bfb5f8cc2a6541a13c5d831a16",
"length": 1403,
"repository": "testjib/hello-world",
"url": "https://registry/v2/testjib/hello-world/manifests/sha256:7d13e143448e78c7f81c75aeda012513b7f898bfb5f8cc2a6541a13c5d831a16",
"tag": "latest"
},
"request": {
"id": "aba2e75f-68fd-4f69-ba85-8a11cd10f828",
"addr": "10.255.0.2",
"host": "registry",
"method": "PUT",
"useragent": "jib 2.0.0 jib-maven-plugin Google-HTTP-Java-Client/1.34.0 (gzip)"
},
"actor": {
},
"source": {
"addr": "0564da668715:5000",
"instanceID": "4396b935-e643-4384-8526-2e85839e5427"
}
}
This causes an error in Portus (Cannot find user) and was reported as Portus issue 2243.
For now, I cannot figure which of the three components (client/Registry/Portus) is faulty. Is the “actor” field allowed to be empty in a notification event ? Why is the “actor” field empty only when using the Jib client ?
The problem was also discussed in Jib issue 1997