Skip to content

Sessions, security and license#

The Empowerment Center configuration for users' sessions, the delay after failed attempts, the key that encrypts the secrets, service credentials, the license and what the sign-in screen shows. Users, roles, single sign-on and SCIM are explained in Security.

The secrets key#

ECENTER_SECRETS_KEY (ecenter.secrets.encryption-key) is a 256-bit AES key in Base64. It encrypts in the own database:

  • the passwords of the connections to the client databases;
  • the passwords, private keys and service keys of the remote file export destinations (Windows shared folders, SFTP servers, S3 buckets and Azure Blob containers);
  • the private key with which ECenter signs its own tokens (those of embedding and those of the headless browser).

It is generated with:

openssl rand -base64 32

Without it, or if it is not 32 bytes in Base64, the backend does not start.

If it changes or is lost, the backend starts anyway, but:

  • saved passwords cannot be decrypted: each connection shows “The saved password cannot be decrypted: enter it again.”, with Change password, and it cannot be used until it is typed;
  • nor can the credentials of the remote file export destinations: each one warns about it in the connection, and its files fail until it is typed again in Edit (see The credential);
  • the installation's signing key is replaced automatically by another; tokens in flight (5 minutes at most) stop being valid.

To change it on purpose: start with the new one and type again, in Administration › Connections, the password of each connection and the credential of each remote file export destination.

Warning

Keep the key separately and with the same protection as the backups of the own database. A backup of the database without the key does not decrypt the passwords, and whoever has both has the passwords of the client databases.

Sessions#

The application session is stored in the own database: it survives a backend restart and any instance finds it. It goes in the SESSION cookie, which the page's code cannot read (HttpOnly), with SameSite=Lax and, behind TLS, Secure.

Property Variable Default What it is
spring.session.timeout ECENTER_SESSION_TIMEOUT 30m How long an inactive session lasts.
ecenter.security.sessions.max-duration ECENTER_SESSION_MAX_DURATION 12h The maximum duration since signing in, even if it is still being used. 0, no maximum. With single sign-on, signing in again asks for nothing.
ecenter.security.sessions.cleanup-interval 1m How often expired sessions are deleted. Each one leaves its expiry in the audit.
ecenter.security.sessions.cleanup-enabled true Delete them automatically. With false nobody deletes them: do not change it.

In addition, some changes to a user (disabling, locking or deleting them, changing their login or password, removing System administration) close their sessions on all instances: the complete list is in Sessions and sign-in.

Embedding sessions have their own rules (see Services).

Delay after failed attempts#

After several consecutive failures with the same login, ECenter makes you wait before the next attempt (it does not lock the account). How it works, with what the user sees, is in Sessions and sign-in.

Property Default What it is
ecenter.security.login-delay.free-attempts 3 Consecutive failures without a delay.
ecenter.security.login-delay.initial 1s The first wait.
ecenter.security.login-delay.max 60s The longest wait.
ecenter.security.login-delay.reset-after 1h How long it takes for a failure to be forgotten.

While the wait lasts, POST /api/auth/login responds 429 with Retry-After and the code LOGIN_DELAYED, without checking the password. reset-after cannot be less than max, nor max less than initial.

The first administrator#

Property Variable What it is
ecenter.security.bootstrap-admin.login ECENTER_ADMIN_LOGIN The login of the first administrator.
ecenter.security.bootstrap-admin.password ECENTER_ADMIN_PASSWORD Their password: from 10 characters to 72 bytes.

They are only used if the own database has no user. See The first administrator.

Service credentials#

The credentials with which other applications enter ECenter without a session (the query API, the MCP, SCIM, embedding and the metadata exchange) always expire. How they are created is in Integrations.

Property Default What it is
ecenter.security.credentials.default-lifetime.<SCOPE> QUERY_API: 90d, MCP: 90d, SCIM: 365d, EMBED: 365d, METADATA_EXCHANGE: 90d The lifetime proposed when creating one.
ecenter.security.credentials.max-lifetime.<SCOPE> QUERY_API: 365d, MCP: 365d, SCIM: 730d, EMBED: 365d, METADATA_EXCHANGE: 365d The longest lifetime accepted.
ecenter.security.credentials.max-active-per-holder 10 Those valid at the same time for the same holder (to rotate them without interrupting the service).
ecenter.security.credentials.touch-interval 5m How often, at most, its last use is recorded.
ecenter.security.credentials.retention 180d How long revoked or expired ones are kept before purging them.
ecenter.security.credentials.expiry-notice 14d How far in advance the holder of an expiring personal credential is notified by email.
ecenter.security.credentials.maintenance-interval 1h How often it purges and notifies.
ecenter.security.bearer.public-url ECENTER_PUBLIC_URL The address for the links in the notices.
ecenter.security.bearer.access-audit-interval 1h How often, at most, the use of the same client is recorded in the audit (per instance).
ecenter.security.installation-keys.rotate-every 90d How often the key with which the installation signs rotates automatically (at least one day). The previous one keeps verifying for a while longer.

The scopes are QUERY_API (query API), MCP, SCIM, EMBED (embedding) and METADATA_EXCHANGE (metadata exchange).

SCIM#

SCIM user provisioning (/api/scim/v2) is configured in ecenter.provisioning.*. Its use is in Security.

Property Default What it is
ecenter.provisioning.scim.enabled true With false, /api/scim/v2 responds 404.
ecenter.provisioning.scim.allowed-addresses (any) The addresses (CIDR) from which it is accepted: the identity provider or its agent.
ecenter.provisioning.scim.max-results 200 The maximum of a page.
ecenter.provisioning.scim.max-filter-scan 10000 The users evaluated in memory with a filter that does not use an index. Above it, 400.
ecenter.provisioning.scim.max-payload 1MB The largest body accepted. Above it, 413.
ecenter.provisioning.activity-retention 30d How long the provisioning activity is kept.

Single sign-on#

Identity providers are added with the standard Spring Boot registrations (spring.security.oauth2.client.registration.<id> for OIDC and spring.security.saml2.relyingparty.registration.<id> for SAML), in your own application.yml, and ECenter adds for each one ecenter.security.sso.providers.<id>.*: the button text, the login attribute, the email attribute and whether signing out also closes the provider's session. All of this, with examples, is in Security.

The license#

Property Default What it is
ecenter.licensing.warn-days 30 How many days in advance it warns that the license expires.

The public keys with which licenses are checked are inside the application and are not configured. See The license.

The sign-in screen#

What the sign-in screen and About Empowerment Center show, without signing in:

Property Default What it is
ecenter.about.login-help ECENTER_LOGIN_HELP (empty) A help text, up to 500 characters.
ecenter.about.show-customer false Show the license's customer. It comes off because it is seen before identifying yourself.
ecenter.about.links (none) Up to 5 links in the footer (label and url), only http://, https:// or a path of the server itself.
ecenter:
  about:
    login-help: Trouble signing in? Call extension 1234
    links:
      - label: Legal notice
        url: https://intranet.example.org/legal-notice
      - label: Help
        url: https://intranet.example.org/ecenter

The language#

ECenter has five languages: Spanish (es), English (en), Catalan (ca), Basque (eu) and Galician (gl). Each user chooses theirs in Language…, in their account menu, and it is saved in their user. A user administrator can also choose it for them, when creating them or in their detail (Change the language), and so can the identity provider through SCIM with preferredLanguage (What is synchronized); the last one chosen wins.

Property Default What it is
ecenter.i18n.default-language ECENTER_I18N_DEFAULT_LANGUAGE (es) The language of the installation. Any value that is not one of the five prevents the backend from starting.

Who uses which language:

Who Language
A user with a session, also one who only uses the portal The one they chose; if they did not choose any, the installation's.
The sign-in screen The last one used in that browser; the first time, the installation's. It can be changed on the screen itself, and whoever signs in without a language of their own keeps the one they chose there.
Emails (subscriptions, data alerts, scheduling and operations notifications, credential expiry) That of each recipient. To an address that belongs to no user (the notice of a task or of the operational alerts), the installation's. If the recipients use several languages, one email goes out per language.
Exported files (PDF, Excel, “Applied filters”, the cover of a page's Excel) That of whoever requests them or, in a subscription or a data alert, that of each recipient. What the headless browser renders (the images in emails), in the same one.
Embedded content The one the host page asks for (language of the SDK or lang in the iframe address) or, if it asks for none, the installation's. Never that of the host's user. See Placing the iframe with the SDK.

Changing the language reloads the page. The translation files are served by the frontend at /i18n/<language>.json; if they do not arrive, the page comes out in Spanish.

The server's texts#

The warnings and errors the server writes (a name that already exists, a value that is not valid, a missing permission) come out in the language of the page that makes the request: the sign-in screen, the application or the embedded content say it in each request. Whoever calls the API without saying it receives them in their user's language and, without a user, in the installation's. The names of the privileges, of the privilege folders and of the roles the installation is born with (System administration, Portal user…) also come out in the reader's language as long as they keep their original name: an initial role that is renamed always shows the name it was given.

Some texts always stay in Spanish, the reference language:

  • The audit: what it records and what it exports, so that the log reads the same whoever the user is.
  • The MCP server: an assistant reads it, not a person.
  • The server log.

Messages that do not have a translation yet come out in Spanish in any language. In English the translation is complete; the terms it uses (workbook, segmentation, portal, metric) are those of its glossary, and whoever wants to check how it looks can sign in to the demo with the analyst user. Basque is also complete, with its own glossary (aztertzailea in the demo).

See also#