Cerbos

Cerbos (latest)

CerbosService

Overview

Cerbos Policy Decision Point.

Operations

Responses

API Reference

Request Samples

{"requestId": "c2db17b8-4f9f-4fb1-acfd-9162a02be42b",
 "actions": ["view:public", "comment"],
 "principal": {"id": "bugs_bunny",
 "policyVersion": "default",
 "roles": ["user"],
 "attr": {"beta_tester": true},
 "scope": "acme.corp"},
 "resource": {"kind": "album:object",
 "policyVersion": "default",
 "instances": {"XX125": {"attr": {"owner": "bugs_bunny", "public": false, "flagged": false}},
 "XX225": {"attr": {"owner": "daffy_duck", "public": true, "flagged": false}}}},
 "includeMeta": true,
 "auxData": {}}

CerbosAdminService

Overview

Cerbos administration service.

Operations

Request Samples

List policies

GET /admin/policies

Response Sample

{"policyIds": ["string"]}

Add or Update Policies

POST /admin/policy

{"policies": [{"apiVersion": "string",
"disabled": true,
"description": "string",
"metadata": {"sourceFile": "string",
"annotations": {"property1": "string",
"property2": "string"},
"hash": "string",
"storeIdentifer": "string",
"storeIdentifier": "string",
"sourceAttributes": {"attributes": {"property1": null,
"property2": null}}},
"resourcePolicy": {"resource": "string",
"version": "string",
"importDerivedRoles": ["string"],
"rules": [{"actions": ["string"],
"derivedRoles": ["string"],
"roles": ["string"],
"condition": {"match": {"all": {"of": [null]},
"any": {"of": [null]},
"none": {"of": [null]},
"expr": "string"},
"script": "string"},
"effect": "EFFECT_UNSPECIFIED",
"name": "string",
"output": {"expr": "string",
"when": {"ruleActivated": "string",
"conditionNotMet": "string"}}}]},
"scope": "string",
"schemas": {"principalSchema": {"ref": "string",
"ignoreWhen": {"actions": ["string"]}},
"resourceSchema": {"ref": "string",
"ignoreWhen": {"actions": ["string"]}}},
"variables": {"import": ["string"],
"local": {"property1": "string",
"property2": "string"}},
"scopePermissions": "SCOPE_PERMISSIONS_UNSPECIFIED",
"constants": {"import": ["string"],
"local": {"property1": null,
"property2": null}}}]}