Skip to content

Keys and Secrets

Keys/Secrets are used to store sensitive data used in Commands and Files and private SSH keys.

Note

Single entity is used for both types in order to use generic approach to sensitive data management.

Keys and Secrets Configuration

SSH Keys/Secrets are located under the Cetmix Tower > Settings > Keys and Secrets menu.

Keys/Secrets

Fields

Keys/Secrets Form

Field Description
Name Readable name
Reference Used for Odoo automation and YAML export/import. Leave blank to generate it automatically.
Reference Code Complete reference code for inline usage in Commands and Files.
Key Type Can be either SSH Key or Secret.
Value Key value. Please check the note below for more information.
Used For SSH Key type only. List of Servers where this SSH key is used
Partner Secret type only. If selected this secret is used only for selected partner Servers.
Server Secret type only. If selected this secret is used only for selected Server.
Note Put your notes here.

Warning

Value is a write only field. Please ensure that you have saved your key/secret before saving it. Once saved it cannot be read from the user interface any longer.

Key Types

SSH Key

Used to store SSH private keys. They are selectable in Server settings. They can be also used in Commands and Files too, although this is not their intended use.

Secret

Used to store sensitive information that can be used inline in commands. Eg a token or a password. Secrets cannot be previewed in command preview and are replaced with placeholder in Command logs.

Keys of type Secret (or "Secret") are considered "Global" if no partner and no server are selected. Such keys are accessible all across the Tower.
Global keys are overridden with partner keys with the same reference. Partner keys in their turn are overridden with server specific keys.

Priority order from highest to lowest is:

  1. Server specific
  2. Partner specific
  3. Global

Secrets are inserted inline in code using the following pattern: #!cxtower.secret.reference!#. It consists of three dot separated parts and is terminated with a mandatory !# suffix:

  • #!cxtower is a special prefix that indicates that the following text is a Cetmix Tower secret
  • secret is used to declare its type (secret)
  • reference Reference field value

Example

Suppose we have a secret with my_secret_dir reference and value suchMuchFolder. In this case the following command:

mkdir /home/#!cxtower.secret.my_secret_dir!#

will be executed as:

mkdir /home/suchMuchFolder