Repository navigation
spawn onboard — BYOA portal onboarding wizard (Slice 3) - #443
Merged
Merged
Conversation
The CLI path for bringing an AWS account onto the spore.host portal (the
equivalent of the web CloudFormation quick-create). Run with credentials for the
account to onboard; it:
1. resolves the caller account via STS,
2. generates a high-entropy per-account ExternalId (confused-deputy guard),
3. idempotently creates the `spore-portal-onboard` cross-account role trusting
the portal phone-home Lambda role under that ExternalId, with the EC2 launch
+ SSM + spored-scoped iam:PassRole permissions the portal needs, and
4. SigV4-signs (lambda service) and POSTs {roleArn, externalId, region} to the
AuthType: AWS_IAM phone-home Function URL, so the portal auto-registers the
account and the handler binds it to the verified caller. Mirrors
pkg/dns/client.go's signing.
- pkg/config/endpoints.go: GetPortalPhoneHomeRoleARN (env default, infra) +
GetPortalPhoneHomeURL (env-only, no default — the URL is account/region-derived
by infra/tofu/portal-phone-home).
- Follows established conventions: --json MarkDeprecated in favor of root
-o/--output (spawn#40); onboard.go added to the cmd/ AWS-SDK import allowlist
for iam (same as bot.go's ensureCrossAccountRole pattern).
Build + go vet clean; the two convention tests (import allowlist, flag
conventions) pass. (Pre-existing TestCatalogValid failure re: private ECR catalog
images is unrelated.)
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
TestTier0_CommandCoverageGate requires every command to have a deliberate Tier 0 coverage decision. onboard does real IAM CreateRole + a SigV4 phone-home POST to the AuthType:AWS_IAM Function URL — the role-creation + verified-caller flow needs a real account and can't be faithfully served by Substrate, so it's deferred to Tier 2/3 (its validate/signing logic is unit-tested). Same treatment as burst/dns.
scttfrdmn
added a commit
that referenced
this pull request
Jul 28, 2026
Backfills Unreleased entries for #443 (spawn onboard), #444, #445 and #446, which merged without changelog entries, and commits the generated reference for spawn onboard — check-docs only diffs tracked files, so docs-gen/onboard.md was never added when the command landed. Sections reordered to Keep-a-Changelog order (Added first), matching prior releases.
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.
The CLI path for onboarding an AWS account to the spore.host portal — the equivalent of the web CloudFormation quick-create (companion backend PR: spore-host/spore-host #476).
Run with credentials for the account to onboard.
spawn onboard:spore-portal-onboardcross-account role trusting the portal phone-home Lambda role under that ExternalId, with the EC2 launch + SSM + spored-scopediam:PassRolepermissions the portal needs, and{roleArn, externalId, region}to theAuthType: AWS_IAMphone-home Function URL, so the portal auto-registers the account and the handler binds it to the verified caller. Mirrorspkg/dns/client.go's signing.Details
pkg/config/endpoints.go:GetPortalPhoneHomeRoleARN(env default → infra) +GetPortalPhoneHomeURL(env-only; the URL is account/region-derived by the tofu module).--jsonMarkDeprecatedin favor of root-o/--output(spawn#40);onboard.goadded to the cmd/ AWS-SDK import allowlist foriam(same asbot.go'sensureCrossAccountRole).Verified
Build +
go vetclean; the two convention tests (import allowlist, flag conventions) pass. (Pre-existingTestCatalogValidfailure — private ECR catalog images — is unrelated to this change.)