Database-Backed Policies and Editor
Policies have moved from disk-based YAML files to a fully versioned, database-backed store. On first startup Faramesh automatically imports any existing /policies/*.yaml files; after that the engine reads exclusively from the policies table. The dashboard gives you one-click Allow/Ask/Deny plus a full JSON/YAML editor. This is for teams that need scalable, auditable, compliance-grade policy management without redeployments or dual-system confusion.
Migration from YAML
One-time import — On first startup, if YAML files exist under
/policies/*.yaml, Faramesh imports them into the database. No manual step required.Single source of truth — After migration, the engine uses only the database. Legacy YAML file endpoints and fallback logic have been removed.
No dual system — You no longer need to keep YAML and DB in sync; all edits go through the API or dashboard.
Dashboard: Governance and Advanced tabs
Governance tab — Simple one-click controls: set categories (e.g. bash, filesystem, network) to Allow, Ask, or Deny.
Advanced tab — Full policy editor with:
Live JSON ↔ YAML toggle — Edit in either format (powered by js-yaml).
Full rule editing: match conditions, effects, reasons.
Version history and activation.
API
Method | Path | Description |
|---|---|---|
GET |
| List policies |
POST |
| Create policy |
PUT |
| Update policy |
DELETE |
| Delete policy |
POST |
| Activate policy |
POST |
| Import policy from YAML body (one-time or bulk). |
Full request/response schemas: use the interactive docs at /docs.
Security and limits
Payload limit — 1 MB max per policy body.
Regex complexity — Regexes in match conditions are limited (e.g. < 500 characters, no nested quantifiers) to prevent ReDoS.
Rules per policy — Maximum 500 rules per policy.
These limits apply to both API and dashboard submissions.
CLI
See CLI for full command reference.
