Which tenant a case belongs to, who may read it, and the one switch that closes the last gap — in the order it has to be done, because doing it backwards hides cases from the people who own them.
Every case carries an owning tenant, and that column is what decides who may read it.
| The case belongs to | Who can read it |
|---|---|
| Another tenant | Nobody but a superadmin. |
| Your tenant | You — still subject to HxGuard and case-level permissions as before. |
| No tenant at all | Everyone, unless you close it. See below. |
A case owned by somebody else answers 404, not 403. That is deliberate: a 403 would confirm to a stranger that the case exists, which is itself a fact worth protecting. The list endpoint applies the same scope to the count as to the page, because a total that ignores the filter leaks the same thing and makes paging lie about how much is there.
A case is rarely read on its own. Its documents, its event history, its captured notes, the questions people ask HxNexus about it — each of those is a separate route, and each used to decide access by asking only “does this operator have a relationship to this case?” That question has never had an opinion about tenants, so the answer could be yes for a case in somebody else’s.
The rule in the table above is now applied by the case gate itself, before any relationship rule is evaluated. Every route that hangs off a case inherits it — including the ones written next year.
| Asking about a case in another tenant | Answer |
|---|---|
| List or download its documents | 404 |
| Ask HxNexus about it | 404 |
| Read its event stream, its interpreter state, its AI proposals | 404 |
| Share one of its documents with the customer portal | 404 |
| Delete one of its documents | 404 |
Two notes for operators. First, this is not governed by VELARIS_CASE_HXGUARD_CASE_ENFORCEMENT. That setting decides how strictly case-level permissions are applied; setting it to off was never a decision to publish one tenant’s cases to another, so the tenant boundary holds in every mode. Second, a case with no tenant behaves exactly as it always has — visible to everyone — until you complete the two steps below.
One related fix worth knowing about if you upload documents through the API: the tenant_id and uploaded_by fields on POST /documents/upload are still accepted, and are no longer taken at face value. The uploader recorded is the authenticated caller, and a tenant_id naming somebody else’s tenant is refused with VEL-DOC-TENANT-403. Omit the field and the document simply inherits its case’s tenant. No Velaris client has ever sent either field.
tenant_id on a case is nullable, and a case with no tenant has always meant platform-shared: every version of Velaris to date shows such a case to every tenant. On a single-tenant install — which is most of them — that is invisible and harmless, because there is nobody else to show it to.
On an install with more than one tenant it is not harmless. A case that never got stamped is readable across the boundary.
Velaris does not change that behaviour when you upgrade. Closing it would mean hiding rows, and a rule that hides a case from the person who owns it is worse than the thing it fixes. So it is opt-in, in two steps, and the order matters.
Migration 197 stamps the owning tenant onto cases that never got one. It changes no schema, it is safe to run against a live database while the previous version is still serving traffic, and running it twice does nothing the second time.
It never guesses. A case is stamped only where ownership is genuinely derivable:
Anything else — several tenants, and a case whose type belongs to nobody — is genuinely ambiguous. A wrong guess would hand one organisation's case to another, so those rows are left exactly as they are.
The migration finishes by printing the only number that matters:
cases_still_without_a_tenant
0
When the backfill reports 0, set the switch and restart:
VELARIS_CASE_TENANT_STRICT_READS=true
Unset or false is the default, and is exactly how every released version behaves. Neither the setup script nor the update script sets it — a brand-new install's first administrator often has no tenant on their directory record yet, and switching this on for them would refuse the first case they try to create.
One further thing changes when strict reads are on: creating a case that would be stored with no tenant is refused with VEL-CASE-TENANT-403, rather than written and then invisible to the person who wrote it. If you see that error, the acting user has no tenant on their directory record, or the case type has no owner.
A case takes its tenant from the person creating it, and failing that from the case type. The user's tenant lives on their user directory record, so an account with that field empty creates cases that belong to nobody — which, on the default settings, means cases everyone can read.
If you run more than one tenant, the practical advice is short: make sure every account that creates cases has a tenant on its directory record, then run the backfill, then close the switch. Checking that first also spares you a round of VEL-CASE-TENANT-403 after you flip it.
An account that signs in without a tenant — a local login with no directory entry, or a service token — belongs to the default tenant. It sees default-tenant rows and shared rows, and nothing owned by another tenant. Only a superadmin crosses tenants.
Opening a single case always worked this way. Before 3.0.0, nine lists did not: cases, the user directory, escalation trees, connectors, channel conversations, PII findings and backup records showed such an account every tenant's rows, and two of them accepted ?tenant_id= to pick one. All nine now follow the same rule.
Each mailbox belongs to one tenant. A tenant's administrators see and use only their own mailboxes, messages and templates; the default outbound mailbox is chosen per tenant, including for scheduled emails and calendar invitations. A mailbox with no tenant belongs to the default tenant. Only a superadmin sees every tenant's mailboxes, or can move one between tenants.
A tenant administrator reads only their own tenant's PII findings and backup records. Other tenants' — and platform-wide backups — are visible to a superadmin only.
An inbound email is matched to a case only among the cases its mailbox's tenant may reach — by reply header, by the case tag in the subject, or by sender. Set a tenant on each mailbox that serves one; a mailbox with no tenant places mail only into default-tenant and shared cases, and anything it cannot place arrives as unmatched rather than lost.
The rules above began with cases. From v3.1.0 the same boundary holds on every route of every service. One guard maps each id in a request — in the path, the body or the query string — to the row it names and that row's owner. Another tenant's row is answered as 404, exactly as if it did not exist. Lists return the caller's tenant only.
It is kept true by a test, not by review: a probe seeds one row in every table for one tenant, then calls every route as another tenant's administrator and fails the build if any of them answers.
Some things act on the whole install and belong to no tenant: platform updates, the Database Manager, process traces, regions, marketplace sources, whole-install snapshots, and the logs that carry no tenant. These are for the platform operator — a superadmin, or an administrator of the default tenant.
Case types, forms, rules, data models and business calendars belong to the tenant that creates them. One with no tenant is a platform default that every tenant reads. A tenant that edits a default gets its own copy; the copy wins for that tenant from then on and is never overwritten. When the default changes later, the copy is marked Update available in Studio.
Only a superadmin can grant superadmin. An account that a tenant's administrator creates joins that tenant, and a tenant's administrator cannot read or change another tenant's accounts.
Superadmin retains its documented break-glass and reads across tenants regardless of the switch. That is the same rule the rest of the platform uses, and it is a deliberate choice: hiding data from the one account that exists to recover a broken install pushes people to the database instead, where nothing is logged.