control-plane-perm API
.
This page lists 11 endpoints (OpenAPI tag control-plane-perm). It is generated from openapi.json; see the REST API overview for authentication, CSRF and error conventions.
| Method | Path | Operation id | Notes |
|---|---|---|---|
| GET | /api/control-plane/perm/cedar-grants | cedar_grants_state | Get the Cedar grant-source state |
| POST | /api/control-plane/perm/cedar-grants/fold | cedar_grants_fold | Backfill the Cedar grant mirror |
| POST | /api/control-plane/perm/cedar-grants/report | cedar_grants_report | Report Cedar grant-source differences |
| POST | /api/control-plane/perm/cedar-grants/shadow | cedar_grants_shadow | Enter Cedar grant-source shadow mode |
| POST | /api/control-plane/perm/cedar-grants/switch | cedar_grants_switch | Switch grants to the unified Cedar source |
| POST | /api/control-plane/perm/cedar-grants/undo | cedar_grants_undo | Step back one Cedar grant-source level |
| GET | /api/control-plane/perm/pdp-source | get_source | Get the policy decision source |
| POST | /api/control-plane/perm/pdp-source/report | post_report | Report policy decision source differences |
| POST | /api/control-plane/perm/pdp-source/shadow | post_shadow | Enter policy-source shadow mode |
| POST | /api/control-plane/perm/pdp-source/switch | post_switch | Switch to the unified policy source |
| POST | /api/control-plane/perm/pdp-source/undo | post_undo | Step back one policy-source level |
GET /api/control-plane/perm/cedar-grants
Operation id: cedar_grants_state. Auth: Session cookie. Forbidden (403): Not a platform admin.
Get the Cedar grant-source state
Response 200 (application/json): GrantSourceState
| Field | Type | Required | Description |
|---|---|---|---|
source | GrantSource | yes | |
switched_at | string (date-time), nullable | no | |
switched_by | string, nullable | no |
| Status | Meaning |
|---|---|
| 200 | Current grant source + audit |
| 401 | Not authenticated |
| 403 | Not a platform admin |
POST /api/control-plane/perm/cedar-grants/fold
Operation id: cedar_grants_fold. Auth: Session cookie and X-Egret-CSRF header.
Backfill the Cedar grant mirror
Response 200 (application/json): GrantSourceState
| Field | Type | Required | Description |
|---|---|---|---|
source | GrantSource | yes | |
switched_at | string (date-time), nullable | no | |
switched_by | string, nullable | no |
| Status | Meaning |
|---|---|
| 200 | Mirror backfilled; source unchanged |
| 401 | Not authenticated |
| 403 |
POST /api/control-plane/perm/cedar-grants/report
Operation id: cedar_grants_report. Auth: Session cookie and X-Egret-CSRF header. Forbidden (403): Not a platform admin.
Report Cedar grant-source differences
Response 200 (application/json): array of GrantDivergence
| Field | Type | Required | Description |
|---|---|---|---|
kind | GrantDivergenceKind | yes | |
id | string (uuid) | yes | |
detail | string | yes |
| Status | Meaning |
|---|---|
| 200 | Live equivalence report (empty => safe to switch) |
| 401 | Not authenticated |
| 403 | Not a platform admin |
| 500 | Internal error |
POST /api/control-plane/perm/cedar-grants/shadow
Operation id: cedar_grants_shadow. Auth: Session cookie and X-Egret-CSRF header.
Enter Cedar grant-source shadow mode
Response 200 (application/json): GrantSourceState
| Field | Type | Required | Description |
|---|---|---|---|
source | GrantSource | yes | |
switched_at | string (date-time), nullable | no | |
switched_by | string, nullable | no |
| Status | Meaning |
|---|---|
| 200 | Entered shadow (observe); still serves access_grants |
| 401 | Not authenticated |
| 403 |
POST /api/control-plane/perm/cedar-grants/switch
Operation id: cedar_grants_switch. Auth: Session cookie and X-Egret-CSRF header.
Switch grants to the unified Cedar source
Response 200 (application/json): GrantSourceState
| Field | Type | Required | Description |
|---|---|---|---|
source | GrantSource | yes | |
switched_at | string (date-time), nullable | no | |
switched_by | string, nullable | no |
| Status | Meaning |
|---|---|
| 200 | Switched to unified (report was clean) |
| 401 | Not authenticated |
| 403 | |
| 409 | The report is not clean |
POST /api/control-plane/perm/cedar-grants/undo
Operation id: cedar_grants_undo. Auth: Session cookie and X-Egret-CSRF header.
Step back one Cedar grant-source level
Response 200 (application/json): GrantSourceState
| Field | Type | Required | Description |
|---|---|---|---|
source | GrantSource | yes | |
switched_at | string (date-time), nullable | no | |
switched_by | string, nullable | no |
| Status | Meaning |
|---|---|
| 200 | Stepped back one level: unified to shadow to legacy |
| 401 | Not authenticated |
| 403 |
GET /api/control-plane/perm/pdp-source
Operation id: get_source. Auth: Session cookie. Forbidden (403): Not a platform admin.
Get the policy decision source
Response 200 (application/json): SourceState
| Field | Type | Required | Description |
|---|---|---|---|
source | PolicySource | yes | Which assembler the live PDP serves. Stored as text in the DB. |
switched_at | string (date-time), nullable | no | |
switched_by | string, nullable | no |
| Status | Meaning |
|---|---|
| 200 | Current PDP policy source + audit |
| 401 | Not authenticated |
| 403 | Not a platform admin |
POST /api/control-plane/perm/pdp-source/report
Operation id: post_report. Auth: Session cookie and X-Egret-CSRF header. Forbidden (403): Not a platform admin.
Report policy decision source differences
Response 200 (application/json): array of PdpDivergence
| Field | Type | Required | Description |
|---|---|---|---|
kind | DivergenceKind | yes | |
id | string | yes | PolicyId (Policy) or role uuid (RoleName). |
detail | string | yes | Human-readable: "only in legacy" | "only in compiled" | "text differs" | the two names. |
| Status | Meaning |
|---|---|
| 200 | Live equivalence report (empty ⇒ safe to switch) |
| 403 | Not a platform admin |
| 500 | Internal error |
POST /api/control-plane/perm/pdp-source/shadow
Operation id: post_shadow. Auth: Session cookie and X-Egret-CSRF header.
Enter policy-source shadow mode
Response 200 (application/json): SourceState
| Field | Type | Required | Description |
|---|---|---|---|
source | PolicySource | yes | Which assembler the live PDP serves. Stored as text in the DB. |
switched_at | string (date-time), nullable | no | |
switched_by | string, nullable | no |
| Status | Meaning |
|---|---|
| 200 | |
| 403 |
POST /api/control-plane/perm/pdp-source/switch
Operation id: post_switch. Auth: Session cookie and X-Egret-CSRF header.
Switch to the unified policy source
Response 200 (application/json): SourceState
| Field | Type | Required | Description |
|---|---|---|---|
source | PolicySource | yes | Which assembler the live PDP serves. Stored as text in the DB. |
switched_at | string (date-time), nullable | no | |
switched_by | string, nullable | no |
| Status | Meaning |
|---|---|
| 200 | Switched to compiled (report was clean) |
| 403 | |
| 409 | Not in shadow, or the report is not clean |
POST /api/control-plane/perm/pdp-source/undo
Operation id: post_undo. Auth: Session cookie and X-Egret-CSRF header.
Step back one policy-source level
Response 200 (application/json): SourceState
| Field | Type | Required | Description |
|---|---|---|---|
source | PolicySource | yes | Which assembler the live PDP serves. Stored as text in the DB. |
switched_at | string (date-time), nullable | no | |
switched_by | string, nullable | no |
| Status | Meaning |
|---|---|
| 200 | Stepped back one state |
| 403 |