Repository navigation
K2GO-564 feat(ci): Play upload signs in keyless with Workload Identity Federation - #791
Merged
Merged
Conversation
…y Federation The organization blocks service account keys. play-candidate gets a one-hour token for the k2go-play-publisher robot through google-github-actions/auth, and play_publish.py reads it from PLAY_ACCESS_TOKEN. The JSON key path is removed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
play-candidate.yml: signs in to Google Play with Workload Identity Federation (google-github-actions/auth@v3,id-token: write). One token before Plan and a fresh one before Send, because a token lasts one hour and the build sits between them. No credentials file on the runner.play_publish.py: reads the token fromPLAY_ACCESS_TOKEN. The service account JSON key path (JWT signed with openssl) is removed.Why
iam.disableServiceAccountKeyCreationis enforced), soPLAY_SERVICE_ACCOUNT_JSONcannot exist. Keyless sign-in also leaves no secret to leak or rotate.Steps to QA
main,play-candidateneedsPLAY_SERVICE_ACCOUNT_JSON, which does not exist, so the Play API steps fail.play-candidatefrommainon trackinternaland approve thegoogle-playenvironment. Both sign-in steps pass, and the build shows in Play Console > Internal testing.Verifications
test_play_publish: 26 tests pass. Workflow YAML parses.k2go-play-publisher(no keys), WIF poolgithub-actions/ providerknowledgetogo-repo(only this repo in environmentgoogle-play), STS and IAM Credentials APIs on, robot invited in Play Console (Knowledge to Go only, testing tracks).google-playmust exist (with a required reviewer) before the first run.Notes