OT
OpenTeq
Start Free Trial
← All 4 Architecture Pillars
PILLAR 02

Forced Multi-Tenant PostgreSQL Row-Level Security (RLS)

Database-enforced tenant isolation with zero cross-tenant leakage.

Every tenant-scoped table in OpenTeq enforces ENABLE ROW LEVEL SECURITY and FORCE ROW LEVEL SECURITY, paired with composite tenant foreign keys and transaction-scoped SET LOCAL app.current_tenant_id binding.

10 / 10
RLS-Forced Tables
0%
Client Tenant Trust
Impossible
Pooled GUC Leakage

Technical Specification

SET LOCAL Transaction Scoping

withTenantTransaction executes SELECT set_config('app.current_tenant_id', $1, true) inside BEGIN...COMMIT so connection poolers never leak tenant state across requests.

Composite Foreign Key Guards

Cross-table references use composite keys like FOREIGN KEY (tenant_id, invoice_id) so even system jobs cannot accidentally link records across tenants.

Cache & Async Job Namespacing

All Redis/KV keys follow tenant:{tenantId}:{domain}:{key}, and background workers re-verify tenant ownership before mutating state.

Technical FAQ

Does OpenTeq ever trust tenant_id sent in a client request body?
Never. Client request Zod schemas explicitly omit tenantId; TenantContext is derived exclusively from verified JWT claims or API key lookups.

OpenTeq Agents Powered by This Pillar

#06 • WAVE 1Zero unbalanced journal drift

Real-Time Double-Entry Ledger Watchdog

Continuously audits zero-sum debit/credit balance and clearing account staleness.

ledger.audit.zero_sumledger.clearing.inspect+1 more
$899.00/moTenant
Specs
#18 • WAVE 2De-risks NetSuite go-live

ERP Cutover O2C Shadow-Run Validator

Compares legacy vs. target ERP AR balances and scans script conflicts pre-cutover.

cutover.ar_balances.comparecutover.script_conflicts.scan+1 more
$1,999.00/moTenant
Specs
#27 • WAVE 31-click SOX & SOC 1 audit bundle

SOX & Financial Audit Immutable Evidence Packager

Bundles immutable ledger lineage, webhook signatures, and RLS proofs for auditors.

audit.ledger_lineage.exportaudit.webhook_proofs.bundle+1 more
$1,299.00/moTenant
Specs

Ready to deploy autonomous Order-to-Cash across your NetSuite & Stripe Connect stack?

Start with a single Wave 1 agent or equip a complete role blueprint. Every tenant runs on forced PostgreSQL RLS and zero-sum double-entry accounting.