You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current authoritative state is one optional JSON file containing routes, threat indicators, DNSBL entries, events, audit logs, feed status, and commercial metadata. In-process locking plus sibling-file rename protects a single process, but it cannot provide multi-replica concurrency, tenant isolation, transactional history, online migrations, point-in-time recovery, or independently testable integrity guarantees.
Keep the file adapter for standalone/community use, but introduce a repository interface with PostgreSQL as the only production authority.
Ownership model
Every mutable production row must carry explicit ownership instead of relying on the single top-level commercial tenant_id:
tenant_id on routes, policies, threat indicators, DNSBL entries, feed configurations, events, audit records, integration credentials/references, approvals, and jobs;
created_by_subject_id / updated_by_subject_id where an operator or service identity acts;
optional participant_id only where a domain workflow genuinely has a participant distinct from the authenticated subject;
immutable stable IDs and timestamps generated by the authority, not trusted from clients.
Integrity and transactions
Add schema migrations with explicit forward and rollback/restore procedures; use expand/contract for online changes.
Enforce primary keys, foreign keys, uniqueness, non-empty/check constraints, enum/domain constraints, and monotonic versioning in the database.
Use optimistic concurrency or row locking for policy changes; stale writers must receive a deterministic conflict, never silently overwrite newer state.
Store high-value changes and their audit entry in the same transaction.
Define retention/partitioning for high-volume security events without weakening auditability.
PostgreSQL is the documented and enforced authority for production mode.
Tenant isolation is default-deny and proven below the HTTP layer.
All critical mutations are transactional, versioned, attributable, and auditable.
Backup/restore evidence meets declared RPO/RTO.
A production instance cannot become ready on an unsupported schema or file-only state.
100% production statement/branch coverage includes repository selection, transaction, conflict, and migration error paths.
Boundaries
Keyverse supplies authenticated subject and tenant claims; Wardnet validates and applies authorization and database context.
The product that owns billing/credits remains responsible for its own atomic ledger; Wardnet stores only policy/risk/usage references needed for enforcement.
Noema may provide shared infrastructure capabilities, but Wardnet remains responsible for its state invariants and tenant isolation.
National Institute of Standards and Technology. (2022). Secure Software Development Framework (SSDF) version 1.1 (NIST SP 800-218). https://doi.org/10.6028/NIST.SP.800-218
Production blocker
The current authoritative state is one optional JSON file containing routes, threat indicators, DNSBL entries, events, audit logs, feed status, and commercial metadata. In-process locking plus sibling-file rename protects a single process, but it cannot provide multi-replica concurrency, tenant isolation, transactional history, online migrations, point-in-time recovery, or independently testable integrity guarantees.
Audited protected base:
b53dc7a1b8904a16752abbdc04429df893a4e32e.Required architecture
Keep the file adapter for standalone/community use, but introduce a repository interface with PostgreSQL as the only production authority.
Ownership model
Every mutable production row must carry explicit ownership instead of relying on the single top-level commercial
tenant_id:tenant_idon routes, policies, threat indicators, DNSBL entries, feed configurations, events, audit records, integration credentials/references, approvals, and jobs;created_by_subject_id/updated_by_subject_idwhere an operator or service identity acts;participant_idonly where a domain workflow genuinely has a participant distinct from the authenticated subject;Integrity and transactions
Tenant isolation
BYPASSRLS.FORCE ROW LEVEL SECURITYwhere owner access could otherwise bypass isolation.Reliability and recovery
RED → GREEN verification
Acceptance criteria
Boundaries
References