Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions test/capability-routes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,15 @@ describe("capability-token control plane (crons + SOUL)", () => {
assert.equal(res.status, 403);
});

it("refuses a capability token minted for another audience on a self-service route", async () => {
const foreign = await capFor("U1", scopeId("personal", "U1"), { aud: "some-other-surface" });
const res = await get("/v1/keychain/overview", { "x-agent-capability": foreign });
assert.equal(res.status, 403);
assert.match(await res.text(), /audience not valid/);
const ok = await get("/v1/keychain/overview", { "x-agent-capability": await capFor("U1") });
assert.notEqual(ok.status, 403);
});

it("Strict capabilities can observe but cannot directly mutate the control plane", async () => {
const scope = scopeId("personal", "U-strict");
await built.config.setSecurityPosture(scope, "strict");
Expand Down
260 changes: 0 additions & 260 deletions test/removed-features.test.ts

This file was deleted.