Skip to content

session: use anonymous registry auth when sessions are unset#6744

Merged
tonistiigi merged 1 commit intomoby:masterfrom
crazy-max:session-empty
May 6, 2026
Merged

session: use anonymous registry auth when sessions are unset#6744
tonistiigi merged 1 commit intomoby:masterfrom
crazy-max:session-empty

Conversation

@crazy-max
Copy link
Copy Markdown
Member

relates to moby/moby#48112 (comment)

Docker API builds can call BuildKit without a session, and public registry pulls should not fail before BuildKit tries anonymous auth. Basic auth still requires credentials, so this does not make private registry authentication silently anonymous.

Now registry Bearer authentication continue with an anonymous token request when no BuildKit client session is active.

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
@crazy-max crazy-max requested a review from tonistiigi May 6, 2026 12:18
@crazy-max crazy-max added this to the v0.30.0 milestone May 6, 2026
@crazy-max crazy-max marked this pull request as ready for review May 6, 2026 12:19
Copy link
Copy Markdown
Member

@tonistiigi tonistiigi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return errors.Errorf("no active sessions")

errors.WithStack() for previous compatibility

@tonistiigi tonistiigi merged commit 3c97aaf into moby:master May 6, 2026
192 checks passed
@crazy-max crazy-max deleted the session-empty branch May 6, 2026 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants