Skip to main content

Module secrets

Module secrets 

Source
Expand description

Fernet decryption of gobby’s SecretStore.

Replicates the Python chain:

  1. Read ~/.gobby/machine_id (plain text)
  2. Read ~/.gobby/.secret_salt (16 raw bytes)
  3. PBKDF2-HMAC-SHA256(password=machine_id, salt=salt, iterations=600_000, length=32)
  4. base64url_encode(key_bytes) → Fernet key
  5. Fernet(key).decrypt(encrypted_value) → plaintext

Source: src/gobby/storage/secrets.py, src/gobby/utils/machine_id.py

Functions§

resolve_config_value
Resolve $secret:NAME and ${VAR} patterns in a config value.
resolve_secret
Resolve a secret by name from the secrets table in the PostgreSQL hub.