You are reading the documentation of OpenCTI 7.260811 LTS · 7.260811.0-lts.1, supported until 2027-09.Latest is 7.261119.0 →
How-to guide

Sign in the first time and keep an emergency account

Set the bootstrap admin of OpenCTI, OpenAEV and XTM One, and the admin token of OpenCRQ, sign in the first time, and keep a local account that still works when single sign-on fails.

OpenCTIOpenAEVOpenCRQFor platform engineers and administrators

Each platform of the XTM stack creates its first administrator from .env: the bootstrap admin. This page explains how the three bootstrap admins behave, how to sign in the first time and change their passwords, and how to keep one of them as a break-glass account, a local account that still works when single sign-on (SSO) is down. OpenCRQ has no bootstrap admin: its users sign in through XTM One, and its optional admin token works on its API only. Configuring SSO itself is in Configure single sign-on.

HOSTSERVICESPLATFORMSAT THE CENTER.envOPENCTI_, OPENAEV_,XTM_ONE_ADMIN_*Services calling the platformsWorker, connectors, collectors,injectors, XTM ComposerOpenCTIEmail, password, tokenOpenAEVEmail, password, tokenXTM OneEmail, password
  1. .env → OpenCTI: every start
  2. .env → OpenAEV: every start
  3. .env → XTM One: every start
  4. .env → Services calling the platforms: admin tokens
  5. Services calling the platforms → OpenCTI: calls
  6. Services calling the platforms → OpenAEV: calls
At every start, each platform resets its bootstrap admin to the values of .env, and the services that call the platforms read the same tokens

Before you start

The bootstrap admins

PlatformVariables in .envPassed to the platform asRules
OpenCTIOPENCTI_ADMIN_EMAIL, OPENCTI_ADMIN_PASSWORD, OPENCTI_ADMIN_TOKENAPP__ADMIN__EMAIL, APP__ADMIN__PASSWORD, APP__ADMIN__TOKENA valid email address and a UUID token. OpenCTI does not start while the password or the token is ChangeMe
OpenAEVOPENAEV_ADMIN_EMAIL, OPENAEV_ADMIN_PASSWORD, OPENAEV_ADMIN_TOKENThe same namesA valid email address and a UUID token
XTM OneXTM_ONE_ADMIN_EMAIL, XTM_ONE_ADMIN_PASSWORDADMIN_EMAIL, ADMIN_PASSWORDThe admin email of OpenCTI and OpenAEV: XTM One matches users by email. A password of 72 bytes at most

Every platform applies these values again at every start: it creates the admin the first time, then resets its email and password, and for OpenCTI and OpenAEV its token, to the values of .env. Three consequences:

  • A password changed in the interface lasts until the next restart. Change it in .env.
  • Anyone who can read .env and restart the stack can take over the admin accounts. Keep .env readable by its owner only (chmod 600 .env) and out of version control.
  • In xtm-docker, the admin tokens are also the credentials of the services that call the platforms: the OpenCTI worker and connectors, the OpenAEV collectors and injectors, XTM Composer, and the link between OpenCTI and OpenAEV. They all read the same variables of .env, so they follow a change of token.

OpenCRQ

OpenCRQ keeps no password and has no sign-in form: XTM One signs its users in, and the account of XTM_ONE_ADMIN_EMAIL is its super administrator. See Sign in to OpenCRQ.

APP__ADMIN__TOKEN on the opencrq service is a token for the API, the counterpart of the admin tokens of OpenCTI and OpenAEV. It signs nobody in to the interface. xtm-docker sets it from OPENCRQ_ADMIN_TOKEN of .env, which init-env.sh draws as a UUID version 4.

APP__ADMIN__TOKENWhat OpenCRQ does
UnsetBoth uses below are off. /api/xtm/peer-tokens answers 404
A UUID version 4A request with Authorization: Bearer and this token acts as the service account Deployment admin token, which OpenCRQ creates in the Admin group of the initial tenant, the tenant of INITIAL_TENANT__ID. The token also opens /api/xtm/peer-tokens, where a deployment manager gives another XTM module a service account and a token in that tenant, and /api/xtm/peer-tokens/revoke
Another valueOpenCRQ does not start, and names the key

OpenCRQ applies it at every start, like the other platforms: it creates or updates the Deployment admin token account, and keeps no copy of the token, so a new value replaces the old one at the next start. The initial tenant is the one OpenCRQ creates at its first start, as Configure OpenCRQ describes. If it does not exist when OpenCRQ starts, OpenCRQ refuses the token on the API. After the initial tenant was deleted, the next start recreates it, with the same identifier, only when no tenant is left: the token then works again. While other tenants remain, it is not recreated, and the token stays refused.

To cut the token off the API at once, choose Disable for the Deployment admin token service account of the initial tenant: see Let integrations sign in with service accounts. No restart is needed, and a restart does not enable it again. The account does not guard /api/xtm/peer-tokens: only unsetting APP__ADMIN__TOKEN and restarting OpenCRQ closes it.

Sign in the first time

  1. Read the admin accounts in .env.

    grep -E '^(OPENCTI|OPENAEV|XTM_ONE)_ADMIN_(EMAIL|PASSWORD)=' .env
    
  2. Open each platform at its public URL, http://localhost:8080 for OpenCTI, http://localhost:8081 for OpenAEV and http://localhost:8090 for XTM One with the values of .env.sample, and sign in with its email and password.

    Check that it worked

    Each platform opens with the admin signed in.

Change an admin password

  1. Set the new password in .env. For OpenCTI:

    NEW=$(openssl rand -hex 24)
    sed -i.bak "s/^OPENCTI_ADMIN_PASSWORD=.*/OPENCTI_ADMIN_PASSWORD=${NEW}/" .env
    

    Use OPENAEV_ADMIN_PASSWORD or XTM_ONE_ADMIN_PASSWORD for the other platforms.

  2. Recreate the container so that it reads the new value.

    docker compose up -d
    
    Check that it worked

    After the platform is healthy again (docker compose ps), the new password signs you in and the old one is refused.

Keep a break-glass account

When users sign in through SSO only, an outage, a misconfiguration or an expired certificate of the identity provider locks everyone out, administrators included. A break-glass account is a local administrator kept for that case, and used only then. The bootstrap admin is that account: its password is in .env, and the platforms apply it at every start.

To keep it usable, leave local authentication on next to SSO. The sign-in page then shows the email and password form with the SSO buttons. Regular users sign in through SSO; the bootstrap admin uses the form when SSO fails.

WHO SIGNS INSIGN-IN PAGECHECKED BYRegular usersEvery dayBootstrap adminBreak-glass account, password in .envSSO buttonsOne per providerEmail and password formLocal authentication left onIdentity providerCan be down or misconfiguredLocal accountsBootstrap admin from .env
  1. Regular users → SSO buttons: sign in
  2. Bootstrap admin → Email and password form: when SSO fails
  3. SSO buttons → Identity provider: checks
  4. Email and password form → Local accounts: checks
Regular users sign in through single sign-on, and the bootstrap admin keeps the local form for the day single sign-on fails
OpenCTI

Local authentication is the Local strategy of Settings, then Security, then Authentications. Leave it enabled. OpenCTI refuses to disable it while no other strategy is enabled.

The sign-in form checks an email and a password against each enabled LDAP provider first, then against the local accounts. The bootstrap admin is the exception to the Local switch: OpenCTI accepts its email and password even while Local is disabled. The sign-in page shows the form only while Local or an LDAP provider is enabled. So with an LDAP provider in place, the bootstrap admin can still sign in through the form when the directory is down.

If local authentication was disabled and SSO no longer works:

  1. Add this variable to the opencti service in docker-compose.override.yml, as Change the stack without editing docker-compose.yml describes:

    services:
      opencti:
        environment:
          - APP__AUTHENTICATION__FORCE_LOCAL=true
    
  2. Run docker compose up -d. At start, OpenCTI turns local authentication back on and logs [MIGRATION-SAFETY] No other provider available, forcing local_auth to enabled, at the warn level: xtm-docker sets APP__APP_LOGS__LOGS_LEVEL=error, which hides it.

  3. Sign in with OPENCTI_ADMIN_EMAIL and OPENCTI_ADMIN_PASSWORD, fix the SSO strategy, and check that the Local strategy is enabled.

  4. Remove the variable from docker-compose.override.yml, then run docker compose up -d again.

OpenCTI also turns local authentication back on by itself at start when no other way to sign in is usable, for example after the Enterprise Edition license that SSO needs has expired.

Warning

APP__ADMIN__EXTERNALLY_MANAGED=true locks the bootstrap admin at every start. Set it only if another administrator can always sign in: it removes the break-glass account.

OpenAEV

Local authentication is a setting of the platform, OPENAEV_AUTH-LOCAL-ENABLE. xtm-docker sets it to true in the openaev service. Keep it when you enable SSO with OPENAEV_AUTH-OPENID-ENABLE=true or OPENAEV_AUTH-SAML2-ENABLE=true: the three settings are independent, and the sign-in page shows the form above one button per SSO provider.

If local authentication was turned off, set OPENAEV_AUTH-LOCAL-ENABLE=true again in the openaev service of docker-compose.override.yml, run docker compose up -d, and sign in with OPENAEV_ADMIN_EMAIL and OPENAEV_ADMIN_PASSWORD.

XTM One

Local authentication is the Local Authentication switch in Settings > Access and security > Authentication of XTM One, on by default. While it is off, nobody can sign in with a password: leave it on to keep the bootstrap admin as a break-glass account.

At every start, XTM One also gives the XTM_ONE_ADMIN_EMAIL account back the administrator role and re-enables it, so an account disabled or demoted in the interface works again after a restart. When XTM Hub decides who is an administrator of XTM One, it never demotes this account.

Its email cannot be changed in My Profile: whoever holds that address is the platform administrator, so XTM One refuses the change. To use another address, change XTM_ONE_ADMIN_EMAIL in .env and run docker compose up -d: XTM One then creates a new admin account with that address, and leaves the account of the previous address as it was.

OpenCRQ

OpenCRQ has no local account to keep: Sign in with XTM One is its only way in, and the account of XTM_ONE_ADMIN_EMAIL is its super administrator. The break-glass account of XTM One is therefore the one of OpenCRQ too: once it has signed in to XTM One with its password, it opens OpenCRQ.

When XTM One does not answer, the sign-in page of OpenCRQ shows XTM One is unavailable and nobody can sign in to the interface until XTM One is back. The token of APP__ADMIN__TOKEN does not depend on XTM One and still works on the API: see OpenCRQ.

Tip

Store the passwords of the bootstrap admins in your secret store, with the procedure to use them, and review the audit logs after each use.

What's next

NextTrust your certificate authority and proxy
Deploy
Install, configure, secure, scale and upgrade the platform.

Published

Overview
Run the XTM platform locally
OverviewDeploy with an AI agent