Repository navigation
docs: plan AgentCore Identity and Gateway integration - #6362
kyleseaman wants to merge 4 commits into
Conversation
Record how Crew should take a standalone AgentCore workload identity and use Gateway for outbound token vending, without importing AWS into the public core.
A fleet is either a deployed box that can InvokeGateway at boot (workload) or a login box whose rebuild withholds Kiro MCP defaults until ensure-login vends a JWT. The launcher Policy.json stays launch-only; a new instance helper and a successor boundary name carry the AgentCore ceiling without re-versioning kirocrew-ec2-boundary.
Opus 4.8 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 5.6 Review — ✅ no blocking findingsGPT 5.6 completed its review of This comment is updated in place on each push. Review detailsFINDING -- docs/superpowers/plans/2026-08-27-agentcore-identity-gateway.md:198 -- False positive or not applicable? A repository writer can comment: |
Design Review (Fable 5) — 🟡 CONCERNSDesign-level review of Design-Verdict: CONCERNS Sound, well-grounded RFC stack; the union boundary quietly re-opens the exact leaked-launcher-credential threat the immutable boundary exists to stop. Watch
Suggestions
[DESIGN-REVIEWED] eadeeb7 |
A remote crew deploy creates the standalone WorkloadIdentity in the same CloudFormation stack. CDK operators use the same resource via aws_bedrockagentcore.WorkloadIdentity.
See-and-configure is Settings → Security on the crew you are connected to, not the hub Remote Crew launcher.
|
Superseded by #6387. The RFC/plan now lives on the implementation branch (rebased onto main). |
Problem / Motivation
Kiro Crew has no first-class agent identity in Amazon Bedrock AgentCore, and no token-vending path for outbound MCP tools. Operator-local secrets and static MCP
Authorizationheaders are the only options today. A pasted Gateway URL is not an integration: it has no workload identity, no per-session principal, no refresh, and no 3LO consent surface.The copyable cloud Policy.json pair also cannot express either of the two exclusive fleet shapes we need: a deployed box that can reach Gateway at boot, or a login box whose approved catalog is Gateway (overriding Kiro's default MCP merge).
Why it matters
Without a Crew workload identity, Gateway policy, CloudTrail, and the Identity token vault cannot name the agent. Without Gateway as the vending plane, Crew would have to implement OAuth / RFC 8693 itself — or keep sharing long-lived tool credentials.
Without binding that design to Policy.json, a launcher paste that looks like it grants
InvokeGatewaystill fails: the instance is capped by the immutablekirocrew-ec2-boundary(SSM + source-bucket only). Re-versioning that boundary is forbidden; a leaked launcher credential must not be able toCreatePolicyVersionit permissive.What changed (motivation → approach → change)
Goal: plan the integration, not implement it.
Approach (over putting boto3 in the public core, hosting Crew on AgentCore Runtime, or extending the reserved
IdentityProvider.whoamislot):AgentIdentityProviderfor a standalone AgentCore workload (kirocrew-<StackTag>).SessionPrincipal({surface}+{id}). Never takeuserIdfrom the model.CONTRACT_VERSIONstays1.Two exclusive postures in
security_policy.json(capabilities.agentcore.posture), each with a matching instance Policy.json:workload— deployed Crew has an IAM identity and canInvokeGatewayat boot. No login. Kiro MCP defaults still merge. Instance grant allowsGetWorkloadAccessToken/ForUserIdand DeniesForJWT.login— only Gateway-approved MCP is vended.rebuild_agent_config()withholds Kiro-global, seam-global, crew-store, and leftover non-managed servers (same emit-time control askirocrew-computerspec_gate). Managedkirocrew-*stay. Gateway is absent until ensure-login vends a CUSTOM_JWT. Instance grant allowsForJWTonly and DeniesForUserId+InvokeGateway.See-and-configure is on each crew's own gateway. Settings → Security → Agent identity (
GET/PUT /api/agentcore/identity) on the dashboard you are connected to. A hub launching another box is a different crew — identity does not live on Settings → Remote Crew. PUT writes only the standalone homesecurity_policy.json; a fleet override or signed document is 409. App tokens are 403. The ceiling is boot-frozen, so a write returnsrestart_required.Deploy can still create the AWS identity. The CloudFormation launcher (
kirocrew-ec2.yaml) createsAWS::BedrockAgentCore::WorkloadIdentitynamedkirocrew-<StackTag>whenkirocrew cloud launch --agentcore-postureisworkloadorlogin, attaches the matchingAWS::IAM::Policyto the instance role, and writesKIROCREW_AGENTCORE_POSTURE/KIROCREW_AGENTCORE_WORKLOAD_NAMEinto systemd. CDK operators create the same resource viaaws_bedrockagentcore.WorkloadIdentity(the public wheel does not depend onaws-cdk-lib). Defaultnoneis the historical launch and the dashboard launch path. Stack delete removes the identity. The launcher Policy.json grows only control-plane Create/Delete/Get/Tag verbs — neverInvokeGateway.Policy.json split:
iam.policy_json()stays launch-only (CFN, PassRole, SSM, source bucket). It does not growInvokeGateway.iam.agentcore_instance_policy_document(posture)is the copyable instance fragment.kirocrew-ec2-boundary-agentcoreis the union ceiling. Originalkirocrew-ec2-boundaryis never re-versioned. CloudFormationAllowedPatternmust accept either name.This PR records that design as:
docs/request-for-change/rfc-agentcore-identity-gateway.mddocs/superpowers/plans/2026-08-27-agentcore-identity-gateway.mdImplementation is a stacked series (seams → Policy.json / boundary / login withhold → principal → CFN identity assignment → per-crew Settings identity → Phase 0 probe → inject → consent/unattended → companion). Phase 0 must answer whether kiro-cli can take per-session headers before the
logininjection path lands. TheworkloadIAM path does not wait on that probe.This is the identity/credential plane. It is not the sibling AgentCore sandboxes execution-plane design.
Replaces #6331, which closed when the branch was renamed off the
cursor/prefix.Tests
N/A — documentation only.
scripts/docs-lint.shpasses.Manual verification
N/A — no runtime or UI change. Docs-lint and
git diff --checkwere run on the branch.Related Issues
None linked. Companion implementation is out of this repository (plan Task 7).
Checklist