SSO migration from environment variables to UI
What OpenCTI 7.260224.0 does with the SSO configured in environment variables, and how to keep external secrets and sign-in access through the migration.
From OpenCTI 7.260224.0, single sign-on (SSO) is configured in the interface and is an Enterprise Edition feature. On its first start, the new version copies the authentications of the configuration file into the database. This page explains what is migrated, and how to keep secrets outside the database and keep a way to sign in.
- Configuration file → Migration at first start: read at start
- Migration at first start → Login providers: stores
- Local authentication → Authentications: sign in first
- Authentications ↔ Login providers: manage providers
- Secrets registry → Authentications: use external secret
| Version | |
|---|---|
| Changed in | OpenCTI 7.260224.0 |
What the migration does
When the platform starts, it reads the authentications of the configuration file, or of the environment variables, and stores them in the database. They stay in the configuration file. The platform then loads the authentications of the database, and users sign in with them as before.
| Configured before | Managed in the UI as |
|---|---|
| LDAP | LDAP |
| SAML | SAML |
| OpenID Connect | OpenID Connect |
| Auth0, Google, Facebook, GitHub | OpenID Connect |
| Client certificate | Client certificate |
| HTTP headers | HTTP headers |
Secret fields, such as an OpenID Connect client secret, a SAML private key or LDAP bind credentials, are read at migration time and stored in the database, encrypted.
A SAML configuration that did not set want_assertions_signed or want_authn_response_signed is migrated with both switches off: see SAML authentication to turn them back on.
If no other authentication is enabled before the migration, the migration enables local authentication. A Community Edition platform that had turned local authentication off still has a way to sign in.
Before you start
- Plan to sign in with local authentication right after the upgrade: keep it enabled, with an administrator account whose password you know.
- On a Community Edition platform, SSO stops working: sign in with local authentication, or request a trial license from XTM Hub. See Editions and licensing.
Keep secrets outside the database
Follow these steps if a secret must keep coming from an environment variable or a credentials provider such as CyberArk, instead of the database.
-
Before the upgrade, declare each secret in the secrets registry of the configuration.
- From an environment variable:
SECRETS__<NAME>__VALUE. - From CyberArk:
SECRETS__<NAME>__CREDENTIALS_PROVIDER__SELECTOR=cyberarkand the CyberArk variables of that secret.
See Manage login providers in the UI for the variables of each provider.
- From an environment variable:
-
Optional: to never store the secret in the database, remove it from the provider configuration before the upgrade, for example
PROVIDERS__OIC__CONFIG__CLIENT_SECRET. The migration then creates the provider with a placeholder. -
Upgrade and start the platform. The migration runs.
-
Sign in with local authentication and go to .
-
Open each migrated provider that should use an external secret. For each secret field, choose Use external secret, select the name you declared in step 1, and save. The platform now reads the value from the environment or from CyberArk when it loads the provider.
-
Sign in through each provider you changed.
Check that it workedThe SSO sign-in succeeds, and the provider shows no error in .
-
Turn local authentication off in if you no longer need it.
Remove the old configuration
After the upgrade, the configuration file still holds the authentications. If you delete a migrated authentication in the UI, the next start migrates it again and it reappears.
Once every user signs in as before, remove the authentications from the configuration file or the environment variables. Delete them in the UI only after that.
If the migration fails
If SSO worked before the upgrade and fails since, set app:authentication:force_env to true (APP__AUTHENTICATION__FORCE_ENV=true) and restart: OpenCTI signs users in with the providers of the configuration file again, deletes the providers stored in the database, and migrates them again at the next start without the setting. See If you are locked out for this and the other ways back in.
What's next
- Manage login providers in the UI, to manage the migrated authentications.
- Breaking changes, the other changes of OpenCTI 7.260224.0.
- Upgrade, the upgrade procedure.