Repository navigation
feat: AgentCore Workload Gateway integration - #6828
kyleseaman wants to merge 2 commits into
Conversation
GPT 5.6 Review — ✅ no blocking findingsGPT 5.6 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Design Review (Fable 5) — 🟡 CONCERNSDesign-level review of Design-Verdict: CONCERNS Mutating Watch
Suggestions
[DESIGN-REVIEWED] 4faaf42 |
First Principles Review (Fable 5) — 🟡 CONCERNSPremise-level review of First-Principles-Verdict: CONCERNS
Not justified as shipped
The deleted pins ( What this change shipsInventory (10 items) — 9 justifiedIntent: let a deployed workload-posture crew reach its AgentCore Gateway tools from kiro-cli, which cannot SigV4-sign, without the unsigned hostname or a bearer ever persisting — ADDITION.
More than 10 differences exist (SEL audit verbs, feature-map row, weakref session registry); the 10 most observable are kept. [FIRST-PRINCIPLES-REVIEWED] 4faaf42 |
Opus 4.8 Review — 🔴 changes requested (blocking)Reviewed Newly added [BLOCK-MERGE] 4faaf42
[OPUS-REVIEWED] 4faaf42 Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
578e377 to
593dc6a
Compare
593dc6a to
d1a8bea
Compare
d1a8bea to
453644e
Compare
b572009 to
5f9301e
Compare
5f9301e to
e269fcd
Compare
e269fcd to
204b3d2
Compare
204b3d2 to
9668d5f
Compare
|
🤖 Kiro Crew [operator: chenmingwei23#de330d0c]: This PR has been inactive for 7+ days. I reviewed it but it requires your input rather than an automated fix:
When you have rebased and resolved conflicts, the pipeline will re-assess on its next cycle. |
UX Review (Fable 5) — ⏭️ skippedRevision |
GPT 5.6 Review —
|
|
Maintainer queue disposition for 0c71a19: HOLD on the current stack. Direct base #6793 is not review-ready (readiness failure/Design block), and root #6595 has an active contract correction request. This slice does not directly consume #6595's turn-principal bind; the hold is dependency ordering, not a claim that its proxy uses that binding. Before the post-stack re-review, reconcile the body saying sync is deferred with the shipped gateway/sync route. Also verify fresh-session gateway setup against the reservation-vs-has_session boundary; the focused review identified a possible mount-time refusal before session/new completes. These observations are not approval of the unreviewed remainder. No cloud changes, history rewrite, or merge has been performed. |
|
Not approving for now: this PR is stacked on #6793; we'll review it once the base lands. |
Workload inbound is IAM. kiro-cli cannot sign InvokeGateway, so the adapter rewrites gateway_mcp_spec onto a 127.0.0.1 listener and session/new injects that live loopback URL. The unsigned hostname never reaches the agent file. Login sidecars and consent stay out.
Loopback is same-host, so each hop carries an HMAC-bound session token. Request-time signing requires the calling session's profile to still permit AgentCore and the composed posture to be workload — login uses JWT inbound, not instance IAM.
|
Thanks a lot for this careful, well-split AgentCore stack. We are closing #6595, #6793, #6828, #6600 and #6602 together for now: the branches are about 7,500 commits behind main, #6595 still has an open review on the identity contract, and the upper PRs reference symbols that #11780 removed, so a rebase would be close to a rewrite. The need is still tracked in docs/request-for-change/rfc-agentcore-identity-gateway.md (status: partial; phase 1 is on main via #6594). When AgentCore is picked up again, please open a fresh stack from current main, starting with the principal-propagation layer. Happy to reopen if you would rather continue on these branches. |
PR 4 of 6 in the AgentCore stack. Workload inbound is IAM. kiro-cli cannot SigV4-sign
InvokeGateway, so the unsigned Gateway hostname must never reach the agent file orsession/new. This is the focused security-review slice.A wiring gap here is an unsigned Invoke to a customer Gateway, or a bearer stuffed into
~/.kiro/agents/kirocrew.json. That review should not also cover OAuth consent or Settings UI.What changed
Localhost
127.0.0.1reverse proxy (preferred port18765). HMAC-bound session token (X-Kirocrew-Proxy-Auth+X-Kirocrew-Proxy-Session); hop-by-hop headers are stripped before AWS.SigV4 upstream is pinned to
*.gateway.bedrock-agentcore.<region>.amazonaws.com.Request-time recheck requires
agentcore_posture == "workload"(not any AgentCore posture) and evaluates the calling session's profile, not the host profile.Workload
gateway_mcp_spec()returns the proxy listen URL, orNoneif the proxy cannot start.session/newinjects only that loopback URL.Default Kiro sessions use
AcpRuntime;_mcp_servers_for_sessioninjects the per-session Gateway alongside pooled MCP servers (not onlyAcpClient).Dashboard inspect routes (
/api/agentcore/gateway{,/verify,/sync}) lazy-importagentcore_inspecton first request so gateway boot does not load the optional AgentCore subsystem.Proxy authentication is bound to a per-session GENERATION, not the session key alone: the inject registers a fresh nonce for the key on the live proxy before
session/new(GatewaySigV4Proxy.register_session/session_headers), theX-Kirocrew-Proxy-Authdigest is HMAC'd over key, agent and generation, and every hop must present the currently registered generation (X-Kirocrew-Proxy-Generation, never forwarded). Registering the same key again replaces the generation, so a stalled predecessor whose key a successor reuses cannot regain signing authority through the successor's liveness (proxy_generationrefusal). The inject retires the key's existing generation FIRST (retire_proxy_session), before its own gates, so a successor the gates deny still ends the predecessor's signed hops, and a replacement is minted only after every gate passes; teardown mayretire_session. The per-hop liveness check counts a key whosesession/newis still in flight (an allocation reservation) as live, since the Gateway MCP initialize happens inside that window.The Gateway-URL withhold is a FINAL-map rule (
platform.governance.strip_ungoverned_auto_approve->withhold_agentcore_gateway_entries), so a Gateway URL from an app manifest, a per-agent MCP policy, the ambientmcp.jsoncopy, an edition extra or the operator's override is withheld wherever it lands and regardless of a co-presentcommand. The inject gate and the proxy recheck read the EFFECTIVE posture and URL (agentcore_aws.resolved_posture/resolved_gateway_url), so an env-only CloudFormation instance receives its Gateway while a loaded ceiling still outranks env.Not in this PR: login inbound sidecars, OAuth consent, Settings identity UI. Dashboard Gateway sync stays in PR 6 and is operator-gated there.
Stacked on #6793.
Tests
test_agentcore_sigv4.py: region parse, HMAC bind, upstream pin,test_proxy_recheck_refuses_login_posture,test_proxy_recheck_uses_calling_session_profiletest_agentcore_gateway_inject.py: sanitize drops headers; session injects loopback and refuses unsigned httpstest_agentcore_inspect.py: snapshot codes, owner-only handlersRelated
Stack after #6793. Supersedes the Gateway/SigV4/inspect slice of #6387. Replaces #6598, which GitHub stopped dispatching
pull_requestreviews for (same class as #6597 → #6793).