Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-22867

Incorrect error message from docker client while pulling docker images via docker virtual repository with anonymous user.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 6.20.0
    • Fix Version/s: None
    • Component/s: Docker
    • Labels:
    • Environment:

      Docker client version:  19.03.2, build 6a30dfc

    • Severity:
      Medium
    • Requirement Status:

      UNCOVERED

      Description

      Description: When pulling docker images from a virtual repository with an anonymous user the docker client throws an error message saying that the manifest for the image is not found instead of an unauthorized message. However, If we try pulling the same image via local repository then a correct error message (unauthorized) will be displayed. 

      Steps to reproduce:
      1. Enable Anonymous access for the Artifactory and the Anonymous user does not have any permission to the docker repository.
      2. Create a docker local repository.
      3. Create a docker virtual repository and add the above local repository in it.
      4. Push a Docker image to the docker local repository via a docker virtual repository with the privileged user.
      5. Perform docker logout.
      6. Try to pull the image from the Anonymous user via the local repository and could see the below correct error message.

      ➜  ~ docker pull Artifactory.info:12345/docker-local-test/hello-world
       Using default tag: latest Error response from daemon: unauthorized: The client does not have permission for manifest

      Request log

      20200709072502|41|REQUEST|XXXXXXX|anonymous|GET|/api/docker/docker-local-test/v2/hello-world/manifests/latest|HTTP/1.1|403|0

      7. Try to pull the image from the Anonymous user via virtual repository and could see the below Incorrect error message.

      ➜  ~ docker pull Artifactory.info:12345/docker-virtual/hello-world
       Using default tag: latest Error response from daemon: manifest for   Artifactory.info:12345/docker-virtual/hello-world:latest not found: manifest unknown: The named manifest is not known to the registry.

      Request log : 

      20200709072429|67|REQUEST|XXXXXXXXX|anonymous|GET|/api/docker/docker-virtual/v2/hello-world/manifests/latest|HTTP/1.1|404|0
      

      Expected result: Even when we try to pull the image via a docker virtual repository using an anonymous user we should get an unauthorized error message.

      Impact: Currently the error message from the virtual repo is confusing. If the end-users do not know what is local/virtual repo in the Artifactory and It will cost them a lot of time to troubleshoot the issue. Artifactory should tell the docker client that it needs authentication in that case.

        Attachments

          Forms

            Activity

                People

                Assignee:
                Unassigned
                Reporter:
                jayanths Jayanth Suresh
                Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:

                    PagerDuty