Access is derived, never implied
Every read and write passes two independent gates: the security rules attached to the store, and the callable that owns the operation. Both derive the caller's membership instead of trusting the request.
Rules that start from deny
Both Firestore and Cloud Storage rules declare a global deny first and then add narrow exceptions.
- Tenant comes from the data
- Firestore collections are flat and tenant-scoped by an orgId field. Every predicate reads the stored orgId, and updates assert it cannot change.
- Roles are sets
- Memberships carry roleIds as an array. Gates are set intersections (hasAnyRole), never scalar equality.
- Platform admin is a claim
- platformAdmin is read from a custom claim with a false default, so a missing claim denies rather than errors.
- Storage is path-scoped
- Seven prefixes, each with an explicit writer, size limit and MIME allowance. Server-only prefixes cannot be written by a client.
Audit entries are chained
Each event stores its predecessor's hash, so rewriting or deleting history is detectable rather than silent.
The hash is sha256(prevHash || canonical(fields)) per scope (an organisation or the platform), with a monotonic sequence number. Before/after snapshots are persisted as hashes, not full documents.
A chain verification that fails raises the platform event AuditChainBroken.v1 and an operations alert — the failure is surfaced to operators, not hidden.
Payments settle, then grant
The browser never supplies price, recipient, token or policy. It selects a plan and a network, and echoes a quote for staleness checks.
- Server-side quote
- createPaymentIntent resolves the plan from the server catalog and always answers PENDING. No success shape exists on that path.
- Chain verification
- verifyEvmPayment and verifySolanaPayment read the chain, then validate amount, asset, recipient, confirmations and network against the intent.
- Replay protection
- Settlement derives a deterministic ledger document id per intent and transaction, so the same transfer cannot settle twice.
- Atomic grant
- Settlement writes the ledger entry, marks the intent SETTLED, grants exactly the plan's entitlements and extends the period inside one transaction. Any failure aborts all of it.
Secrets stay on the server
Integration credentials and provider keys are stored as Secret Manager versions; Firestore holds only resource references.
Disconnecting an integration destroys the stored secret version. Rotation is disconnect and reconnect, so an old credential cannot outlive the connection it belonged to.
Read the posture page
The security page lists the exact mechanisms, the controls that are opt-in per deployment, and what is deliberately not claimed.