Reference / AuthZEN Access API
AuthZEN Access API
Caroline's PDP speaks the OpenID AuthZEN Authorization API 1.0: one evaluation per question, and the three searches for who, what and which.
Base URL and keys
Your installation's PDP address, for example https://pdp.example.com. Every route needs a key as a bearer token.
| Key | Evaluation | Search |
|---|---|---|
Gateway key gk_... | yes | no 403 insufficient_scope |
| Console key | yes | yes |
An installation's public PDP route opens POST /access/v1/evaluation and nothing else. Search and the health routes answer inside the installation: the console uses search with its own key, which is never handed out.
Send X-Request-ID with any request; it is echoed back and kept in the ledger. An agent's own key goes in X-Agent-Token.
Evaluation
{
"subject": {"type": "agent", "id": "a_supply_agent"},
"action": {"name": "read"},
"resource": {"type": "inventory", "id": "r_stock_azure_prod"},
"context": {"on_behalf_of": "u_plan_mia"}
}
Answer, 200:
{ "decision": true, "context": { "reason": "..." } }
Only "decision": true allows. context.reason names the rule that decided; keep it in your operator's log, out of what the end user or model sees.
Subject search
The subjects of a type that may do this action on this resource.
{
"subject": {"type": "agent"},
"action": {"name": "read"},
"resource": {"type": "inventory", "id": "r_stock_azure_prod"},
"page": {"limit": 50}
}
subject.type is agent for an AI agent and user for everyone else. subject.properties narrows the search.
Resource search
The resources of a type this subject may do this action to. Give subject with its id and resource with its type (and properties to narrow it).
Action search
The actions this subject may take on this resource, from the actions the rules name. Give subject and resource, each with its id.
Paging
Every search answers in the same shape:
{
"page": { "next_token": "eyJvZmZzZXQiOiA1MH0", "count": 50, "total": 132 },
"context": { "checked": 140, "allowed": 132 },
"results": [ {"type": "agent", "id": "a_supply_agent"}, ... ]
}
Send page.token set to next_token for the next page. An empty next_token means there is none. page.limit of 0 only counts.
Errors
| Status | Body | Means |
|---|---|---|
400 | a problem named | the request is not a valid AuthZEN request, or the page token is not one this PDP gave |
401 | {"error": "invalid_token"} | the key is missing, malformed, unknown, wrong or revoked |
403 | {"error": "insufficient_scope"} | the key may not call this route |
403 | {"error": "invalid_agent_credential"} | the agent's key is wrong, revoked, or someone else's |
503 | {"error": "engine_unavailable"} | the engine cannot answer; refuse and retry later |
Health
Inside the installation, for monitoring that runs beside it; never per call (Health and metrics).
Not yet
- Batch evaluation (
POST /access/v1/evaluations), one request asking several questions. Designed, not built: send one evaluation per question. - PDP metadata (
/.well-known/authzen-configuration). Configure the routes above by hand.