Authentication
Clerk-issued JWTs verified with RS256 via JWKS. A short-lived access token on every request; refresh happens at the edge, never the driver layer. Token revocation flags are wired through so an admin can sever a session without waiting for natural expiry.
Multi-tenancy
One tenant per agency, with sub-tenants for branches and desks. Tenancy is a first-class column on every domain object — queries, audit rows, and driver invocations all carry tenant_id and are isolated at the data plane.
Credential vault
Per-tenant credentials (GDS, accounting, payment gateways, portal sessions) are stored under envelope encryption with per-tenant KMS keys. BYO-key is supported at the vault interface for enterprise tenants that require it.
RBAC on approvals
Roles include agent, senior_agent, accountant, admin, and auditor. Approval workflows are configurable: 'issue_ticket above ₹X requires senior_agent', 'post_journal_entry always requires accountant confirmation'. Scope is per-domain and per-action, not global.
Audit log
Every side-effect tool call records actor, tenant, inputs, outputs, the driver invoked, approvals, and timestamps — append-only, exportable for CA/auditor review. Auth failures are rate-limited and written to the same stream so brute-force attempts are investigable.
Data residency
Residency is abstracted for both Indian DPDP Act compliance and GDPR-ready expansion. Tenant data, credentials, and audit rows have declared residency zones; the platform refuses cross-zone reads unless the tenant explicitly opts in.