The most recent patch for this version is 26.2.1.  Learn more

Skip to main content
Version: 26.2

AuthZEN Authorization API

The OpenID AuthZEN Authorization API 1.0Opens in a new tab is a standard from the OpenID Foundation that defines a common interface between applications (Policy Enforcement Points) and authorization services (Policy Decision Points). It provides a simple, REST-based way for applications to request authorization decisions using a consistent request and response model, independent of the underlying policy engine. Axiomatics is a founding member of the OpenID AuthZEN Working Group.

Access Decision Service (ADS) implements native support for the AuthZEN Authorization API, enabling it to receive AuthZEN requests, evaluate them against XACML policies, and return standardized authorization decisions.

note

AuthZEN endpoints are available only when ADS runs in ads or ads_caq mode.

Enabling AuthZEN​

AuthZEN endpoints are disabled by default. To enable them, set the authZen.enabled property to true, either in your deployment configuration or through Helm values.

deployment.yaml
authZen:
enabled: true

Endpoints​

ADS exposes the following AuthZEN endpoints:

  • Access evaluation endpoint

    /access/v1/evaluation

    Evaluates a single authorization request

  • Batch access evaluation endpoint

    /access/v1/evaluations

    Evaluates multiple authorization requests in a single call

  • PDP discovery endpoint

    /.well-known/authzen-configuration

    Discovers available AuthZEN endpoints and capabilities

An AuthZEN request is a JSON object with the following elements:

ElementRequiredDescription
subjectYesThe user or principal requesting access.
actionYesThe operation being performed.
resourceYesThe target of the request.
contextNoEnvironmental or contextual attributes (IP address, time of day, etc.).

Each required element has its own required inner fields:

ElementFieldRequiredDescription
subjectidYesIdentifier of the subject (email address, etc.).
subjecttypeYesType of the subject (user, employee, etc.).
subjectpropertiesNoAdditional subject attributes.
resourceidYesIdentifier of the resource.
resourcetypeYesType of the resource (account, document, etc.).
resourcepropertiesNoAdditional resource attributes.
actionnameYesName of the action (can_read, edit, etc.).
actionpropertiesNoAdditional action attributes.

Request validation​

ADS validates all required fields before evaluating a request. Any missing required field results in HTTP 400 with a descriptive error message.

Missing fieldHTTP response
subject, resource, or action (top-level)400 Bad Request
subject.id or subject.type400 Bad Request
resource.id or resource.type400 Bad Request
action.name400 Bad Request

Example: missing subject field

HTTP/1.1 400 Bad Request
Content-Type: application/json
{
"code": 400,
"message": "subject: subject is required"
}

Example: subject present but missing id

HTTP/1.1 400 Bad Request
Content-Type: application/json
{
"code": 400,
"message": "subject.id: id is required"
}

Attribute mapping​

ADS maps AuthZEN attributes to XACML attributes using the ADS dictionary (ALFA FQN lookup):

  • subject.id, subject.type, resource.id, resource.type, and action.name have built-in default mappings and work out of the box with no additional configuration.
  • For all other attributes, ADS looks up the ALFA FQN in the dictionary. A dictionary entry is applied only when both the key and the category match. If either does not match, ADS falls back to the default mapping.

Attributes that are not in the dictionary do not cause an error. As in the /authorize endpoint, ADS sends them to the policy as strings. An array value is sent as a multi-valued attribute, and an array that contains null returns HTTP 400.

Decision mapping​

The AuthZEN decision field is a boolean. ADS maps the four possible XACML outcomes to this boolean as follows:

XACML decisionAuthZEN decisionMeaning
PermittrueThe access request has been permitted.
DenyfalseThe access request has been denied.
NotApplicablefalseThe policy is not applicable to the access request.
IndeterminatefalseThere has been an error processing the request.

This default mapping (only Permit maps to true) is known as deny bias.

Response context​

The AuthZEN response defines an optional context field, which ADS uses to carry information from the underlying XACML response that has no direct equivalent in the AuthZEN specification. This mapping follows the XACML 3.0 & ALFA Profile of OpenID AuthZEN 1.0Opens in a new tab:

FieldDescription
xacml.decisionThe raw XACML decision (Permit, Deny, NotApplicable, or Indeterminate), namespaced under xacml to avoid clashing with the top-level AuthZEN decision field.
xacml.obligationsAn array of the obligations returned in the XACML response, in no particular order.
xacml.adviceAn array of the advice returned in the XACML response, in no particular order.
includedAttributesAttributes from the XACML response that were marked for inclusion in the result. Returned only for single access evaluations.

These fields are only present when the underlying XACML response includes them. For example, xacml.advice appears in the Access denied example below, where the evaluated policy returned an advice element.

Examples​

Single access evaluation​

Check whether user alice@acmecorp.com is allowed to read account 123:

Request

POST /access/v1/evaluation
Content-Type: application/json
{
"subject": {
"type": "employee",
"id": "bob@acmecorp.com",
"properties": {
"department": "engineering",
"clearanceLevel": "confidential"
}
},
"action": {
"name": "edit"
},
"resource": {
"type": "document",
"id": "project-plan-2026",
"properties": {
"classification": "confidential"
}
}
}

Response

{
"decision": true,
"context": {
"xacml": {
"decision": "Permit"
}
}
}

Batch access evaluation​

Evaluate multiple authorization requests in a single call. Shared subject and action values are specified at the top level, while each evaluation can override or specify its own resource. Every evaluation must have all required fields after the top-level values are applied; otherwise the whole request is rejected with HTTP 400.

Request

POST /access/v1/evaluations
Content-Type: application/json
{
"subject": {
"type": "user",
"id": "alice@acmecorp.com"
},
"action": {
"name": "can_read"
},
"evaluations": [
{
"resource": { "type": "account", "id": "123" }
},
{
"resource": { "type": "account", "id": "456" }
},
{
"action": { "name": "can_write" },
"resource": { "type": "account", "id": "789" }
}
]
}

Response

The response contains one decision per input request, in the same order:

{
"evaluations": [
{
"decision": true,
"context": {
"xacml": {
"decision": "Permit"
}
}
},
{
"decision": false,
"context": {
"xacml": {
"decision": "Deny"
}
}
},
{
"decision": false,
"context": {
"xacml": {
"decision": "NotApplicable"
}
}
}
]
}

Invalid evaluations within a batch

ADS applies the top-level subject, action, and resource values to each evaluation as defaults, and then validates every evaluation against the required fields. If any evaluation is missing a required field after the defaults are applied, ADS rejects the whole request with HTTP 400.

The error message lists the errors for each invalid evaluation, identified by its index in the evaluations array:

HTTP/1.1 400 Bad Request
Content-Type: application/json
{
"code": 400,
"message": "evaluations[0].subject.id: id is required, evaluations[1].subject.id: id is required"
}

A top-level subject without an id is accepted if every evaluation provides its own subject.id.

PDP discovery​

Discover which AuthZEN endpoints and capabilities ADS supports:

Request

GET /.well-known/authzen-configuration

Response

{
"policy_decision_point": "https://ads.example.com",
"access_evaluation_endpoint": "https://ads.example.com/access/v1/evaluation",
"access_evaluations_endpoint": "https://ads.example.com/access/v1/evaluations"
}