Attach guard policies to scopes: store, admin API and ctl guard; run the gate when server.yaml defines policies

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ilker ManapandClaude Opus 5.5 committed 2026-10-04 12:34:47 +02:00
1 parent b4bdd250af
commit 13e6f19301
13 files changed
+412

No files matched your search

@@ -0,0 +1,11 @@
-- Which guard policies apply where: a policy from server.yaml's library,
-- attached to an organization, team, project, user or key. Everything below
-- an attachment is judged by it too.
CREATE TABLE guard_attachments (
scope TEXT NOT NULL,
scope_id TEXT NOT NULL,
policy TEXT NOT NULL,
added_at INTEGER NOT NULL,
added_by TEXT NOT NULL DEFAULT '',
PRIMARY KEY (scope, scope_id, policy)
);