Repository navigation
Conversation
Follow-up to closed aws-samples#39. Per @krokoko's review feedback, this lands as an RFC / design document rather than an integration guide. Key properties: - The signing identity is a separate Lambda (Receipt Signer), outside the agent runtime's trust boundary. A compromised agent container cannot forge, alter, or suppress receipts. - Cedar policy evaluation stays native to AgentCore Gateway's built-in policy engine. This RFC does not reinvent Cedar evaluation; it adds a signed-receipt output alongside the existing CloudWatch log. - Signing key lives in KMS (Ed25519), scoped to the Receipt Signer IAM role only, with explicit deny on the agent runtime role. - Receipt chain is tamper-evident as a whole (hash-chained, JCS canonical, Ed25519 signed). Verifiable offline with @veritasacta/verify, no AWS credentials required. - Receipt format is tool-agnostic (IETF draft-farley-acta-signed-receipts, four independent conformant implementations). - CDK-managed infra: KMS key, S3 bucket with explicit denies, CloudTrail data events on kms:Sign for second-layer audit. Sections: 1. Problem statement 2. What AgentCore Gateway already provides (policy engine native) 3. Goals and non-goals 4. Trust model (explicit entity + boundary table) 5. Receipt contract (wire format + three invariants) 6. Reference implementation: AgentCore Gateway + Receipt Signer Lambda 7. CDK infrastructure (KMS, S3, Lambda, CloudTrail) 8. Verification flow (no AWS credentials required) 9. Compromise analysis (5 scenarios walked through) 10. Open questions (7 ABCA-specific unknowns) 11. References 12. Conformant signing implementations Appendix A: how this differs from the closed aws-samples#39 guide Explicitly acknowledges the critique @krokoko raised on aws-samples#39 that led to this rewrite. Author disclosure at the top of the document. This RFC references live AgentCore Gateway documentation at https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/policy-getting-started.html provided by @krokoko. The open questions in Section 10 are the places where AgentCore team guidance is needed before a reference- implementation PR can follow.
|
Hi @tomjwxf, thank you for the follow-up RFC. This is a significant improvement over #39 — the trust model is explicit, the signer is outside the agent runtime, the compromise analysis is thorough, and the author disclosure is upfront. I appreciate the work that went into this. However, I have a fundamental concern with the trigger mechanism, and I think it needs to be reworked before we can move forward. The EventBridge trigger is the wrong pattern here. In my review on #39, I proposed interceptor Lambdas — synchronous, in-path, part of the gateway request/response lifecycle: Agent → Gateway → REQUEST Interceptor (sign decision receipt) → Tool Target → RESPONSE Interceptor (sign outcome receipt) → Agent The RFC instead proposes an asynchronous EventBridge-triggered sidecar that reacts to policy decision events after the fact. A few problems with that:
What I'd like to see:
The rest of the RFC is solid — the receipt contract (Section 5), trust model (Section 4), CDK patterns for KMS/S3/IAM, and compromise analysis (Section 9) can stay largely as-is. It's the trigger mechanism in Sections 6 and 7.3 that needs to be rebuilt around what AgentCore actually supports. Minor notes:
Happy to discuss further. The direction is right, the trigger mechanism just needs to match what we actually have available and what gives us the strongest guarantees. Thank you! |
|
@krokoko agreed on all. On the trigger mechanism: I contradicted my own #39 position without a technical reason for doing so. The REQUEST interceptor signs the decision as the authority. EventBridge would react to it as a post-hoc recording. Different integrity claims, and the interceptor version is materially stronger on ordering, delivery, and freshness. Section 7.3 also built around an event source ( Revised architecture for the next push:
Receipt contract (Section 5), trust model (Section 4), compromise analysis (Section 9), and KMS/S3/IAM CDK patterns stay as-is. Only Sections 6 and 7.3 rebuild. Minor points, all accepted:
One question before I push: would it be useful to validate the interceptor-Lambda wiring against a working AgentCore deployment first so the CDK snippets match what actually ships, or is the doc-level spec enough for this round? Revised RFC this week. Thanks! |
|
Thank you @tomjwxf ! I will let it open for a couple more days to have people chime in and provide additional feedback as needed |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #40 +/- ##
=======================================
Coverage ? 92.46%
=======================================
Files ? 328
Lines ? 95033
Branches ? 9436
=======================================
Hits ? 87874
Misses ? 7159
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…gned-receipts-03 The chain-link rule changed after this RFC was written and is now published: previousReceiptHash, "sha256:" prefixed, over the whole preceding receipt with its signature included, and omitted (not null) on the first receipt. The verification key must come from outside the receipt; the public_key field is informational. Verifier pin moved from 0.3.0 to 0.9.6 with --replay-chain. No change to the trust model, the signer placement, or the AgentCore path. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Refreshed Section 5 and the verification snippet to match the receipt draft as it now stands. Since this RFC was written, the chain-link rule was settled and published in draft-farley-acta-signed-receipts-03 (September): the link is |
Bind request admission and observed responses to their own trusted boundary. Persist receipts before forwarding, distinguish native policy evidence, and document failure and offline verification cases. Signed-off-by: TJF <tomjwxf@gmail.com>
|
@krokoko, I’ve reworked the RFC around the synchronous REQUEST and RESPONSE interceptors you proposed. The EventBridge rule is gone. The request handler waits for a durable signed record before forwarding. The response records what the hook observed, including the case where REQUEST itself returned a rejection. A native Cedar verdict is attributed separately, only when it can be correlated to a policy trace. I also corrected the disclosure and switched the private bucket to BLOCK_ALL. For the KMS audit I used one ordinary CloudTrail trail, since Lake closed to new customers in May and Sign is a read-only management event. Could you re-review the revised RFC? The main integration question is which trusted attempt identifier ABCA can expose to both hooks. I’ve left that and the failure-path tests explicit for the first live pilot. |
Follow-up to #39 and the interceptor review. This is a design RFC for buffered MCP tool calls through an ABCA AgentCore Gateway. It adds a single document and deploys no resources.
Design. A REQUEST interceptor signs and durably records its own admission or rejection before allowing a request to proceed. A RESPONSE interceptor signs the gateway response it observes. An interceptor-generated rejection also invokes RESPONSE and must stay distinguishable from a target response. Native Cedar stays in ENFORCE mode. Its actual verdict has a separate evidence source in policy traces and requires reliable correlation.
Trust and operations. The signing role and KMS key sit outside the agent runtime. The proposal uses a private S3 bucket with conditional appends and a single CloudTrail trail that includes KMS management events. It defines how duplicate attempts, incomplete outcomes and ambiguous correlation should be handled, and what a verifier can establish from an export and a pinned key.
For review. Which trusted ABCA attempt/run binding can both interceptors recover? Does an existing interceptor need to be composed? The final section proposes integration tests and a first-target latency budget. The RFC does not claim these have run in AWS.
Author disclosure. I wrote the receipt-format Internet-Draft and three of the four implementations cited in the original proposal; APS is independently authored. No particular signing or verification package is required.
Checks on this revision. Checked links and the example request digest, ran the repository's documentation sync, and verified locally signed sample request and response envelopes against an external test key. The verifier rejected an edited signed payload.