Repository navigation
Comparing changes
Open a pull request
base repository: docker/cli
base: master
head repository: docker/cli
compare: secrets-engine-desktop-auth
- 8 commits
- 86 files changed
- 1 contributor
Commits on Oct 22, 2026
-
vendor: github.com/docker/secrets-engine/client v0.2.2
Add the Docker secrets engine client, used to read the Docker Desktop session for Docker Hub. It brings in github.com/docker/secrets-engine/x v0.8.5 and connectrpc.com/connect v1.19.1. The client module requires go1.26.10, which raises the go directive in vendor.mod from 1.26.0. Signed-off-by: Alano Terblanche <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 0c2d0f7 - Browse repository at this point
Copy the full SHA 0c2d0f7View commit details -
cli/command: use the Docker Desktop session for Docker Hub
When Docker Desktop is running and signed in, read the Docker Hub session from the Docker Desktop secrets engine, and send it as the registry credentials for Docker Hub (docker.io) and Docker Hardened Images (dhi.io) when pulling or pushing images through the daemon: docker pull, push, run, create, plugin install and push, service create and update, and stack deploy. Credentials in DOCKER_AUTH_CONFIG take precedence for the registries they cover. Without a usable Docker Desktop session (no socket, nothing listening, signed out, or no answer within 5 seconds), the CLI uses its credential store, credential helpers, and configuration file as before. docker login and stored credentials are not changed. Signed-off-by: Alano Terblanche <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a46376f - Browse repository at this point
Copy the full SHA a46376fView commit details -
internal/secretsengine: add unit tests
Cover which registries use the Docker Desktop session, keeping the production and staging sessions apart, caching the session until it expires, the retry interval after a failed lookup, and Disable. Signed-off-by: Alano Terblanche <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c4e3171 - Browse repository at this point
Copy the full SHA c4e3171View commit details -
internal/secretsengine: test and benchmark against a secrets engine s…
…ocket Run lookups against a fake secrets engine on a unix socket: signed in, signed out, no socket, a socket with nothing listening, and an engine that never answers. The benchmarks cover the same cases. BenchmarkExternalEngine runs against the engine at SECRETSENGINE_BENCH_SOCKET when it is set. Signed-off-by: Alano Terblanche <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f59d490 - Browse repository at this point
Copy the full SHA f59d490View commit details -
internal/test: keep FakeCli from contacting Docker Desktop
Tests that use FakeCli pull, push, and create containers through RetrieveAuthTokenFromImage. Disable the Docker Desktop lookup, so that they never reach the Docker Desktop of the machine they run on. Signed-off-by: Alano Terblanche <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 1afa7ac - Browse repository at this point
Copy the full SHA 1afa7acView commit details -
cli/command: test credential precedence with Docker Desktop
Check that the Docker Desktop session is used for Docker Hub and dhi.io, that other registries use the configuration file, and that DOCKER_AUTH_CONFIG takes precedence over Docker Desktop. TestRetrieveAuthTokenFromImage disables the Docker Desktop lookup. Signed-off-by: Alano Terblanche <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ec9ac08 - Browse repository at this point
Copy the full SHA ec9ac08View commit details
Commits on Oct 23, 2026
-
internal/secretsengine: unexport what only tests use
Provider, HubClient, and New were only used inside the package and by FakeCli. FakeCli now returns its configuration file as the auth provider, which is what the signed-out Docker Hub stub fell back to. NewDesktop returns an AuthProvider. Remove DockerCli.RegistryAuthProvider: EncodedRegistryAuth already falls back to RetrieveAuthTokenFromImage, which uses the Docker Desktop session, so the method only added to the public API. Signed-off-by: Alano Terblanche <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 59e40e6 - Browse repository at this point
Copy the full SHA 59e40e6View commit details
Commits on Oct 26, 2026
-
cli/command: look up registry credentials through internal/registryauth
RetrieveAuthTokenFromImage is exported and imported by other projects, so it keeps reading only the configuration file. The commands that pull and push call registryauth.EncodedAuth instead, which asks DOCKER_AUTH_CONFIG, then the Docker Desktop session, then the configuration file. This drops command.EncodedRegistryAuth from the public API. Each DockerCli owns its Docker Desktop sessions through RegistryAuthProvider, created on first use, instead of package-level sessions shared by every caller. A command.Cli without RegistryAuthProvider uses only its configuration file. The fallback reads the current configuration file, since Initialize replaces it. Remove the session fields and the constructors that only tests used, move the staging and dhi.io hostnames into internal/secretsengine, and use testing/synctest instead of a fake clock, so that the tests run in parallel. Only the DOCKER_AUTH_CONFIG test still sets the environment. Signed-off-by: Alano Terblanche <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a195d24 - Browse repository at this point
Copy the full SHA a195d24View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff master...secrets-engine-desktop-auth