Activation E2E: trusted CAPPO request preparation - #57
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
reprewindai-dev
left a comment
There was a problem hiding this comment.
Merge hold: the exact-head CI is green, but the implemented trust boundary does not yet match the PR's stated contract. POST /api/internal/cappo/prepare authenticates only possession of CAPPO_INTERNAL_EXEC_KEY, then accepts executionId, workspaceId, and actorId from the request JSON and signs those values into WIT/ECT/WPT/Authority. The unit test calls these function parameters “trusted,” but does not prove the route derives them from an authenticated server-side session/principal or otherwise binds the shared internal credential to an allowed workspace/actor. A bearer of the internal key can therefore select an arbitrary actor/workspace and cause cAPI to mint a signed authority chain for it.
Before this activation seam can be promoted or merged, derive workspace/actor/execution identity from a trusted server-side source (or validate them against an authenticated principal/allowance that the caller cannot widen), add route-level negative tests proving spoofed workspace/actor/execution values cannot be signed, and keep caller-provided directive/security stripping plus exact-body/header signature tests. If the intended contract is instead that this shared key is itself a fully trusted authority issuer, narrow the PR/body and architecture truth accordingly rather than claiming caller-selected identity is not trusted. Source/build evidence remains green; deployed cAPI 3003 remains NOT_VERIFIED.
Implements the server-side trust seam for Veklom Activation without creating a second consequence path. The protected cAPI preparer derives and signs the CAPPO security envelope, WIT/ECT/WPT/Authority chain and RFC 9421 request over the exact body and trust-bearing headers. Caller-selected workspace, actor, directive and security material are not trusted. The legacy cAPI execution endpoint remains retired; CAPPO /v1/exec remains the sole consequence boundary.
Verification required before merge: npm test and production build via cAPI CI.