Designing Fail-Closed Offline Resilience: Signed Policy Bundle Caching (R17)
Why signed policy bundles are useful for diagnostics but cannot safely authorize offline ERP writes.
Key Takeaways
- The Control Plane signs active tenant policy documents into short-lived ECDSA P-256 bundles served via GET /v1/policies/bundle.
- The Gateway cache is opt-in and startup-validated: empty or wildcard LowRiskTools configurations are rejected at boot.
- During an outage every enrolled tool returns 503 without executing, even with a valid cached Allow; recovery requires the original idempotency key and durable redemption.
Balancing uptime with ADR-0007 Fail-Closed safety
Under ADR-0007, when the Gateway cannot reach the Control Plane, every enrolled action fails closed with 503 control_plane_unavailable, including small invoice approvals.
The former offline Allow path could bypass agent deactivation and duplicate a write after recovery. It has been removed: signatures prove policy integrity, not current authorization or durable execution identity.
Cryptographically verified, strictly scoped bundles
The Control Plane canonicalizes the active policy JSON, verifies it against the stored DocumentHash, and signs a canonical payload containing tenant ID, policy version, issued/expiry timestamps, and policy hash using ECDSA P-256.
The Gateway validates cache configuration eagerly at startup. Cached bundles support diagnostic evaluation only; execution always requires an online decision and atomic redemption.
Strict offline guardrails
Even with a valid cached Allow, all enrolled actions fail closed with 503 during an outage. Do not use signed policy caching as an offline write authorization mechanism.
Update (Nov 14, 2026): offline execution removed
This post describes a design that has since been withdrawn. As part of a security remediation recorded in ADR-0007, offline execution from a cached policy bundle has been removed. Every tool enrolled at the gateway, including small invoice approvals that are auto-allowed when the control plane is reachable, now fails closed with 503 ControlPlaneUnavailable during a control-plane outage. Signed policy bundles still exist, but they serve diagnostics only: they no longer authorize any action.
We are leaving the original text in place so readers can see what changed and why. Please read the sections above as history, not as a description of current behaviour.
Why the offline path was removed
A cached policy can say what the rules were when it was signed. It cannot establish that the agent is still activated right now, for example after a kill switch, and it cannot reserve the durable execution and idempotency record that makes redeem happen at most once. Without both, an offline Allow could not be made safe, so the path was taken out.
What happens during an outage today
The current behaviour is simpler than the design above, which is part of the point. When the gateway cannot reach the control plane, it does not evaluate policy locally at all.
- Every enrolled tool returns 503 ControlPlaneUnavailable, whatever its risk level or amount.
- No action is queued, approved or executed offline; nothing reaches the ERP.
- Actions already redeemed before the outage complete or end as UNKNOWN, and are reconciled once the control plane returns.
- Signed bundles can still be fetched and checked to help diagnose which policy version a gateway last saw.
Designing agents and runbooks around 503
Since availability now depends on the control plane, treat its uptime as part of the protected workflow. Agents should treat 503 as retry later, with backoff and a stable idempotency key, and should tell a person when the wait grows long instead of looking for another route to the ERP. There must be no such route: if a direct path exists, the outage is the moment it gets used.
On the operations side, run the control plane with the redundancy your finance processes need, rehearse a restart in staging and confirm that every enrolled tool returns 503, and monitor the 503 rate so an outage is noticed by the platform team before it is noticed by the AP team.
Security scope and deployment prerequisites
This is a pilot implementation, not a zero-risk guarantee or compliance certification. Examples describe repository capabilities or deployment recommendations, not proof that a live installation has enabled them.
Every enrolled write fails closed during control-plane outages. Privileged control-plane MFA is mandatory outside Development, but accepted MFA claims do not prove recent authentication or hardware-backed WebAuthn unless the identity provider enforces those properties.
Per-agent deactivation blocks new evaluations and redeems and cancels Pending/Approved actions; it cannot recall an already executing ERP write. Evidence verifies recorded events, not unrecorded ERP activity; independently retained heads and trusted keys are needed to detect truncation or replacement.
Production blockers remain
The static portal still uses sessionStorage tokens (BFF not implemented). Off-host backup signing, immutable backup storage, live IdP MFA/logout testing, restore drills, adapter validation, monitoring, and legal review require deployment-specific work. Anchoring and SIEM forwarding are optional and must be configured and tested. See the repository deployment guide and runbook gap register before using real customer data.
Related deep dives
Standalone Policy Engines (OPA, Cedar, Cerbos) vs. Full-Lifecycle Action Assurance
Nov 18, 2026 · 3 min readSecurity & AuditDefending Against AI-Assisted Invoice Redirection Fraud: Two-Person IBAN & BIC Verification
Nov 21, 2026 · 3 min readSecurity & AuditGRC Automation (Vanta, Drata) vs. Cryptographic Decision Evidence Vaults
Nov 20, 2026 · 3 min read