Tarantool CE/EE Documentation portal logo
Support
Updated at November 27, 2026   11:08 AM

Migrating to TCM 1.12

TCM 1.12 removes the built-in keys: the password encryption key and the private key for signing data. TCM no longer substitutes them by default: you must set both keys in the configuration, otherwise TCM fails to start.

In addition, in TCM 1.12, cluster configuration drafts belong to users, and shared drafts from earlier versions are deleted after the upgrade.

If you upgrade from version 1.11.1 or earlier, complete the steps from this section:

Run the console commands in the following order while TCM is stopped:

  1. resign-data: sign the data with the new signature key.
  2. migrate-security: move the data to the new encryption key.
  3. resign-data: run it again if TCM has clusters with the integrity check enabled.

Also check the scripts that call TCM console commands: some commands now require keys. For details, see Console commands that require keys.

Cluster configuration drafts

In TCM 1.12, a configuration draft belongs to the user who saved it. Drafts saved in earlier versions have no known author, so they are deleted on the first read of the cluster drafts after the upgrade. The deleted files are logged to the TCM log.

To avoid losing unsaved work, do the following for each cluster before upgrading TCM:

  1. Open the Cluster > Configuration page.
  2. Apply the drafts that are ready to be used in the cluster.
  3. Download the files you need to keep working on after the upgrade. After the upgrade, copy the edits to the editor and save them as your own draft.

To learn more about working with drafts in TCM 1.12, see Saving a configuration draft.

Signature key

The built-in private key for signing data has been removed. At startup, TCM requires your own key set in the security.signature-private-key-file option.

To set the signature key:

  1. Generate an RSA private key in the PEM format. Store the key outside the repository and restrict access to the file:

    openssl genrsa -traditional -out /secure/path/private.pem 2048chmod 600 /secure/path/private.pem
  2. Set the path to the key in the TCM configuration file:

    security:  signature-private-key-file: /secure/path/private.pem
  3. If the TCM data was signed with the old built-in key, re-sign it with the new key. To do this, stop TCM and run the resign-data command with the configuration where the new key is already set:

    tcm --config=cfg.yml resign-data

    Do not start TCM until you move the data to the new encryption key (see Moving data to a new encryption key).

For details about data signing, see Integrity check.

Password encryption key

The built-in password encryption key is no longer substituted. The security.encryption-key option and the TCM_SECURITY_ENCRYPTION_KEY environment variable, which set the key as a string, have been removed.

Now the encryption key is set only in a file whose path is specified in the security.encryption-key-file option. The file must contain exactly 32 bytes. TCM fails to start without this option.

An example of creating a key file:

openssl rand -out /secure/path/new.key 32chmod 600 /secure/path/new.key

Moving data to a new encryption key

Cluster and LDAP passwords stored in the TCM storage are encrypted with the old key. To re-encrypt them with the new key, use the migrate-security command. The command runs offline: stop all TCM instances before running it.

The migrate-security command:

  • re-encrypts cluster and LDAP passwords with the new key using AES-GCM, including passwords that were already stored as AES-GCM under the old key;
  • revokes all API tokens and web sessions. After the migration, users must log in to TCM again, and API tokens must be issued again.

Command options:

Option
Description
--new-key-file
Required. The path to the file with the new 32-byte key
--old-key-file
The path to the file with the old key. Specify it if the old key was set by you, including as a string in the security.encryption-key option. If the option is not specified, the built-in key is used as the old key
--dry-run
Check the migration without changing data: the command verifies the keys and counts the records to be changed

The new key must differ from the old one.

To move data to a new encryption key:

  1. Stop all TCM instances.

  2. Back up the TCM configuration storage (etcd or TbCS).

  3. If your own key was used, prepare a file with it for the --old-key-file option:

    • if the key was set in the security.encryption-key-file option, use this file;

    • if the key was set as a string in the security.encryption-key option or the TCM_SECURITY_ENCRYPTION_KEY environment variable, write it to a file. For example, if the configuration contained:

      security:  encryption-key: "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6"

      create a file with this key:

      printf '%s' 'a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6' > /secure/path/old.keychmod 600 /secure/path/old.key

      The printf '%s' command does not add a trailing newline to the file. If the file contains extra characters, the key does not match the old one.

    If the built-in key was used, skip this step.

  4. Check the migration. Data is not changed, only the keys are verified.

    • If the built-in key (default) was used, --old-key-file is not needed:

      tcm --config=cfg.yml migrate-security --new-key-file new.key --dry-run
    • If your own key was used, pass its file in --old-key-file:

      tcm --config=cfg.yml migrate-security --old-key-file old.key --new-key-file new.key --dry-run

    Here new.key is the file with the new 32-byte key, old.key is the file with the old key.

  5. Run the migration — the same command without --dry-run:

    • for the built-in key:

      tcm --config=cfg.yml migrate-security --new-key-file new.key
    • for your own key:

      tcm --config=cfg.yml migrate-security --old-key-file old.key --new-key-file new.key
  6. Set the path to the new key in the TCM configuration file:

    security:  encryption-key-file: /secure/path/new.key

    If the configuration contains the security.encryption-key option, delete it.

  7. If TCM has clusters with the integrity check enabled, re-sign the data again:

    tcm --config=cfg.yml resign-data
  8. Start TCM:

    tcm --config=cfg.yml

Console commands that require keys

Since version 1.12, some TCM console commands read the encryption key, the signature key, or both. If the required key is not set in the configuration, the command fails with an error. The keys are set the same way as for starting TCM: in the security.encryption-key-file and security.signature-private-key-file options of the configuration file, environment variables, or command-line options.

Command
encryption-key-file
signature-private-key-file
tcm (starting TCM)
Yes
Yes
add-cluster
Yes
Yes
delete-cluster
Yes
Yes
user add
Yes
Yes
user delete
Yes
Yes
restore-admin
Yes
Yes
config export
Yes
Yes
resign-data
Yes*
Yes
change-password
No
Yes
role add
No
Yes
role update
No
Yes
role delete
No
Yes
migrate-security
No**
Yes

* The resign-data command requires the encryption key only if TCM has clusters with the integrity check enabled whose configuration is stored in etcd or Tarantool.

** The migrate-security command gets the encryption keys from the --new-key-file and --old-key-file options.

The version, downgrade, check-config, and generate-config commands do not require keys.