Skip to main content
IntentLang
← All examples

TenantIsolation

examples/TenantIsolation.intent

TenantIsolation.intent
1# TenantIsolation.intent
2# Global invariants , system-wide laws that must hold across every feature and service,
3# not just one mission. A locally-valid change can still violate a global invariant.
4
5mission MultiTenantPlatform
6use product
7
8title "Keep every tenant's data and money strictly isolated and consistent"
9for PlatformSecurity
10
11goal
12 Serve many tenants from one system without any cross-tenant leak or inconsistency.
13
14why
15 A single cross-tenant leak or a lost ledger entry is catastrophic and unrecoverable trust damage.
16
17owner PlatformSecurity
18
19invariant TenantIsolation
20 statement one tenant's data is never visible to another tenant
21 scope global
22 applies_to
23 apis
24 events
25 databases
26 caches
27 logs
28 search
29 severity critical
30 because the entire multi-tenant promise rests on this one law
31 verify tenant isolation property test
32
33invariant CompletedPaymentHasLedgerEntry
34 statement every completed payment has exactly one ledger entry
35 scope global
36 applies_to
37 databases
38 events
39 severity critical
40 because a payment with zero or two ledger entries is a financial correctness break
41 verify ledger reconciliation test
42
43invariant EveryMutationIsAuthorized
44 statement no state-changing request runs without an authorization decision
45 scope global
46 severity critical
47 because an unauthorized mutation is the root of most breaches
48 verify authorization coverage test
Draft syntax. This file is illustrative and does not run yet.