Перейти к содержимому

Sign-in

People sign in to your instance with a username or with an email address. You choose one in the setup wizard or during the install with rexctl.

It can’t change once the first account exists.

People create an account with a username and a password, and never give an email address. Someone who forgets their password uses the recovery kit the app showed them, which sets a new password and gives them a new kit.

People create an account with an email address, a username and a password.

The instance sends email to confirm addresses and reset passwords. Until email works, you can create a reset link for someone.

People can sign in through your own identity provider, such as Authentik or Keycloak, over OpenID Connect. In the admin panel, open the “Single Sign-On (SSO)” card on the “Instance Config” page, fill in your provider’s details, register the “Redirect URI” it shows with your provider and turn on “Enable SSO”.

Squad needs the issuer URL, and for Microsoft Entra ID that’s your tenant’s issuer, https://login.microsoftonline.com/<tenant>/v2.0.

Register Squad there as a single-tenant app.

All URLs must use https. To use a provider on your own network, run rexctl config set sso.allow_private_addresses true or set FLUXER_SSO_ALLOW_PRIVATE_ADDRESSES=true.

When your provider runs on the same machine and the router doesn’t loop connections back, the API can’t connect to its public hostname, and sign-in fails after 10 to 15 seconds. Send Squad’s connections for that hostname to this machine. Then set FLUXER_SSO_ALLOW_PRIVATE_ADDRESSES=true, so that the API is allowed to connect to that private address on your network.

  • With Docker without rexctl, add --add-host auth.example.com:host-gateway to your docker run line, or extra_hosts: ["auth.example.com:host-gateway"] under the fluxer service in compose.yaml.
  • With Podman, add AddHost=auth.example.com:host-gateway to the [Container] section of the Quadlet file, then reload systemd and restart Squad.
  • Under systemd, add 127.0.0.1 auth.example.com to /etc/hosts.
  • With rexctl, rexctl doctor finds this, and rexctl doctor --fix does both for you. In one container, you can also add the entry yourself with rexctl config hosts add auth.example.com:host-gateway. rexctl then recreates the container.

On an email instance, Squad only takes an email address your provider marks as verified with email_verified. Entra doesn’t send that claim, so add the optional xms_edov claim to the ID token. In OneLogin, turn on email_verified. Squad can’t use signed userinfo responses, so turn off userinfo signing for the client at your provider.

With “Automatically provision users on first SSO login” on, someone new gets an account at their first sign-in, even when registration is closed. Finish the setup wizard first. Until then, a first sign-in through your provider stops with “Registration is closed on this instance”. Limit who gets in at your provider or with “Allowed Email Domains”.

In single-community mode, “Community Roles From Groups” maps your provider’s groups to roles, and someone loses every mapped role when the groups claim is missing.

Keycloak leaves it out for people in no groups, and Entra for people in too many.

You can also set single sign-on in fluxer.env, or under config in the Helm chart with the client secret in existingSecret. A value saved in the admin panel wins over both.

SettingAdmin panel
FLUXER_SSO_ENABLED“Enable SSO”
FLUXER_SSO_ISSUER“Issuer”
FLUXER_SSO_CLIENT_ID“Client ID”
FLUXER_SSO_CLIENT_SECRET, or _FILE“Client Secret”
FLUXER_SSO_SCOPE“Scope”
FLUXER_SSO_DISPLAY_NAME“Display Name”
FLUXER_SSO_AUTO_PROVISION“Automatically provision users on first SSO login”
FLUXER_SSO_ALLOWED_DOMAINS“Allowed Email Domains”
FLUXER_SSO_ENFORCED“Require SSO”

“Require SSO” turns off passwords, passkeys and local registration for everyone, the admin panel included. People who are already signed in stay signed in. To end their password sessions, use “Terminate All Sessions” on each account in the admin panel, or wait until the sessions expire. Turn it on only after an admin has signed in through your provider. While your provider is down, nobody can sign in, so set up a way back in first and test it.

  • With rexctl, run rexctl admins sign-in-link <admin> for a one-time link, or rexctl config set sso.enforced false.
  • Without rexctl, such as on Docker, Kubernetes or an install by hand, keep an Admin API key. Before you turn on “Require SSO”, create one under “Admin API Keys” in the admin panel with instance:config:update, and store it where you keep other emergency passwords. A key keeps working while SSO is required, and can turn “Require SSO” off with Update instance configuration.
Окно терминала
curl -X PATCH https://chat.example.com/api/v1/admin/instance/config \
-H "Authorization: Admin $ADMIN_KEY" -H "Content-Type: application/json" \
-d '{"sso":{"enforced":false}}'

Try that command once with true and once with false while your provider still works.

On a username instance, “Usernames come from your sign-in provider” (sso.username_from_provider) sets each person’s username from preferred_username at every SSO sign-in. Squad turns it into letters, numbers and underscores, up to 32 characters, so john.doe@corp.com becomes john_doe. When two people end up with the same name, whoever signs in first keeps it.

Turn off username editing at your provider, or anyone could take a free name here.

When an account already has someone’s email address, their first SSO sign-in links to it only if the instance sends email and the address is confirmed. Everyone else connects their account in the web app’s account settings, in a browser. On a username instance, ask people to connect before they sign in with SSO, or turn off automatic provisioning until they have, because signing in first makes a second account.

When you change the issuer while accounts are linked to the old one, Squad asks whether to move the links. Move them when it’s the same provider at a new address, and leave them for a different provider. With rexctl, add --migrate-identities or --no-migrate-identities to rexctl config set sso.issuer.

An SSO session lasts 30 days.

Someone you turn off at your provider loses access at their next SSO sign-in, or when their sessions are 30 days old. To remove them right away, use “Terminate All Sessions” on their account in the admin panel, or call Terminate user sessions from your offboarding script.

Squad supports OpenID Connect only, with no SAML and no SCIM. Your provider can’t create an account in Squad before someone’s first sign-in, and removing someone at your provider doesn’t delete their Squad account.

On a username instance, or an email instance without email, create a reset link for someone who has lost their password. On an email instance that sends email, people reset their own password from the link on the sign-in page.