check_authorization
Ask Vengtoo whether a subject can perform an action on a resource. Returns decision, reason, and policy. Supports type-level or instance-level checks.
Instructions
Ask Vengtoo whether a subject can perform an action on a resource. Returns decision: true (allowed) or false (denied), plus the reason and which policy/access path was responsible.
Identify the subject and resource using either their Vengtoo UUID (id) or your system's own identifier (external_id). external_id is preferred in production — it avoids the need to store Vengtoo UUIDs.
For type-level checks (does this user have ANY access to this type of resource?): set resource_type and omit resource_id and resource_external_id. For instance-level checks (does this user have access to THIS specific resource?): set resource_id or resource_external_id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Action to check, e.g. "read" or "delete" | |
| subject_id | No | Vengtoo subject UUID. Use subject_external_id instead when possible. | |
| resource_id | No | Vengtoo resource UUID. Use resource_external_id instead when possible. | |
| subject_type | Yes | Subject type, e.g. "user" or "service" | |
| resource_type | Yes | Resource type name or UUID, e.g. "document" | |
| subject_external_id | No | Your system's own subject ID (recommended). Mutually exclusive with subject_id. | |
| resource_external_id | No | Your system's own resource ID. Mutually exclusive with resource_id. |