Policies API
Manage Cedar authorization policies for attribute-based access control (ABAC). Policies extend the built-in RBAC system with fine-grained rules based on resource attributes, user attributes, and request context.
Base URL: https://id.vyntech.com.au/api/v1 — All endpoints require authentication with policies:manage permission. Policies are scoped per tenant and evaluated via the POST /authz/check endpoint.
List Policies
Returns all Cedar policies defined within the tenant.
/api/v1/policies🔒 AuthList all Cedar policies in the current tenant.
Create Policy
Creates a new Cedar policy. The policy is validated for syntax before saving. Policies with effect: "permit" grant access; those with effect: "forbid" deny it. Forbid always wins over permit.
/api/v1/policies🔒 AuthCreate a new Cedar authorization policy.
{
"name": "restrict-sensitive-data",
"description": "Only users with clearance=high can access sensitive resources",
"effect": "forbid",
"cedar": "forbid(principal, action, resource) when { resource.sensitivity == "high" && !(principal.clearance == "high") };",
"enabled": true
}Update Policy
Updates an existing policy. You can modify the Cedar expression, toggle enabled/disabled, or update the description. Changes take effect immediately on subsequent authz checks.
/api/v1/policies/:id🔒 AuthUpdate an existing Cedar policy.
{
"name": "restrict-sensitive-data",
"description": "Updated: requires clearance=high or role=admin",
"cedar": "forbid(principal, action, resource) when { resource.sensitivity == "high" && !(principal.clearance == "high" || principal in Role::"admin") };",
"enabled": true
}Delete Policy
Permanently deletes a policy. Future authz checks will no longer evaluate this policy.
/api/v1/policies/:id🔒 AuthDelete a Cedar policy.