mirror of
https://github.com/ModernRelay/omnigraph.git
synced 2026-06-09 01:35:18 +02:00
1.4 KiB
1.4 KiB
Authorization (Cedar policy)
OmniGraph integrates AWS Cedar (cedar-policy = 4.9) for ABAC.
Policy actions
read— query / snapshot / list branches & commitsexport— NDJSON exportchange— mutationsschema_apply— apply schema migrationsbranch_createbranch_deletebranch_mergerun_publishrun_abortadmin— reserved
Scope kinds
branch_scope— applied to source branch (read,export,change)target_branch_scope— applied to destination (schema_apply, branch ops, run ops)protected_branches— named list with special rules; rule scopes areany | protected | unprotected
Configuration
omnigraph.yaml:
policy:
file: ./policy.yaml # Cedar rules + groups
tests: ./policy.tests.yaml # declarative test cases
Each rule must use exactly one of branch_scope or target_branch_scope.
CLI
omnigraph policy validate— parse + count actors, exit 1 on parse error.omnigraph policy test— run cases inpolicy.tests.yaml, exit 1 on any expectation mismatch.omnigraph policy explain --actor … --action … [--branch …] [--target-branch …]— show decision and matched rule.
Server enforcement
Every mutating endpoint calls authorize_request() before the handler runs; decisions are logged with actor / action / branch / outcome / matched rule.