Expand description
AuthZEN HTTP endpoint types and handlers.
Reference: https://openid.github.io/authzen/ (OpenID AuthZEN WG draft).
Structs§
- AppState
- Shared state for HTTP handlers.
- AppState
Options - Runtime dependencies and tuning for an
AppState. - Authorizer
Handle - Concurrent policy snapshot with an explicit reload boundary.
- Batch
Evaluation Request - Batch
Evaluation Response - Entity
Ref - Subject/Action/Resource reference: a single entity.
- Evaluation
Request - OpenID AuthZEN EvaluationRequest (subject/action/resource/context).
- Evaluation
Response - AuthZEN EvaluationResponse.
Enums§
- Evaluation
Mapping Error - Evaluation
Semantics - Batch evaluation semantics.
Constants§
- MAX_
BATCH_ EVALUATIONS - Maximum number of evaluations accepted in a single
/access/v1/evaluationsrequest. Caps memory + CPU per request; anything larger should be split by the caller.
Functions§
- build_
request_ entities - Build a
cedar_policy::Entitiesfrom the request’sentitiesarray. Per-request entities are typical for AuthZEN (each PEP sends the entities relevant to its call); a future enhancement can layer shared/static entities on top. - build_
state - Build an
AppStatefrom a policy store on disk + an optional audit log. Ifchain_secretisSome, the audit log is opened in chained (HMAC) mode; otherwise plain JSONL. - build_
state_ with_ cache - Like
build_statebut takes an explicitCacheConfig. PassingNonedisables caching. This function never reads process environment. - build_
state_ with_ options - Construct app state with explicit cache and audit-rotation options.
- evaluation_
request_ for_ caller - Map an HTTP or gRPC request while constraining it to the identity carried by a verified API key. The bound tenant is stored in request/audit metadata, not trusted from caller-controlled Cedar context. It is not a Cedar policy attribute; policy isolation must use trusted entities/context explicitly.
- evaluation_
request_ to_ agent - router
- Build the AuthZEN HTTP router.