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

The auth endpoint for Docker returns the wrong JSON configuration when using the API key

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.9.0
    • Component/s: Docker
    • Labels:
      None

      Description

      The auth endpoint for Docker returns the wrong JSON configuration when using the API key. This results in not being able to properly authenticate v1 repositories.

      NOTE: IT IS possible to use the API key for docker authentication for V1. Use the workaround described below.

      To reproduce:

      1. Create a Docker v1 repository (and the reverse proxy to access it)
      2. Create an API key for a user
      3. Use the username/API key on the URL /v1/auth (use the reverse proxy's address)
      4. Copy the JSON into ~/.docker/config.json
      5. Try to push an image and observe the failure to authenticate.

      Workaround:

      You can create the correct auth key using this formula:
      username:api-key -> Base64Encode

      A site like https://www.base64encode.org/ will produce the correct output.

        Attachments

          Activity

            People

            • Assignee:
              danf Dan Feldman (Inactive)
              Reporter:
              arturoa Arturo Aparicio
            • Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: