Single sign-on with OIDC and SAML
Sign in through the identity provider you already run.
In the adminSingle sign-on

OpenID Connect
quilzo oidc configure --provider google --domain example.com
quilzo oidc configure --provider microsoft --tenant TENANT
quilzo oidc configure --issuer https://idp.example.com --client-id ID
quilzo oidc checkA sign-in finishes only in the browser that started it: starting one sets a cookie the provider's answer must come back with, so a sign-in somebody else began cannot be completed in your browser to put you in their account.
SAML
quilzo saml presets
quilzo saml add okta --metadata metadata.xml --url https://quilzo.example.com --preset okta
quilzo saml add okta ... --fingerprint SHA256 # trust its key, once you have checked itPresets: Okta, Microsoft Entra, Google, JumpCloud, OneLogin, PingOne, AD FS and Keycloak. Single sign-on can be required, with named break-glass accounts that keep working when the provider does not. A requirement holds on every request, not only at the sign-in form: a session that did not come through the provider is refused, whichever way it was made.
Only addresses the provider verified
SAML has no word of its own for an address the provider has checked. Name the attribute the provider says it in, and a sign-in as an address it does not say true about is refused:
| To | Run |
|---|---|
| Refuse an address the provider has not verified | quilzo saml add NAME --metadata F --url U --preset keycloak --verified-attribute email_verified |
| Take addresses as the provider sends them, verified or not | quilzo saml add NAME ... --allow-unverified-email |
- Give one or the other. With neither, a provider that sends
email_verifiedsaying anything but true is still believed, and the sign-in is refused; one that says nothing is taken as sent. - Only an address is asked about. A provider that signs people in by a username (
--principal attribute:uid) or an opaque NameID is not. - A Keycloak user can change their own address and leave it unverified, so the Keycloak preset asks for
email_verifiedby itself. Keycloak sends it only when a mapper does: in the client, add a User Property mapper, propertyemailVerified, SAML attribute nameemail_verified.quilzo saml presetssays where. - On the screen, each provider's card says under Addresses which it takes, and Add one › Rules has Take addresses as the provider sends them, verified or not.
A provider added before its preset asked for the attribute goes on taking addresses as sent, because asking for it unannounced would refuse everybody until the provider sends it. The security posture names it (sso.unverified-addresses). Once the provider sends the attribute, add it again: quilzo saml add NAME ... --replace --verified-attribute email_verified.
An identity provider on your own network
An OIDC issuer and a SAML metadata address are fetched by this server, so they are held to the rule for every address somebody chose: public, never this machine or the network it is on. An identity provider on the organisation's own network, such as Keycloak, AD FS or Authentik, is reached only where sso.reach names its range:
quilzo config set sso.reach 10.20.0.0/16 --accept-risk "Keycloak runs on the internal network"
- Name the smallest range that holds it, or its one address. Only private ranges and this machine can be named: never link-local, where cloud metadata lives, and never a public range.
- It opens sign-in's own connections, its discovery, keys, token exchange and SAML metadata, and nothing else.
- It is a weaker setting, so it takes a reason, which is recorded, and a second administrator approves it.
quilzo posture scanreports it until it is changed back or renewed. - An address refused by
oidc configure,saml addor the metadata address on the Single sign-on screen says how to reach it.
When a sign-in counts as two factors
A single sign-on counts as two factors only when the identity provider says so, about a sign-in no older than session.max. Anything else is one factor: the session waits at Confirm it's you for the person's passkey. Somebody without a passkey here is given a link that adds one.
| Provider | Counts as two factors when | To set up |
|---|---|---|
| Microsoft Entra ID, OIDC | the ID token's amr names mfa | In the app registration, Token configuration › Add optional claim › ID: add amr and auth_time |
| Google, OIDC | Google's amr names mfa, which it says for verified apps | Nothing; otherwise people confirm with a passkey here |
| Okta, Auth0 and others, OIDC | amr names mfa, or acr is a value you name | quilzo oidc configure ... --mfa-acr urn:okta:loa:2fa:any, if you want it asked for |
| Keycloak, OIDC | acr is a level you name, or amr names mfa | Map levels to acr, or add the AMR mapper, and name the level: --mfa-acr 2 |
| Okta, SAML | the attribute amr holds mfa | In the app's attribute statements, add amr with the value session.amr |
| JumpCloud, OneLogin, PingOne, Keycloak, SAML | the assertion's context is https://refeds.org/profile/mfa | Have the provider send that context for this app when it used a second factor |
| Microsoft Entra ID, AD FS, SAML | the authnmethodsreferences attribute holds multipleauthn | Entra: add the optional claim amr with the property include_granular_amr |
| Google Workspace, SAML | never: Google does not say | Nothing; every sign-in is confirmed with a passkey here |
A SAML sign-in asks the provider for nothing: one that cannot meet a requested context refuses the sign-in. An OIDC sign-in asks for one no older than session.max (max_age), and for amr and auth_time by name where the provider reads the claims parameter. quilzo oidc check says whether it does, and quilzo oidc status what your provider needs.
Signing out, and refusals
Signing out ends the session here. The session at the identity provider is its own and goes on, so signing in through it again may not ask for a password, and the sign-in page says so afterwards. For an OIDC sign-in whose provider has a sign-out address, it offers to sign out there too, and the Sign out? page (see how long a sign-in lasts) offers Sign out here and at PROVIDER beside Sign out. A SAML sign-in is offered neither: Quilzo sends no SAML sign-out, so sign out at the provider.
A refusal says why:
- Plain http is refused in the words of what the connection is for: an identity provider's metadata and keys decide who signs in, and over plain http anyone on the path chooses them.
- A SAML response that was refused is said once, naming the provider: The response from Keycloak was refused, and the reason.
quilzo oidc statussays whetherQUILZO_OIDC_SECRETis set in this shell.quilzo servereads it from its own environment and does not start without it, so set it where the server starts.
When the identity provider ends a session
A session made by single sign-on is Quilzo's own: the provider vouches once, and the hours after that are local. So when the provider ends somebody's session, sees their password stolen or disables their account, nothing reaches the session already open here unless the provider says so. Its security event stream (OpenID Shared Signals: CAEP and RISC) is how it says so, and Quilzo receives it at POST /sso/signals on the admin.
| To | Run |
|---|---|
| Give the stream client's secret, which is never stored | export QUILZO_SIGNALS_SECRET=... |
| Connect a provider that publishes a stream API | quilzo signals connect --provider oidc --client-id quilzo-stream |
| Connect a stream made in the provider's own console | quilzo signals connect --provider oidc --jwks URL |
| Connect one for a SAML provider | quilzo signals connect --provider saml:NAME --issuer URL ... |
| See whether it works | quilzo signals status, or Sign-ins |
| Turn it off | quilzo signals off |
- The stream is bound to one way of signing in,
oidcorsaml:NAME, and its events reach only the sessions that provider signed in, unless it disables an account outright. - The provider pushes to
/sso/signalsat the origin of the OIDC redirect URI, or at the SAML provider's--url. That address has to be https and one the provider can reach. - With
--client-id, Quilzo asks the provider for the stream through its API, gives it a push secret it never shows, and asks it to verify. With--jwks, for a stream made in the provider's console, it prints the push address, the audience, the authorization and the events to ask for. The authorization is shown once and kept only as a digest. --issueris the OIDC issuer unless given, and is required forsaml:NAME.quilzo signals offrefuses anything pushed after it and asks the provider to delete the stream, or says to delete it in the provider's console. The denies it added stay until the account is enabled or a person lifts them.
| The provider says | Quilzo does |
|---|---|
| session-revoked, sessions-revoked; credential-change (update, revoke, delete) | Ends that provider's sessions for them opened before the event was issued |
| credential-compromise, account-credential-change-required | The same; every other session they had open then must confirm it is them; the security contact is told |
| account-disabled, account-purged | Suspends them as SCIM does: every token, every app they connected, and a deny over the whole site that passkeys and single sign-on refuse |
| account-enabled | Lifts the deny it added, and no other |
What keeps the stream from being turned against the site:
- Every event is a token signed by the provider's published key, for this receiver, and pushed with a bearer only the provider was given. Who it is about has to be somebody the access policy already knows; anything else is counted as unmatched and nothing is done.
- The last person who can grant access is never suspended this way: their sessions end and the security contact is told.
- At most twenty people an hour are acted on. An event about anybody else is answered 503 with a
Retry-Afterof when the hour is up, and is acted on when the provider sends it again. - An account-enabled or account-disabled older than what was last done about that person, or a copy of one already acted on, is refused and recorded as
signals.stale, so a replay cannot lift a newer suspension or suspend again somebody the provider has enabled since. - Once a day the server asks the provider to verify the stream, with
QUILZO_SIGNALS_SECRETfrom its own environment: set it whereverquilzo servestarts. The posture findingsignals.stream-silentreports a stream that has not answered for a day, and one made in the console, which cannot be asked. - The shield's
signalsfeature turns the endpoint off. It answers 503 with a time to come back, so a provider that retries sends the event again later.
One administrator connects it, with the authority to grant access: there is no rule to write, and every event only takes access away. Each act is in the audit log as signals.sessions-ended, signals.step-up, signals.suspended, signals.restored and the like.