Function router

Source
pub fn router(state: AppState) -> Router
Expand description

Build the AuthZEN HTTP router.

The router exposes:

  • POST /access/v1/evaluation — single decision
  • POST /access/v1/evaluations — batch with evaluation_semantics: "execute_all" | "deny_on_first_deny" | "permit_on_first_permit"
  • GET /healthz — always 200
  • GET /readyz — 200 only if policies are loaded AND the audit log is writable

The body is capped at 64 KB; larger requests are rejected by axum’s DefaultBodyLimit layer.