Expand description
OPA Policy Engine Client
Calls the OPA sidecar over HTTP to evaluate authorization decisions.
When OPA_URL is not set, runs in local mode using a compiled-in
copy of the role → permission mappings from policies/data.json.
Structs§
- Policy
Resource - Resource context (optional).
- Policy
User - User context passed into the OPA input document.
Functions§
- check_
policy - Check whether the user is allowed to perform
action. - enforce_
policy - Enforce policy — returns
Ok(())if allowed,Err(StatusCode)if denied.