liveBook · Manning

XACML

As explained in Authorization in Action

XACML is an OASIS standard for representing authorization policies and defining a model for evaluating access-control decisions.

An HR document archive may need to permit access to a confidential document only when the requester and its owner belong to the same department. XACML, the eXtensible Access Control Markup Language, expresses such authorization rules separately from application code. Introduced by OASIS in 2003, it defines both a declarative policy language and a model for evaluating and enforcing access decisions. section 8.1 section 8.1.1

The architecture separates four responsibilities: a Policy Enforcement Point (PEP) intercepts access; a Policy Decision Point (PDP) evaluates policies; a Policy Administration Point (PAP) manages them; and a Policy Information Point (PIP) supplies attributes and context. The PDP returns a decision for the PEP to enforce. section 4.4

Figure 4.2 Authorization reference architecture showing how access decisions are made. The Policy Enforcement Point (PEP) intercepts Alice’s request to ACMEProject and sends it to the Policy Decision Point (PDP). The PDP evaluates the request using policies from the Policy Administration Point (PAP), managed by Carol, and retrieves context from the Policy Information Point (PIP), which sources attributes from systems such as identity providers, time servers, and network telemetry. The PDP returns a decision, which the PEP enforces in real time.

Follow a request from interception through policy evaluation, contextual data retrieval, and enforcement. section 4.4

XACML models the principal, action, resource, and context as attributes. A principal is called a subject; actions are typically strings; and environment attributes can include time, IP address, or device posture. This supports attribute-based access control, but the core language has limited native support for typed objects and relationships. Authors often flatten resource facts into attributes and rely on naming conventions or profiles. section 8.1.2

Confidential document access

A policy can target confidential documents and contain a rule permitting access when the subject’s department matches the document owner’s department. A policy may contain multiple rules; its rule-combining algorithm determines how their results are combined. This example does not decide access to nonconfidential documents, which requires another rule or policy. section 8.1.1

<Policy PolicyId="ConfidentialDocAccess" RuleCombiningAlgId="permit-
overrides">
  <Target>
    <Subjects>
      <AnySubject/>
    </Subjects>
    <Resources>
      <Resource>
        <Attribute AttributeId="resource:type" DataType="string">
          <AttributeValue>confidential-doc</AttributeValue>
        </Attribute>
      </Resource>
    </Resources>
  </Target>

  <Rule RuleId="PermitSameDept" Effect="Permit">
    <Condition>
      <Apply FunctionId="string-equal">
        <AttributeDesignator AttributeId="subject:department" 
          Category="access-subject" DataType="string"/>
            <AttributeDesignator AttributeId="resource:owner-department" 
          Category="resource" DataType="string"/>
      </Apply>
    </Condition>
  </Rule>
</Policy>

Inspect the partial XML policy for the confidential-document rule and its permit-overrides combining algorithm. section 8.1.1

XACML is expressive and separates policy from enforcement, but its XML is verbose, tooling has lagged, and the runtime architecture can be heavyweight. ALFA, the Abbreviated Language for Authorization, provides a more compact syntax that compiles into XACML. When choosing an approach, weigh attribute-rich policy needs against performance, maintainability, and the experience of the people who will update policies. section 8.1 section 8.1.1 section 8.5.6

How Authorization in Action covers it

How deep it goes
Explains component roles and attribute modeling with a partial policy, without providing a full implementation.
Examples
Uses an HR and finance document archive to illustrate same-department access to confidential documents.
What you can do after
Evaluate and understand XACML policies and architectural tradeoffs when selecting an authorization approach.
How it connects
Connects attribute-based access control, centralized policy evaluation, and separation of decision from enforcement.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Authorization in Action. The section links point to the parts of the book it draws on.