Skip to content

fix: Fetch the CloudQuery registry token in-process so Docker 29 pulls authenticate - #724

Merged
kodiakhq[bot] merged 6 commits into
mainfrom
claude/docker29-registry-auth
Nov 13, 2026
Merged

kodiakhq[bot] merged 6 commits into
mainfrom
claude/docker29-registry-auth

Conversation

@erezrokah

@erezrokah erezrokah commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

The CloudQuery registry token is now fetched in-process with the account parameter and the X-Meta-User-Team-Name and X-Meta-Plugin-Version headers and handed to the daemon as a bearer token, because Docker 29's containerd pull path sends neither, which broke TestManagedPluginCloudQueryDocker when ubuntu-latest moved to ubuntu-26.04 (this predates #723).

@erezrokah
erezrokah marked this pull request as ready for review November 13, 2026 13:26
@erezrokah
erezrokah requested a review from a team as a code owner November 13, 2026 13:26
@erezrokah
erezrokah requested a review from alonnoga November 13, 2026 13:26
@erezrokah

Copy link
Copy Markdown
Member Author

Experiment in #725 (main's code, only ubuntu-latest -> ubuntu-24.04) just passed: ok github.com/cloudquery/plugin-pb-go/managedplugin 66.952s, so the image pull authenticated with the same CI secrets a few minutes ago.

That settles two things: the CI API key is valid, and the failure is caused by the ubuntu-26.04 (Docker 29) runner image.

It also shows the in-process token request here is still missing something Docker 28 sends. Captured from Docker 28.5.2 against a fake registry:

GET /token?account=managedplugin&scope=repository%3Acloudquery%2Fsource-typeform%3Apull&service=fake-service

The account parameter was missing from this branch's request, which is the likely reason the auth endpoint answered 400 with a valid key; it is added in 2cbb472 and CI is re-running.

@erezrokah erezrokah added the automerge Add to automerge PRs once requirements are met label Nov 13, 2026
@erezrokah

Copy link
Copy Markdown
Member Author

Verified against the real registry with the CI credentials on both daemons in run 43436172856:

  • unitests (ubuntu-24.04) (Docker 28.0.4): ok github.com/cloudquery/plugin-pb-go/managedplugin 68.987s
  • unitests (ubuntu-latest) / ubuntu-26.04 (Docker 29.4.2): ok ... 69.184s in run 43435365484 for the same code

ubuntu-24.04 is kept in the matrix so both daemon versions stay covered.

@dcelasun dcelasun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@erezrokah LGTM, some nits:

  • The token fetch now runs in the CLI process, and a failure stops the pull on every Docker version. Setups where only the daemon can reach docker.cloudquery.io (remote DOCKER_HOST, a proxy or CA set only on the daemon) would break. Consider a fallback to the old username/password auth when the fetch fails.
  • Require an https realm before we send the API key to it as Basic auth (registry_token.go).
  • noRedirectHTTPClient has no timeout, so a hung registry blocks the pull when ctx has no deadline.
  • Not new, but strings.HasPrefix(imageName, "docker.cloudquery.io") also matches docker.cloudquery.io.example.com. namedRef is parsed now, so compare reference.Domain(namedRef) instead.

@kodiakhq
kodiakhq Bot merged commit 4ecdf0a into main Nov 13, 2026
10 checks passed
@kodiakhq
kodiakhq Bot deleted the claude/docker29-registry-auth branch November 13, 2026 16:48
kodiakhq Bot pushed a commit that referenced this pull request Nov 13, 2026
🤖 I have created a release *beep* *boop*
---


## [1.29.1](v1.29.0...v1.29.1) (2026-11-13)


### Bug Fixes

* **deps:** Update module google.golang.org/grpc to v1.85.0 ([#721](#721)) ([9d77502](9d77502))
* Fetch the CloudQuery registry token in-process so Docker 29 pulls authenticate ([#724](#724)) ([4ecdf0a](4ecdf0a))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge Add to automerge PRs once requirements are met

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants