Repository navigation
Conversation
secrets-engine/client v0.2.1 requires go >= 1.27.2. It rejects Docker Hub access tokens that are not JWTs; GetDefaultSession returns ErrInvalidAccessToken, which wraps ErrNoSession. secrets-engine/x moves to v0.8.4 with it. Signed-off-by: Alano Terblanche <18033717+Benehiko@users.noreply.github.com>
Docker Desktop's docker-auth store fills in the access-token claims, expiry included, from the JWT when it saves a Hub credential, and when it reads one from the legacy credential helper. secrets-engine/client v0.2.1 rejects tokens that are not JWTs. So compose no longer needs to parse exp out of the token itself. A session without an expiry claim is still reused for sessionTTL. Signed-off-by: Alano Terblanche <18033717+Benehiko@users.noreply.github.com>
docker-agent
left a comment
Contributor
There was a problem hiding this comment.
Assessment: 🟢 APPROVE
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Member
Author
|
Added a second commit that removes jwtExpiry: compose no longer parses exp out of the access token itself. Docker Desktop's docker-auth store already fills in the claims, expiry included, from the JWT. It does this when saving a Hub credential (enrichHubCredential in pinata's internal/store) and when reading one from the legacy credential helper (mergeTokenPair in docker-auth). Together with the JWT check in client v0.2.1, Claims.ExpiresAt is the only expiry source compose needs. A session without an expiry claim is still reused for sessionTTL. (Comment posted by an AI agent on the author's behalf.) |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What I did
client v0.2.1 checks that stored Docker Hub access tokens are JWTs. GetDefaultSession returns ErrInvalidAccessToken for a malformed token. That error wraps ErrNoSession, so isSessionUnavailable in internal/registry/desktop.go already falls back to the Docker CLI credentials.
Open question
Compose may need to stay on Go 1.26.x for a while. If so, this should wait until secrets-engine releases a client and x that support Go 1.26 again; the v0.2.1 bump of the go directive looks like a routine toolchain update rather than something the code needs. This PR is a draft until that's decided.
Testing
AI disclosure
This PR was prepared by an AI coding agent (alki, running Claude) on the author's behalf. AI_AGENT_DISCLOSURE.md is included and must be removed after human review, before merge.