Skip to content

feat: fetch GitHub App credentials from AWS Secrets Manager via OIDC#119

Merged
derekmisler merged 1 commit intodocker:mainfrom
derekmisler:feat/oidc-secrets-manager
Apr 14, 2026
Merged

feat: fetch GitHub App credentials from AWS Secrets Manager via OIDC#119
derekmisler merged 1 commit intodocker:mainfrom
derekmisler:feat/oidc-secrets-manager

Conversation

@derekmisler
Copy link
Copy Markdown
Contributor

@derekmisler derekmisler commented Mar 26, 2026

Related Issues

Closes: https://github.com/docker/gordon/issues/330
Depends on: https://github.com/docker/infra-terraform/pull/11303

Summary

Replaces the three org-level GitHub secrets (CAGENT_REVIEWER_APP_ID, CAGENT_REVIEWER_APP_PRIVATE_KEY, CAGENT_ORG_MEMBERSHIP_TOKEN) with OIDC-based lookups from AWS Secrets Manager across all 5 reusable workflows, plus release.yml. Consumer repos no longer need those secrets configured — the only change they need is adding id-token: write to their job permissions.

This eliminates secret sprawl across ~50 consumer repos: credentials now live in one place (docker-agent-action/github-app in Secrets Manager), so rotations happen once and propagate instantly.

Infrastructure Status ✅

The companion Terraform PR (docker/infra-terraform#11303) has been applied:

  • IAM role: arn:aws:iam::710015040892:role/docker-agent-action-20260409141318957000000001
  • docker-agent-action/github-app secret populated (app_id, private_key, org_membership_token)
  • docker-agent-action/ai-api-keys secret populated (anthropic_api_key, openai_api_key)

Verified it works by testing it on dagent:

Screenshot 2026-04-13 at 4 56 17 PM Screenshot 2026-04-13 at 4 56 41 PM

Tip

Comment /review to trigger the PR Reviewer agent for automated feedback.
Comment /describe to generate a PR description.

@derekmisler derekmisler requested a review from a team as a code owner March 26, 2026 23:27
@derekmisler derekmisler force-pushed the feat/oidc-secrets-manager branch from f45ef15 to d950f6c Compare March 26, 2026 23:29
@derekmisler derekmisler self-assigned this Mar 26, 2026
@derekmisler derekmisler marked this pull request as draft March 26, 2026 23:29
@docker-agent

This comment was marked as outdated.

docker-agent[bot]

This comment was marked as resolved.

@derekmisler derekmisler force-pushed the feat/oidc-secrets-manager branch 3 times, most recently from d6d001e to 566b08a Compare April 10, 2026 23:51
@derekmisler derekmisler marked this pull request as ready for review April 10, 2026 23:52
docker-agent[bot]

This comment was marked as resolved.

@derekmisler derekmisler force-pushed the feat/oidc-secrets-manager branch 3 times, most recently from 5671b72 to 8bf8162 Compare April 11, 2026 19:04
docker-agent[bot]

This comment was marked as resolved.

@derekmisler derekmisler force-pushed the feat/oidc-secrets-manager branch 15 times, most recently from 0860a9c to 313e4e1 Compare April 13, 2026 17:44
@derekmisler derekmisler force-pushed the feat/oidc-secrets-manager branch 6 times, most recently from 8055b29 to 83abe3c Compare April 13, 2026 20:45
@derekmisler derekmisler enabled auto-merge (squash) April 13, 2026 20:57
@derekmisler derekmisler force-pushed the feat/oidc-secrets-manager branch 2 times, most recently from b844483 to e37f363 Compare April 14, 2026 01:45
Comment thread src/ai-keys.ts
openai_api_key?: string;
}

export async function fetchAIApiKeys(credentials?: AwsCredentialIdentityProvider): Promise<void> {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It seems like a lot of "changed files" in this PR, but the alternative was to inline all of this JS in the yaml, so this seemed like the safer choice.

@derekmisler derekmisler force-pushed the feat/oidc-secrets-manager branch from e37f363 to 78f7208 Compare April 14, 2026 01:55
trungutt
trungutt previously approved these changes Apr 14, 2026
Copy link
Copy Markdown
Contributor

@trungutt trungutt left a comment

Choose a reason for hiding this comment

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

Let's try it

Comment thread .github/workflows/review-pr.yml Outdated
Comment thread .github/workflows/manual-test-pirate-agent.yml Outdated
Comment thread .github/workflows/security-scan.yml Outdated
Comment thread .github/workflows/update-docker-agent-version.yml Outdated
Signed-off-by: Derek Misler <derek.misler@docker.com>
@derekmisler derekmisler force-pushed the feat/oidc-secrets-manager branch from 2b864d4 to 795d18f Compare April 14, 2026 14:20
@derekmisler derekmisler merged commit d77e562 into docker:main Apr 14, 2026
10 checks passed
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