Multi-tenancy
Several customers, subsidiaries or departments often use the same internal applications, and must not see each other. Meerkat keeps them apart at the door: each one is a tenant, and every request is made in exactly one of them.
What a tenant holds
- Members, each an administrator or a user of that tenant, enabled or not.
- Groups, which grant roles from the gateway's role catalogue. A person's roles are those of their groups in the tenant they are working in.
- An owner, who need not be a member.
- Settings of its own: session lifetime, group mode, and in Enterprise its working hours. The group mode is cumulative (a member gets the roles of all their groups) or exclusive (the member picks one group at sign-in, a day shift or a night shift for instance).
An administrator of a tenant manages its members, groups and group rules from the console, and nothing outside it.

Turning several tenants on
You need the Enterprise or evaluation image, and an account with the root capability.
- Open Application, General (
/application/general) and turn on Several tenants. Off, a single tenant is managed under Application; on, each tenant is managed under Tenants. - In the rail, open Tenants, then New tenant: type its name, choose its Group mode (Cumulative or Exclusive), and click Create. An account with the tenant creator capability can do this step too, and owns the tenants it creates.
- In the new tenant, open Groups to create its groups and tick the roles each one grants, then Members to tick the accounts that join it, with the admin badge for those who administer it.
To check: sign in as a person who is a member of two tenants. The sign-in asks which one to work in, and the user button then offers to switch.

At sign-in
A person with one membership is placed in that tenant without a question. A person with several chooses one, and can change later from the user button. In Enterprise, a group rule can make a directory group, a GitHub team or an OpenID Connect claim a membership at each sign-in.

What your services receive
The tenant travels with the request, beside the identity and the roles, in the headers or the signed JWT the route sends. Route rules and per-endpoint rules are answered in that tenant. A service learns which tenant the caller works in as a fact, not as a parameter the caller chose.
For a route that sends a signed JWT with the facts username, email, roles, tenant and tenantid under those names, the service receives a payload such as:
{
"iss": "https://meerkat-internal.shop.svc.cluster.local:7443",
"sub": "usr_123",
"aud": "orders",
"iat": 1796083200,
"exp": 1796083320,
"username": "john",
"email": "jdoe@example.com",
"roles": "ROLE_A,ROLE_B",
"tenant": "Acme",
"tenantid": "tnt_123"
}
With the Headers mechanism, the same facts arrive as request headers under the names the route gives them, X-Tenant: Acme for instance.
Read more
- Tenants, in the documentation: memberships, the choice at sign-in, what a tenant can override, isolation.
- Roles and groups.
- Editions, and how to try Enterprise for free.