Skip to content

Sessions and sign-in#

This page explains how long an Empowerment Center session lasts, when it closes by itself and how ECenter slows down whoever tries passwords. Everything is adjusted with environment variables or server properties.

Before you start#

  • Variables and properties are set in the server configuration (the environment file or your own application.yml; see Configuration). The server has to be restarted for them to change.
  • To see and close the open sessions, the operations console, with System administration (see Operations).

How users sign in#

On the sign-in screen the user types their User and their Password and clicks Sign in, or clicks Continue with … if the installation has an identity provider configured (see Single sign-on). The login is case-insensitive.

If the user or the password is not correct, or the user is not enabled, the screen only says “Incorrect user name or password.”: it does not reveal which of the two is wrong or whether the user exists.

The first administrator#

A new installation has no users. On startup, if the database has no users at all, ECenter creates one with System administration with the login and password of ECENTER_ADMIN_LOGIN and ECENTER_ADMIN_PASSWORD. After that those variables do nothing and can be removed. There is no fixed factory user or password.

Session duration#

Sessions are stored in ECenter's own database: they survive a server restart and are valid on any instance if there are several. The browser carries them in a SESSION cookie that the page's code cannot read (HttpOnly) and that is not sent from other sites (SameSite=Lax).

Variable Default What it does
ECENTER_SESSION_TIMEOUT 30m Time without activity after which the session expires.
ECENTER_SESSION_MAX_DURATION 12h Maximum duration since signing in, even if it is still being used. After that time, the next request ends the session and the user has to sign in again. 0 removes the maximum.

With SSO, signing in again after an expiry asks for nothing if the provider's session is still open.

Note

The sessions of a document embedded in another application and service credentials (API, MCP, SCIM) have their own duration rules. See Integrations.

When they close by themselves#

Besides expiry, ECenter immediately closes all of a user's sessions when:

  • they are disabled, locked or deleted;
  • their login is changed;
  • an administrator changes or sets their password (if the user changes it themselves from Change password…, the others are closed and they stay in the one they are using);
  • they lose System administration (by removing their role, removing it from their role or disabling them);
  • they lose a role that the identity provider gave them through a directory group.

The next request of that session receives an “unauthorized” and the user returns to the sign-in screen. Other changes to roles or privileges apply at their next sign-in.

Expired sessions and audit#

The server deletes expired sessions every minute and records in the audit a Session expired entry for each one, with the user. A session closed because of a change to its user that is used again is also recorded as Session expired, with the reason “It had been closed by a change to the user”, and not as a sign-out.

Property Default What it does
ecenter.security.sessions.cleanup-interval 1m How often expired sessions are deleted.
ecenter.security.sessions.cleanup-enabled true With false nobody deletes them: do not change it in production.

Sign-ins, sign-outs, failed attempts and expired sessions are queried in the Access category of the Audit.

Delay after failed attempts#

ECenter does not lock accounts after failed attempts: it imposes an increasing delay between attempts with the same login. This slows down whoever tries passwords without locking out the legitimate user.

With the default configuration:

  1. The first 3 consecutive failures have no delay.
  2. After the fourth, you have to wait 1 s before the next attempt.
  3. The wait doubles with each failure (2 s, 4 s, 8 s…) up to a maximum of 60 s.
  4. A failure from more than 1 h ago no longer counts. A success clears the failures.

While the wait lasts, the button on the sign-in screen stays disabled with the countdown (“Wait N s”) and the message says “Too many attempts in a row. You can try again in N s.”. Those attempts are not checked and do not lengthen the wait.

The delay:

  • goes by login, not by network address, because behind a proxy the address is not reliable;
  • applies equally to logins that do not exist, so as not to reveal which ones exist;
  • is valid for all instances, because failures are stored in the database;
  • does not affect signing in with the identity provider, which has its own controls;
  • also slows down whoever changes their own password: each wrong current password counts as a failure of their login.
Property Default What it does
ecenter.security.login-delay.free-attempts 3 Consecutive failures without delay.
ecenter.security.login-delay.initial 1s First wait.
ecenter.security.login-delay.max 60s Maximum wait.
ecenter.security.login-delay.reset-after 1h Time after which a failure is forgotten. It cannot be less than max.

As environment variables they are written in capitals, without hyphens and with underscores instead of dots: ECENTER_SECURITY_LOGINDELAY_FREEATTEMPTS, ECENTER_SECURITY_LOGINDELAY_MAX…

Each failure is recorded in the audit with its reason. Attempts rejected by the delay are recorded once per login and minute, so that a burst does not fill the log.

Tip

If a user says they cannot sign in and have to wait longer each time, check in the audit whether someone is trying passwords with their login. If you suspect an attack, lock the account from Users and roles and change its password.

The password#

  • It has to have at least 10 characters and at most 72 bytes (72 characters without accents, fewer if it contains accented letters).
  • It cannot be blank.
  • It is case-sensitive.
  • Only its hash (BCrypt) is stored, never the password.

A user administrator sets it (see Users) and the user can also change it, with Change password… in their account menu.

The passwords of users imported from EC7 are kept even if they do not meet this policy: it will be required when they change them.

See also#