Skip to content

Add octo-sts trust policy for the release pipeline - #9334

Draft
wallrj wants to merge 1 commit into
cert-manager:masterfrom
wallrj:octo-sts-cmrel-publish
Draft

wallrj wants to merge 1 commit into
cert-manager:masterfrom
wallrj:octo-sts-cmrel-publish

Conversation

@wallrj

@wallrj wallrj commented Sep 11, 2026

Copy link
Copy Markdown
Member

Adds the octo-sts trust policy that lets the release pipeline create GitHub releases without a stored token. cert-manager/release#373 changes cmrel gcb publish to exchange the Cloud Build service account's Google ID token with octo-sts for a short-lived GitHub token. This file tells octo-sts which identity to admit and what it may do: contents: write on this repository, which covers creating the draft release and uploading its assets.

Why

The v1.21.2 publish failed with 401 from GitHub. The token it used was a personal access token of the jetstack-release-bot user, created in January 2020, and nobody on the project holds that account's login to rotate it (#9237). A token minted per publish from the build's own identity removes the secret and the dependency on an orphaned account.

The octo-sts GitHub App is already installed on every repository in the cert-manager org. This is the first policy that uses it.

What the policy matches

Field Value Why
issuer https://accounts.google.com Google ID tokens from the Cloud Build metadata server
subject_pattern [0-9]+ Google service account subjects are numeric unique IDs. octo-sts anchors the pattern.
claim_pattern.email cert-manager-release-gcb@cert-manager-release.iam.gserviceaccount.com The service account defined in cert-manager/infrastructure gcp/release.tf
claim_pattern.email_verified true Belt and braces on the email claim
permissions.contents write Create release, upload assets

The audience is not set, so octo-sts requires its own domain octo-sts.dev, which is what cmrel requests.

Test plan

/kind cleanup

[Claude Fable 5.1]

Lets cmrel gcb publish create the draft GitHub release for a tag with a
short-lived token minted by octo-sts from the Cloud Build service account
identity, instead of the stored personal access token of jetstack-release-bot
that stopped working before v1.21.2 (cert-manager#9237). The octo-sts GitHub App is
already installed on this repository.

The cmrel side is cert-manager/release#373.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Richard Wall <[email protected]>
@cert-manager-prow cert-manager-prow Bot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Sep 11, 2026
@cert-manager-prow

Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@cert-manager-prow

Copy link
Copy Markdown
Contributor

Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@cert-manager-prow cert-manager-prow Bot added dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Sep 11, 2026
@cert-manager-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign thatsmrtalbot for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@cert-manager-prow cert-manager-prow Bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Sep 11, 2026
@wallrj wallrj mentioned this pull request Nov 4, 2026
2 of 40 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant