Authentication

Search2o has built-in authentication with email and password. An administrator sets the session and password rules to the organization's requirements on the Admin › Authentication page. People can also sign in through your identity provider with single sign-on, alongside password sign-in or instead of it.

Sessions

A browser sign-in creates a session held in an HTTP-only cookie. The session ends after a period of inactivity, and in any case after a maximum lifetime; the defaults are one hour and twelve hours. A change to any of these affects a signed-in user only when that user signs in again. See Authentication in the REST API for how clients sign in.

Passwords

The password policy sets the length and the character classes a password must contain, and is enforced on every new password. Users can be made to change their password after a number of days. A password reset signs out every session of that user.

Restricting who can be added

With an allowed email domain set, only addresses in that domain can be added as users. The domain is best set before adding users beyond the founding team.

Emails and one-time codes

Two emails are sent: one when an administrator adds a user, and one when a person clicks New user / Forgot password on the sign-in dialog. Both are HTML templates that can be edited. The second carries a one-time code, valid for a set number of minutes and usable once; the person enters the code and chooses a password. The added-user email carries no code. A code requested for an address the account does not know produces a notification rather than an email.

Sign-in methods

Every account has password sign-in, and can add single sign-on beside it. Password sign-in can be turned off only once single sign-on is configured, so that an account always keeps a way to sign in.

FieldTypeDefaultDescription
cookieCookieModelCookie settings for user sessions.
integrationTokenMaxAgeDaysinteger365How long a token issued to an integration stays valid. Leave empty for tokens that never expire.
builtinAuthBuiltinAuthModelThe settings for signing in with an email and a password: the password policy, session lengths, and the emails sent to users. Every account starts with this, and keeps these settings even when single sign-on is the way in.
isBuiltinAllowedbooleantrueWhether users may sign in with a password. Turn it off only once single sign-on is configured and proven, or nobody can sign in. With it on beside single sign-on, both are offered.
ssoOidcAuthModel or Saml2AuthModelHow users of this account sign in with single sign-on, and the settings for that method. Empty means password sign-in only.

Password sign-in settings

FieldTypeDefaultDescription
passwordPasswordModelWhat a password must contain.
maxInactivityMinutesinteger240How long a session may sit idle before the user is signed out.
reauthenticateAfterMinutesinteger720How long a session lasts before the user must sign in again, however active they are.
emailCodeActiveMinutesinteger30How long a code emailed for a new user or a password reset stays usable.
mustChangePasswordEveryDaysinteger365How often users must choose a new password.
emailDomainstringOnly addresses in this domain may have accounts.
newUserEmailEmailFormatSent when an administrator adds a user.
forgotPasswordEmailEmailFormatSent when a user asks to reset their password.
FieldTypeDefaultDescription
key"search2o_session""search2o_session"The name of the session cookie.
path"/""/"The path the cookie is sent for.
httponlyTruetrueWhether the cookie is hidden from JavaScript. Leave on unless a client needs to read it.
max_ageinteger86400How long the cookie lives.
domainstringThe domain the cookie is valid for.
securebooleantrueWhether the browser sends the cookie only over HTTPS.
samesite"Lax" | "Strict" | "None""Lax"When the browser sends the cookie on cross-site requests.

Password policy

FieldTypeDefaultDescription
minLengthinteger8The fewest characters a password may have.
maxLengthinteger128The most characters a password may have.
minSpecialCharsinteger2How many special characters a password must contain.
minUpperinteger2How many uppercase letters a password must contain.
minLowerinteger2How many lowercase letters a password must contain.
minNumbersinteger2How many digits a password must contain.
passwordRulesstring"Minimum 2 each of lower, upper, number and special characters"Help text shown in the UI describing these rules.

Emails

FieldTypeDefaultDescription
subjectrequiredstringThe subject line of the email.
bodyHtmlrequiredstringThe body of the email, as HTML. This must be set.