Skip to content

Implement token authentication (Docker Registry HTTP API V2) #2442

Description

@KhalefAhmed

The docker-java client does not yet support the token authentication flow defined by the official specification at https://distribution.github.io/distribution/spec/auth/token/

Authentication Flow (text):

  1. Client sends initial request to registry without any authentication header.
  2. Registry responds with 401 Unauthorized and a WWW-Authenticate header specifying the token endpoint.
  3. Client issues a GET request to the token endpoint (/token) with service and scope query parameters.
  4. Auth server returns JSON containing token, expires_in, and issued_at.
  5. Client retries the registry request, including Authorization: Bearer .
  6. Registry responds with 200 OK and the requested payload.

I would be willing to contribute this improvement with guidance from the docker-java community

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions