Users, roles and single sign-on

Roles
| Role | May |
|---|---|
VIEWER | read everything: queues, messages (sensitive values hidden), history, audit log, alerts and rules |
OPERATOR | everything a viewer may, plus replay, park, discard, purge, export, publish, notes, replay rules, and showing hidden values of one message |
ADMIN | everything an operator may, plus alert rules and channels, users and the licence |
In Community every user is an admin; roles separate support from on-call in Team and Pro.
Local users
Users (g u) creates accounts, changes roles, disables and re-enables them and resets passwords; everyone can change their own password. Users from the configuration (warren.users, or WARREN_ADMIN_USERNAME and WARREN_ADMIN_PASSWORD) are only created on the first start; after that the UI is in charge.
Single sign-on with OIDC (Pro)
Sign in through Keycloak, Entra ID, Okta or any other OIDC provider, with roles taken from a claim:
warren:
oidc:
enabled: true
issuer-uri: https://login.example.com/realms/platform
client-id: warren
client-secret: ${OIDC_CLIENT_SECRET}
roles-claim: roles
role-mapping:
mq-admins: ADMIN
mq-oncall: OPERATOR
default-role: VIEWER
username-claim: preferred_username
Register https://<warren>/login/oauth2/code/oidc as redirect URI at the provider.
Warren reads the roles claim from the ID token and the userinfo response, not from the access token, so the provider has to put the roles there:
| Provider | Set up | roles-claim |
|---|---|---|
| Keycloak | on the client: Client scopes → warren-dedicated → Add mapper → By configuration → User Realm Role, token claim name roles, Add to ID token on | roles |
| Entra ID | app roles on the app registration, assigned to users or groups; Entra puts them in the ID token | roles |
| Okta | a groups claim on the app's sign-on settings, which goes into the ID token | groups |
Keycloak's own realm_access.roles is only in the access token by default; with it every user signs in with the default-role. Local users keep working next to SSO; the login page offers both. Without default-role, users with no mapped role cannot sign in.