FASE 5.3 · OPERATIONAL LAYER
AxIA Policy Engine v0
Credential-gated action policies: turn credentials into real consequences. Block, warn or allow signing/capture/agent actions based on credentials, trust tier, asset type and assurance level.
Why
Until 5.0 credentials only contributed to the Trust score. From 5.3 they can change behaviour: an org can require, for example, a qualified.seal for the signer of any contract, or a hardware.cert on the camera that emits a capture event.
Data model
Evaluation function
evaluate_action_policy(org, policy_key, subject_kind, subject_id, context) returns:
Fail-open: if no policy exists, the policy is disabled, or enforcement is off, the engine returns allow with no reasons. The engine never throws into the caller — callers are expected to fail-open on engine errors and log them.
Enforcement points
- sign.content — enforced by sign-from-url. block returns HTTP 403 { code: 'policy_blocked', reasons }; warn includes a policy_warnings array in the response.
- capture.emit — reserved for Fase 5.1 (Trusted Hardware Credentials). Draft only.
- agent.execute — reserved for the upcoming Agents phase. Draft only.
Audit log
Every evaluation against a configured policy writes an immutable row to policy_evaluations. Org members can read their own org's evaluations from the dashboard. The log is the source of truth for compliance reviews (eIDAS, AI Act, SOX, ...).
Out of scope (this version)
- Policy versioning / approval workflows.
- Cross-organization inheritance.
- Real-time credential revocation checks (Fase 5.2).
- OIDC4VCI/OIDC4VP wallet flows (Fase 6).