This page describes how to rotate the crypto secret of an already-deployed Seqera Platform instance via the cx-field-tools-installer project.
NOTE: This activity is not required for first-time deployments.
-
Mandatory Before Anything Else
- Go read the official Seqera documentation about this feature (TODO: Add link)
- Backup your existing database before implementing any change.
- If you have pre-existing database backups, capture the existing crypto secret and ensure you have a way to associate it with the relevant backups.
- Initiate an outage via
docker compose down.
-
Prepare Keys in SSM
-
In the omnibus file:
-
In line with all the other keys, add an entry that holds the previous key value (i.e. the value currently defined in the
TOWER_CRYPTO_SECRETblock):"TOWER_CRYPTO_PREVIOUS_SECRET": { "ssm_key": "/config/<REPLACE_ME_WITH_YOUR_APP_NAME>/tower/secret-rotation/previous-key", "value": "<POPULATE_WITH_CURRENT_VALUE_OF_SSM_KEY: /config/tower-template/tower/crypto/secretKey>" },
-
In line with all the other keys, add an entry activating the key rotation:
"TOWER_CRYPTO_ROTATE_KEYS": { "ssm_key": "/config/<YOUR_APP_NAME>/tower/secret-rotation/enabled", "value": "true" },
-
In line with all the other keys, add an entry specifying how many :
"TOWER_CRYPTO_ROTATE_CHUNK_SIZE": { "ssm_key": "/config/<YOUR_APP_NAME>/tower/secret-rotation/chunk-size", "value": "50", "description": "The number of records to extract in chunks until all secrets and credentials are processed. Only applied if key rotation is enabled." },
-
Double-check that you updated
<YOUR_APP_NAME>to your own installation's name. -
Update
TOWER_CRYPTO_SECRETentry'svalueto new desired key.
-
-
Delete the standalone SSM crypto secret key:
-
Delete
/config/<YOUR_APP_NAME>/tower/crypto/secretKeyThis ensures the key will be recreated with the new value.
-
-
-
Initiate Key Rotation
- Start the Seqera Platform instance.
- Verify key rotation activity. TODO: Figure out how to determine this.
- Wait for
croncontainer to complete all necessary rotation activities. TODO: Figure out how to determine this.
-
(Optional) Delete Rotation Keys
-
Key rotation Initiate an outage via
docker compose down. -
In the omnibus file:
- Delete entry
TOWER_CRYPTO_PREVIOUS_SECRET. - Delete entry
TOWER_CRYPTO_ROTATE_KEYS. - Delete entry
TOWER_CRYPTO_ROTATE_CHUNK_SIZE.
- Delete entry
-
Delete standalone SSM keys:
- Delete SSM key
/config/<YOUR_APP_NAME>/tower/secret-rotation/secretKey. - Delete SSM key
/config/<YOUR_APP_NAME>/tower/secret-rotation/enabled. - Delete SSM key
/config/<YOUR_APP_NAME>/tower/secret-rotation/chunk-size.
- Delete SSM key
-
-
Restart Seqera Platform
-
Restart Seqera Platform via
docker compose up -d.With the key-rotation keys no longer available, rotation activities are completely ceased.
-