Roles and groups
Roles are the names your rules are written in - BILLING, BILLING_ADMIN, OPS. Groups are how people get them.
The split is deliberate: the catalogue is gateway-wide, the groups belong to a tenant. One vocabulary for the whole installation, assembled differently for each tenant.
The catalogue
Application > Roles. A role has a name, unique across the installation, a description, optional tags, and at most one parent.
Role names are also written into route rules, so they are restricted to letters, digits, - and _. A role whose name breaks that is refused when a route tries to use it.
A parent implies its children. Holding a parent role grants it and everything below it, all the way down:
BILLING
BILLING_ADMIN
OPS
Someone holding BILLING satisfies a rule asking for BILLING_ADMIN. Someone holding OPS satisfies neither. Grant the top of a branch to grant the branch, however deep it goes.
A role cannot become its own ancestor - a cycle is refused. Deleting a role lifts its children to the top level instead of deleting them with it, and removes the role from every group that held it. A role marked system in the list is one the product itself relies on, and cannot be deleted at all; a role you create never carries that mark.
Tags are free classification - one per microservice, say - and they travel with the role where expressions can read them. They have no effect on access decisions.

Groups
A group belongs to one tenant and holds a set of roles from the catalogue. Its name is unique within that tenant. A member of the tenant is then assigned groups, and their roles are the roles of those groups.
Nothing else grants a role. There is no role on an account, and no role outside a tenant:

One group at a time, or all of them
Each tenant chooses how its groups combine:
| Mode | What it does |
|---|---|
| Cumulative (the default) | every group the person is assigned counts at once |
| Exclusive | one group applies, chosen at sign-in |
Exclusive mode exists for the case where somebody wears two hats in the same tenant and the two must not be worn together. When it is on and the person has more than one group, they are sent to /select-group, and they may switch later from the user button. An exclusive session that has not chosen carries no roles - the same rule as no tenant.
There is no installation-wide default for this: it is a property of the tenant, and a tenant that says nothing is cumulative.
How effective roles are computed
On every request, for the account, the active tenant and the active group:
- take the groups assigned in this tenant - or only the active one, in exclusive mode;
- take the roles of those groups;
- expand each role down the hierarchy, adding every descendant;
- sort, drop duplicates.
The result is what route rules and endpoint rules are answered against, and what is forwarded upstream with the identity - so your service receives the expanded list and never has to know the hierarchy.
The computation is remembered for a few seconds per account, tenant and group. A role granted or withdrawn therefore takes effect within seconds, without signing anyone out.
Letting an upstream authority decide
Group assignments can be placed by hand, or projected from what an external authority reports: a directory group, a GitHub team, a claim from an identity provider. A rule maps one reported group to one group of one tenant, and runs on every external sign-in - so membership follows the directory rather than a spreadsheet.
A rule only ever manages what a rule placed. A membership or a group an administrator assigned by hand is never removed by a rule, and a rule that would match everything is refused.