Skip to main content
Version: 0.10

Account security

This page collects the rules that protect user accounts: how passwords must look, how sign-in failures are limited, how MFA is required and reset, and how long a session lasts.

Values marked default come from the deployment's configuration; a deployment can change them. The setting name is given for operators of a self-hosted deployment. Values without a setting are fixed in the product.

Password policy​

Every password must:

  • be 6 to 64 characters long;
  • contain at least one lowercase letter, one uppercase letter and one digit;
  • contain at least one of these special characters: ! @ # $ % & * ( ) _ + = | < > ? { } [ ] ~ -

The policy applies when a password is chosen: at self-registration, when accepting an invitation, when setting a new password from a reset link, and when changing a password. It is fixed in the product and cannot be configured. There is no password expiry and no password history; to make someone choose a new password, set Password Change Enforce on their account (see Tenants and users).

Password reset​

Forgot password? on the sign-in page asks for an email address. If an account exists for it, a reset email is queued with a link. The answer is the same whether or not the account exists, so the form cannot be used to find out which addresses have accounts.

RuleValueSetting
Link lifetime1 hour (default)platformConstants.passwordResetTimeoutSeconds
Uses per linkOnceFixed
Reset requests per email address5, then refused for 1 hour (default)passwordRecoveryMaxAttempts, passwordRecoveryLockoutSeconds

Setting a new password from the link signs the account out everywhere: every session it had is ended. If the account has MFA, the next step is still the MFA code.

Reset links need email delivery

Reset emails are only delivered when email sending is set up for the deployment, which is off by default. Without it the form says to check your email, but nothing arrives, and there is no way for an administrator to set a password for someone else.

Lockouts and rate limits​

Failed attempts are counted in memory on the server and lock the key out for a while. The lockout is measured from the most recent counted attempt, so pausing between guesses does not help. Restarting the backend clears every counter.

What is limitedCounted perLimit (default)Locked for (default)Settings
Failed sign-insEmail address1015 minutesloginMaxAttempts, loginLockoutSeconds
Failed sign-insSource address10015 minutesloginMaxAttemptsPerSource, loginSourceLockoutSeconds
Wrong MFA codes (sign-in, enrolment, turning MFA off)User515 minutesmfaMaxAttempts, mfaLockoutSeconds
Password reset requestsEmail address51 hourpasswordRecoveryMaxAttempts, passwordRecoveryLockoutSeconds
Sign-upsSource address101 hourregistrationMaxAttemptsPerSource, registrationLockoutSeconds
Invitations to an address that already has an accountInviting user101 hourinviteOccupiedMaxAttempts, inviteOccupiedLockoutSeconds
Confirmation email resendsAccount51 hourconfirmationResendMaxAttempts, confirmationResendLockoutSeconds

All settings are under platformConstants. A locked-out request is answered with "Too many failed attempts. Please try again later".

Details worth knowing:

  • A sign-in counts as failed for an unknown address, a wrong password and a blocked account alike, so the counters do not reveal which addresses exist.
  • A successful sign-in clears the email address's counter but not the source address's.
  • The source-address limit is set much higher than the per-email one because a whole office behind one address shares it. Only failures count towards it.
  • A wrong or malformed MFA code, and a wrong password when turning MFA on or off from the profile, all count towards the MFA limit.

CAPTCHA​

A deployment can require a CAPTCHA on the anonymous entry points. It is off by default and is configured with the captcha setting; the supported providers are Cloudflare Turnstile, Google reCAPTCHA (v2 or v3) and hCaptcha.

When configured, a CAPTCHA is required for:

  • every sign-up;
  • every password reset request;
  • a sign-in, once there have been 3 recent failures for that email address or from that source address (default, platformConstants.captchaLoginAfterFailures).

If the provider cannot be reached, the action is allowed by default (with a warning in the server log) so that an outage at the provider never locks people out; a deployment can choose to refuse instead.

MFA​

Velum Edge supports one second factor: a time-based six-digit code from an authenticator app. Users enrol from their profile.

Enforcing MFA​

An administrator sets MFA Enforce to Yes on a user's General tab. At the user's next sign-in, after the password, they must scan a QR code and confirm a code before they can do anything else. While MFA is enforced the user cannot turn it off.

Enforcement is per account; there is no organization-wide switch. Existing sessions are not affected until the user signs in again.

Sign-in order​

After a correct password, the session is held at the first step the account still owes, and the console shows the matching screen:

  • the MFA code, if a factor is enrolled (always first);
  • MFA enrolment, if MFA is enforced and no factor is enrolled;
  • email confirmation, if the address is not confirmed;
  • a new password, if Password Change Enforce is set.

Only when nothing is owed does the session become fully signed in. The API reports which step is owed, see Session states.

Resetting someone's MFA​

An administrator with User Management at Write can select Reset MFA on a user who has lost their authenticator. The factor is removed and all of that user's sessions end. See Resetting a user's MFA.

Changing or removing your own factor​

Turning MFA off from the profile needs both the password and a current code. Enrolling from the profile needs the password as well. To move to a new phone, turn the factor off and enrol again. Both actions end your other sessions.

Sessions​

Signing in sets a session cookie. The cookie is HttpOnly (scripts on the page cannot read it), Secure by default (sent only over HTTPS) and SameSite=Lax by default.

RuleValue
Session lifetimeSet by the deployment (cookieTimeoutSeconds); there is no product default
Lifetime counted fromSign-in. Activity does not extend it
Invitation and email-confirmation linksValid for the same lifetime
TODO

Add the session lifetime of the hosted service once confirmed. The product requires every deployment to set it and has no default.

What ends a session​

EventSessions ended
Log outThis session only. The server refuses its token from then on, wherever a copy of it is
Session lifetime reachedThat session
Changing your passwordAll your other sessions (you get a fresh one)
Setting a new password from a reset linkAll your sessions
Turning MFA on or off from your profileAll your other sessions (you get a fresh one)
An administrator's Reset MFAAll of that user's sessions
Accepting an invitation or confirming an email addressAll earlier sessions of that account
Deleting the accountAll of them

Two events do not end sessions:

  • Block user: every request is refused while the account is Suspended, but the sessions are not ended. If the account is unblocked before they expire, they work again.
  • Setting MFA Enforce or Password Change Enforce: they apply at the next sign-in.
API tokens are separate from sessions

None of the events above revokes a personal API token, except deleting the account. Blocking the account stops its tokens working while it is blocked. After a suspected compromise, revoke the user's tokens as well (the user does this from their profile).

Requests from other sites​

The server refuses any state-changing request a browser sends from another web site, so a page elsewhere cannot act with a signed-in user's cookie. See API overview for what this means for scripts.

See also​