Decide one request for another system (OpenID AuthZEN)
The answer is the stored table's, decided with the same lookup Pod's enforcement points run, with the fixed baseline applied to an address as the servers apply it.
Not available yet Pod's API does not answer this call yet.
The answer is the stored table's, decided with the same lookup Pod's enforcement points run, with the fixed baseline applied to an address as the servers apply it. It is the connection test in AuthZEN's shape. decision is what Pod's own enforcement point would do: an Allow is true; a Deny or an Ask is false, except that log-only mode lets a net Deny or Ask through (true, with log_only in the context). The baseline and a cut-off are always false. An Ask stays a refusal until a person answers it (AuthZEN's approval draft: a denial is never an opening to act). An Ask answered Allow for a time is then true, with grant (the Ask) and grant_id in the context. An "allow once" grant is named with verdict: allow, grant_once and a remark that the server may already have used it (the server keeps which it used), but the decision is false: a caller that acted on true could use it more than once. A list not applied yet, a publisher that does not answer, or a list that answers another sandbox, policy or project is never an allow: the request is decided with no grants and context.grants says why. A policy's table has no grants (context.grants is null). The subject is sandbox or policy; the action is a rule's action; the resource is a host or an address for net, a folder for read and write, a tool for use, and a policy or a topic for msg. Any other property, and any context, is refused (invalid) rather than ignored. A subject Pod cannot decide for (no binding, an unknown policy, a ceiling, a table not compiled yet) answers 200 with decision: false and context.error. Changes and records nothing. AuthZEN's X-Request-ID is echoed. A project's decision point metadata is public, at /.well-known/authzen-configuration/v1/authzen/<project>, outside this description.
A key with the permissions:read scope.
Request
curl -X POST "https://api.pod.mapier.ai/v1/authzen/access/v1/evaluation?project=example" \
-H "Authorization: Bearer $POD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"subject":{"type":"sandbox","id":"example"},"action":{"name":"read"},"resource":{"type":"host","id":"example"}}'Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
project | query | string | Yes | The project the call is about. Every route is scoped to one. |
Pod-Organisation | header | string | No | The organization, for a person who belongs to several. An API key's organization is its own, and a different one here is forbidden. |
Idempotency-Key | header | string | No | Makes a repeat of this call safe for 24 hours. |
X-Request-ID | header | string | No | AuthZEN's request identifier. The answer carries the same value back. |
Body
| Field | Type | Required | What it is |
|---|---|---|---|
subject | AuthzenSubject | Yes | Whose table decides. |
action | AuthzenAction | Yes | |
resource | AuthzenResource | Yes | |
context | AuthzenContext | No | Pod decides at the time of the call with the stored table and reads no context; send none, or {}. |
Answer
200. The decision, with Pod's reasons, or false with the error that kept Pod from deciding.
{
"decision": false,
"context": {
"verdict": "allow",
"rule": null,
"reason_admin": {
"en": "example"
},
"read": false,
"log_only": false,
"baseline": false,
"cut_off": false,
"grant": null,
"grant_id": null,
"grant_once": false,
"grants": null,
"policy": null,
"policy_version": null
}
}| Field | Type | Always | What it is |
|---|---|---|---|
decision | boolean | Yes | What Pod's own enforcement point would do. false whenever Pod could not decide. |
context | AuthzenDecisionContext | AuthzenErrorContext | Yes |
Errors
The refusals this call is known for: invalid, unauthorized, forbidden. Any call can also answer unauthorized, rate_limited, unavailable or internal; the error list says what each means and when to send the call again.