A policy scope prefilter narrows authorization candidates before complete evaluation. For a document search, relationship traversal finds reachable resources, while static constraints such as tenant, classification, or sharing status remove candidates that could never satisfy the policy. section 13.5.3
A practical authorization search combines three stages:
- Traverse the relationship-based access control (ReBAC) graph from the principal or resource to retrieve candidate documents or users. section 13.5.3
- Apply a partially evaluated policy residual as an efficient database, index, or graph filter; for example, constrain matching departments, shareable documents, or viewer edges. section 13.5.3
- Send the remaining candidates to the tenant policy decision point (PDP) for complete Cedar evaluation, optionally in a batch. section 13.5.3
# Example: docs this user can access
cands = graph.traverse_from_principal(p, action="doc:view")
scoped = prefilter_by_scope(cands, action="doc:view")
result = pdp.batch_authorize(principal=p, action="doc:view",
resources=scoped, context=ctx)
docs = [r for r, dec in result.items() if dec == "Permit"]
The access-search pattern shows graph traversal, scope filtering, batch authorization, and Permit-only result selection. section 13.5.3
