Repository navigation
Conversation
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]>
|
Skipping CI for Draft Pull Request. |
|
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. DetailsInstructions 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. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
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 publishto 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: writeon 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-botuser, 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
issuerhttps://accounts.google.comsubject_pattern[0-9]+claim_pattern.emailcert-manager-release-gcb@cert-manager-release.iam.gserviceaccount.comgcp/release.tfclaim_pattern.email_verifiedtruepermissions.contentswriteThe 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]