Chuyển tới nội dung chính

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.

MethodPathOperation idNotes
GET/api/control-plane/perm/cedar-grantscedar_grants_stateGet the Cedar grant-source state
POST/api/control-plane/perm/cedar-grants/foldcedar_grants_foldBackfill the Cedar grant mirror
POST/api/control-plane/perm/cedar-grants/reportcedar_grants_reportReport Cedar grant-source differences
POST/api/control-plane/perm/cedar-grants/shadowcedar_grants_shadowEnter Cedar grant-source shadow mode
POST/api/control-plane/perm/cedar-grants/switchcedar_grants_switchSwitch grants to the unified Cedar source
POST/api/control-plane/perm/cedar-grants/undocedar_grants_undoStep back one Cedar grant-source level
GET/api/control-plane/perm/pdp-sourceget_sourceGet the policy decision source
POST/api/control-plane/perm/pdp-source/reportpost_reportReport policy decision source differences
POST/api/control-plane/perm/pdp-source/shadowpost_shadowEnter policy-source shadow mode
POST/api/control-plane/perm/pdp-source/switchpost_switchSwitch to the unified policy source
POST/api/control-plane/perm/pdp-source/undopost_undoStep 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

FieldTypeRequiredDescription
sourceGrantSourceyes
switched_atstring (date-time), nullableno
switched_bystring, nullableno
StatusMeaning
200Current grant source + audit
401Not authenticated
403Not 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

FieldTypeRequiredDescription
sourceGrantSourceyes
switched_atstring (date-time), nullableno
switched_bystring, nullableno
StatusMeaning
200Mirror backfilled; source unchanged
401Not 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

FieldTypeRequiredDescription
kindGrantDivergenceKindyes
idstring (uuid)yes
detailstringyes
StatusMeaning
200Live equivalence report (empty => safe to switch)
401Not authenticated
403Not a platform admin
500Internal 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

FieldTypeRequiredDescription
sourceGrantSourceyes
switched_atstring (date-time), nullableno
switched_bystring, nullableno
StatusMeaning
200Entered shadow (observe); still serves access_grants
401Not 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

FieldTypeRequiredDescription
sourceGrantSourceyes
switched_atstring (date-time), nullableno
switched_bystring, nullableno
StatusMeaning
200Switched to unified (report was clean)
401Not authenticated
403
409The 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

FieldTypeRequiredDescription
sourceGrantSourceyes
switched_atstring (date-time), nullableno
switched_bystring, nullableno
StatusMeaning
200Stepped back one level: unified to shadow to legacy
401Not 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

FieldTypeRequiredDescription
sourcePolicySourceyesWhich assembler the live PDP serves. Stored as text in the DB.
switched_atstring (date-time), nullableno
switched_bystring, nullableno
StatusMeaning
200Current PDP policy source + audit
401Not authenticated
403Not 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

FieldTypeRequiredDescription
kindDivergenceKindyes
idstringyesPolicyId (Policy) or role uuid (RoleName).
detailstringyesHuman-readable: "only in legacy" | "only in compiled" | "text differs" | the two names.
StatusMeaning
200Live equivalence report (empty ⇒ safe to switch)
403Not a platform admin
500Internal 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

FieldTypeRequiredDescription
sourcePolicySourceyesWhich assembler the live PDP serves. Stored as text in the DB.
switched_atstring (date-time), nullableno
switched_bystring, nullableno
StatusMeaning
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

FieldTypeRequiredDescription
sourcePolicySourceyesWhich assembler the live PDP serves. Stored as text in the DB.
switched_atstring (date-time), nullableno
switched_bystring, nullableno
StatusMeaning
200Switched to compiled (report was clean)
403
409Not 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

FieldTypeRequiredDescription
sourcePolicySourceyesWhich assembler the live PDP serves. Stored as text in the DB.
switched_atstring (date-time), nullableno
switched_bystring, nullableno
StatusMeaning
200Stepped back one state
403