Keys and Secrets
SSH Keys/Secrets are used to private SSH keys and sensitive data used in Commands and Files. Single entity is used for both types in order to simplify the management of sensitive data.
SSH Keys/Secrets are located under the Cetmix Tower > Settings > Keys and Secrets
menu.
Fields
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 Notes section 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. |
Notes
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 Type: 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.
Key Type: 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:
- Server specific
- Partner specific
- 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 secretsecret
is used to declare its type (secret)reference
secret id as it's written in the Reference field
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