Single sign-on
Probeward can let people sign in with your organisation's OpenID Connect provider (Keycloak, Dex, Authentik, or any other provider that publishes a discovery document). Local accounts keep working beside it. What single sign-on means for who sees what is in access control.
Setting it up
- At the provider, register a confidential client for Probeward with the authorisation code flow. Use the redirect URI shown in Settings, Single sign-on (it is the public URL followed by
/api/v1/auth/oidc/callback). Set the public URL first (Settings, Global) if it is not already right, because the provider only sends people back to that exact address. - In Probeward, open Settings, Single sign-on, and fill in:
- Issuer: the provider's issuer URL, exactly as it appears in its discovery document. It must be
https. - Client ID and client secret from step 1. The secret is stored in the credential vault and never shown again; leave the field empty later to keep it.
- Button text: the login page shows "Sign in with" followed by it.
- Scopes besides
openid, for exampleprofile,email,groups. - Username claim: the claim a new user's name is taken from (default
preferred_username, thenemail). - Groups claim: the claim listing the user's groups, if you want group mappings.
- Issuer: the provider's issuer URL, exactly as it appears in its discovery document. It must be
- Switch on Single sign-on is on and save, then sign out and use the new button on the login page to check it. Keep an administrator session open in another browser while you try it.
Who gets in
Users are matched by the provider's issuer and subject (sub), never by email address or name, so a renamed or re-mailed account stays the same Probeward user.
- Linking an existing user. In Settings, Users, open the user's Access and enter their subject at the provider under Single sign-on subject. From then on they can use either way to sign in.
- Just-in-time provisioning (Create accounts at first sign-in, off by default). When on, the first login of an unknown subject creates a user with no password, no global role and no grants. They see nothing until an administrator or a group mapping gives them access. When off, an unknown subject is refused.
- Disabled users are refused, whichever way they sign in.
Group mappings
A group mapping gives everyone in a provider group a role on a node of the tree, or on the root. Mappings are evaluated at every login: a user who has joined a group gets its grant, a user who has left loses it. Grants made this way show the group they came from in the node's Access panel and cannot be removed by hand; remove the mapping, or the user from the group at the provider.
Changes at the provider take effect at the user's next login, not before. To take access away at once, disable the user in Probeward.
Requiring single sign-on
With Require single sign-on ticked, password logins are refused for everyone except users marked break-glass (Settings, Users, the user's Access). Keep at least one break-glass administrator with a strong password and two-factor login, and store their details somewhere you can reach when the provider is down. Probeward refuses any change that would leave no enabled administrator able to sign in with a password while single sign-on is required.
A refused password login looks the same as a wrong password, so the login page does not tell anyone which accounts are break-glass.
Two-factor login and logout
Two-factor login (TOTP) applies to password logins only. For single sign-on the provider is responsible for the second factor.
Signing out ends the Probeward session only. The session at the provider is left alone, so the next click on the button may sign in again without a password prompt.
When something goes wrong
A failed single sign-on login returns to the login page with a short reason, and is written to the audit record (Settings, Audit) with the reason and the subject when one was known. The reasons:
| Reason | What it means |
|---|---|
provider_unavailable | The provider could not be reached. Password logins for break-glass users still work. |
provider_invalid | The provider's answer was not usable: its discovery document names another issuer, an endpoint is not https, or its key set is malformed. |
provider_refused | The provider refused the login or the code exchange; check the client id, secret and redirect URI. |
not_provisioned | The subject is not linked to a user and provisioning is off. |
user_disabled | The user is disabled in Probeward. |
state_unknown, browser_mismatch, login_expired | The login was not started in this browser, was used already, or took longer than ten minutes. Start again. |
wrong_issuer, wrong_audience, token_expired, token_not_yet_valid, nonce_mismatch, bad_signature, unknown_key, algorithm_not_allowed, malformed_token | The ID token failed a check. Usually the provider's clock or client configuration; a bad_signature that persists deserves a closer look. |
What is checked
The login uses the authorisation code flow with PKCE (S256), a random state and a random nonce. The state is bound to the browser that started the login by a cookie, is usable once, and expires after ten minutes. A callback that does not carry that browser's cookie is refused with browser_mismatch and does not use the state up: someone who learns or guesses the callback address cannot cancel the user's login, and the user's own browser can still complete it. The ID token must be signed with an asymmetric algorithm (RS256 to RS512, PS256 to PS512, ES256, ES384 or EdDSA; never none or a shared-secret algorithm), by a key in the provider's published key set, and carry the configured issuer, the client id as audience, the nonce, and an expiry in the future (one minute of clock leeway). When a token names a key Probeward has not seen, the key set is fetched again, so key rotation at the provider needs nothing here.
Connections to the provider use TLS with the system's trust store. For tests against a provider on the same machine, PROBEWARD_OIDC_ALLOW_HTTP_LOOPBACK=true allows a plain http issuer on a loopback address; never set it in production.
Audit
Configuration and group mapping changes, links between users and subjects, every login (and every refused one, with the reason), and grants added or removed by group mappings are in the audit record. Client secrets, codes and tokens never are.