Skip to content

[Enhancement] Add support authenticate with identityToken when use CredentialProvider #651

@ptantanis

Description

@ptantanis

Hi,

Docker API has 2 ways to authenticate which is user/pass and identity token.

Docker auth document: https://docs.docker.com/engine/api/v1.43/#section/Authentication

When docker cli store identity token in secret store, it will store usename as <token> and store identity token in secret. Currently testcontainer use these value directly, which cause authentication error because of wrong username.

why
This use when pull image from private registry such as azure container registry and github registry

Solution
Check if username is <token>, then authenticate with identity token instead of user/pass.
There is already this feature in testcontainer-dotnet. Implementation in testcontainer-dotnet

I did some POC in this PR ptantanis#1

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions