Skip to content

ci: Log in to Docker Hub with OIDC instead of a stored token - #214

Merged
khvn26 merged 2 commits into
mainfrom
kimgustyr/eng-1168-docker-hub-oidc
Dec 3, 2026
Merged

khvn26 merged 2 commits into
mainfrom
kimgustyr/eng-1168-docker-hub-oidc

Conversation

@khvn26

@khvn26 khvn26 commented Dec 3, 2026 •

Copy link
Copy Markdown
Member

Logs in to Docker Hub with a short-lived OIDC token instead of a stored access token (ENG-1168).

  • The publishing job runs in the dockerhub environment, whose deployment rules allow only v* tags (plus main where the workflow can be run manually).
  • docker/login-action v4.8.0 exchanges the job's GitHub OIDC token through our Docker OIDC connection (vars.DOCKERHUB_OIDC_CONNECTIONID). The connection trusts repo:Flagsmith/*:environment:dockerhub to push only to our listed images.
  • The publishing job has id-token: write.

The old Docker Hub secrets stay until a release has published through OIDC; they're deleted afterwards. See Publishing Docker images.

@khvn26
khvn26 requested a review from a team as a code owner December 3, 2026 17:03
@khvn26
khvn26 requested review from emyller and removed request for a team December 3, 2026 17:03

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Requires human review: Switches Docker Hub CI login from a stored token to OIDC, adding id-token: write and updating docker/login-action. The authentication change and its OIDC connection restrictions need human security review.

Turn on auto-fix | Re-trigger cubic

The Docker OIDC connection trusts repo:Flagsmith/*:environment:dockerhub, and the environment's deployment rules limit publishing to release tags (and main where the workflow can be run manually).

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

0 issues found across 1 file (changes from recent commits).

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Requires human review: Switches Docker Hub publishing login from a stored token to OIDC, adding id-token: write and an environment. The OIDC connection's push restrictions and environment deployment rules are external config that must be human-verified before enabling.

Turn on auto-fix | Re-trigger cubic

@khvn26
khvn26 merged commit 622cdd8 into main Dec 3, 2026
4 checks passed
@khvn26
khvn26 deleted the kimgustyr/eng-1168-docker-hub-oidc branch December 3, 2026 18:11
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

Successfully merging this pull request may close these issues.

2 participants