Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication helper interface is incorrect #486

Open
jklukas opened this issue Jan 29, 2025 · 0 comments
Open

Authentication helper interface is incorrect #486

jklukas opened this issue Jan 29, 2025 · 0 comments

Comments

@jklukas
Copy link
Contributor

jklukas commented Jan 29, 2025

@ianoc added support for authentication helper scripts (started in #343) but we don't document the intended interface for these scripts.

I assume that we are intending to follow the docker credential helper interface as described in https://github.com/docker/docker-credential-helpers?tab=readme-ov-file#development:

A credential helper can be any program that can read values from the standard input. We use the first argument in the command line to differentiate the kind of command to execute

The code here, however, is currently as follows:

.write_all(format!("GET {}\n", &auth_fail.service).as_bytes())

There are two separate problems here:

  • The current code pipes in "GET" as the first element on stdin, but the credential helper interface expects this as a command line argument
  • The current code pipes in "service" as the second element on stdin, which is taken from the previously seen auth challenge, which could be any arbitrary string as decided by the registry; per the docker credential helper spec, this is expected to be the server url

Should we update this to follow the broader credential helper spec, and document that as the interface here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant