Fleet & Inventories•4 min read•Security

SSH Keys & Secret Management

Manage Ed25519 and RSA SSH keys, configure secret variables, and understand how CIEL encrypts credentials at rest and during job execution.

CIEL centralizes SSH credentials and sensitive configuration variables at the project level, keeping credentials encrypted at rest and out of playbook source repositories.

Project SSH Key Details, SHA256 Fingerprint, and Deployment Snippet

1. Managing SSH Keys (/ssh-keys)

The SSH Keys interface tracks public keys, algorithm types, and deployment fingerprints for your target servers.

Generating Key Pairs

  1. In the toolbar, enter a key name and select the algorithm (ED25519 or RSA).
  2. Click Generate.
  3. The controller generates the key pair via the backend crypto engine, stores the encrypted private key at rest using AES-GCM, and derives the SHA256 fingerprint.

Importing Existing Keys

  1. Click Import Key to open the import modal.
  2. Provide a name and optional default remote username.
  3. Select the input source:
    • Upload File: Select a private key file (id_ed25519, id_rsa, or .pem).
    • Paste Text: Paste the raw PEM-encoded private key block directly.
  4. Click Import Key.

Note: Non-interactive automation runners cannot prompt for passphrases during execution. Passphrase-protected private keys are rejected upon import.

Authorizing Keys on Target Servers

Click any key in the list to open the detail drawer:

  • Fingerprint & Public Key: Copy the SHA256 fingerprint or raw public key string.
  • Install Commands: Copy the pre-formatted shell snippet to append the key to ~/.ssh/authorized_keys with correct directory permissions (0700 for ~/.ssh and 0600 for authorized_keys).

2. Secret Variables (isSecret)

Sensitive values (database passwords, tokens, private certificates) can be stored within Variable Sets, Inventory variables, or Host variables:

  • Per-Key Secrecy: In the variable mapping table, toggle the isSecret checkbox for each key that contains sensitive data.
  • Encryption at Rest: Values marked as secret are encrypted with AES-256-GCM before writing to the database. Non-secret keys remain plaintext for easy inspection.
  • Masking in Previews: In API responses and YAML preview tabs, secret values are replaced with ******** unless requested by an authorized administrator.

3. Credential Lifecycle During Execution

When an Ansible playbook or ad-hoc task is dispatched:

  1. Materialization: CIEL resolves the SSH key IDs attached to target hosts, decrypts the required private keys, and writes them to isolated files under env/ssh_keys/<job_id>/key-<key_id>.
  2. Permission Lockdown: The temporary key directory is created with mode 0700 and each private key file is written with mode 0600.
  3. Runner Isolation: In Podman execution environments, the runner mounts the key directory to /runner/env/ssh_keys/<job_id>/ and injects ansible_ssh_private_key_file paths directly into the inventory projection.
  4. Post-Run Cleanup: As soon as the runner process exits (whether finished, failed, or cancelled), the entire temporary directory for that job ID is removed from disk.

4. External References

For cryptographic standards and SSH security specifications: