Why do I see [DENIED LOGIN] in access.log when performing docker login?

Maayan Amrani
2019-07-01 07:06


What is the meaning of the following entry in access.log:
<TimeStamp> [DENIED LOGIN] for client : NA / <IP>


When executing "docker login" command, Docker client first performs a non-authenticated request and then receives a 200 response when getting the token for the configured user:
User-added image
Respectively, the request.log will display the same entries (notice the 401 response for the first request and 200 for the second request): 
User-added image

We can simulate the request by simply running the below cURL command:

$ curl -u<USERNAME> http://<ARTIFACTORY_URL>:<PORT>/artifactory/api/docker/docker/v2/token