feat(cli): add mint sub-command for standalone GCP mint management#1261
feat(cli): add mint sub-command for standalone GCP mint management#1261waynesun09 wants to merge 1 commit into
Conversation
Site previewPreview: https://c1153a90-site.fullsend-ai.workers.dev Commit: |
ReviewFindingsMedium
Low
Info
Previous runReviewFindingsMedium
Low
Info
Previous run (2)ReviewFindingsMedium
Info
Previous run (3)ReviewFindingsMedium
Info
Previous run (4)ReviewFindingsLow
Info
Previous run (5)ReviewFindingsMedium
Low
Info
Previous run (6)ReviewFindingsMedium
Low
Info
Previous run (7)ReviewFindingsMedium
Low
Previous run (8)ReviewFindingsMedium
Low
Previous run (9)ReviewFindingsLow
Info
|
0cd6d29 to
3b70f4b
Compare
3b70f4b to
7b71dc4
Compare
7b71dc4 to
122dad5
Compare
122dad5 to
b76f100
Compare
b76f100 to
26376f2
Compare
| } | ||
| if org == gcf.PlaceholderOrg { | ||
| return fmt.Errorf("cannot unenroll reserved placeholder org %q", org) | ||
| } |
There was a problem hiding this comment.
[low] correctness
confirmUnenroll is untested. It handles terminal detection and user input parsing which are easy to get wrong in edge cases.
Suggested fix: Add tests using bufio.Reader wrapping strings.Reader for happy path, mismatch, and EOF paths.
26376f2 to
36b2423
Compare
36b2423 to
1d75fdb
Compare
Add `fullsend mint` command tree with four sub-commands that operate on GCP mint infrastructure without requiring a GitHub token: - `mint deploy`: deploy/update the mint Cloud Function - `mint enroll <org|owner/repo>`: enroll org or repo in mint - `mint unenroll <org|owner/repo>`: remove org or repo from mint - `mint status [org]`: read-only health check of mint state Also adds new Provisioner methods for unenroll operations: RemoveOrgFromMint, RemoveRepoFromMint, DisablePEMSecrets, DeletePEMSecrets, DisableWIFProvider, DeleteWIFProvider. Extends GCFClient interface with DisableSecretVersion, DeleteSecret, DisableWIFProvider, and DeleteWIFProvider methods. Signed-off-by: Wayne Sun <[email protected]>
1d75fdb to
521bae0
Compare
ralphbean
left a comment
There was a problem hiding this comment.
The make test tests need to pass. e2e can continue to fail until it is fixed on main, but let's not regress make test.
Summary
fullsend mintsub-command tree with 4 commands:deploy,enroll,unenroll,statusadmin installso GCP admins can manage token mint infrastructure without needing GitHub credentialsdeployprovisions the Cloud Function and supporting GCP infrastructure (SA, WIF, function deploy)enrollperforms full enrollment: PEM copy, env var merge (ALLOWED_ORGS, ROLE_APP_IDS), and per-repo WIF provider creationunenrollreverses enrollment with confirmation prompt; defaults to disable-only (explicit flags for permanent deletion)statusprovides read-only health check with enrolled orgs, PEM status, and WIF stateProvisionermethods for unenroll operations (RemoveOrgFromMint, RemoveRepoFromMint, DisablePEMSecrets, DeletePEMSecrets, DisableWIFProvider, DeleteWIFProvider, etc.)GCFClientinterface with 4 new GCP operationsTest plan
go test ./internal/cli/...passesgo test ./internal/dispatch/gcf/...passes (296 new lines of provisioner tests)go vetcleanfullsend mint --helpshows all 4 sub-commandsfullsend mint deploy --helpshows all flagsfullsend mint enroll --helphandles both org and owner/repo argsfullsend mint unenrollrequires confirmationfullsend mint deploy <org> --project=<proj>deploys Cloud Functionfullsend mint enroll <org> --project=<proj>copies PEMs and updates env varsfullsend mint status --project=<proj>shows mint health