Custom attributes
Validate context and resource attributes against the schemas registered in your environment.
Attributes carry the facts your policies need. Register context fields on the action’s context_schema and
resource fields on the resource type’s attributes. Authorization validates both
schemas before policy evaluation. The request’s resource type must match the registered action.
Types
| Type | Example | Validation |
|---|---|---|
string | "internal" | Up to 1,024 characters; max_length can lower the limit |
integer | 125000 | Safe JSON integer, from -9,007,199,254,740,991 to 9,007,199,254,740,991 |
decimal | "12.50" | Decimal string; no exponent notation or coercion from numbers |
boolean | true | A JSON boolean |
timestamp | "2026-11-08T18:00:00Z" | RFC 3339 date-time with a timezone |
enum | "internal" | Exact match to one of the registered values |
id | "usr_example" | Non-empty string |
string_array | ["eng", "ops"] | At most 100 strings; max_items can lower the limit |
minimum and maximum are inclusive for integers and decimals. Decimal comparisons preserve precision.
max_length counts Unicode code points and also limits each item in a string array. It does not truncate values.
Required and undeclared attributes
Each schema accepts at most 64 fields, with names matching ^[a-z][a-z0-9_]{0,63}$.
Attributes are flat; nested objects and null values are not accepted. Optional fields may be omitted.
A field marked required: true must be supplied, including when the entire context or attributes object is omitted.
An undeclared attribute is rejected, even when the registered schema is empty. Register every field your backend sends before deploying enforcement. Adding required fields can break existing callers; update callers first.
Schema mismatches return 422 attribute_invalid and do not create a decision or approval. Basic request-shape
errors are also rejected with 422. HTTP errors must leave the protected action stopped.
Provenance and confidentiality
provenance: server and provenance: caller are stored metadata. Validation checks the value’s shape; it does
not prove where a value came from. Load ownership, roles and tenant facts from trusted backend state rather than
model output. Organization and environment come from the project API key.
sensitive: true is also metadata. Validation errors never echo supplied values, and current decision recording
stores the request summary and digest rather than raw context/resource attributes. No export or webhook redaction
behavior is asserted. Avoid sending secrets or document bodies.
Deployment
Apply 0028_authorize_attribute_schemas.sql before deploying the enforcing API. Missing or malformed server schemas
return 503 rather than skipping validation. This page documents repository implementation; public release status
is tracked separately in Feature status.
Something wrong or unclear? Report an issue with this page.