Skip to content

Instantly share code, notes, and snippets.

@dannon
Created March 17, 2026 11:02
Show Gist options
  • Select an option

  • Save dannon/89d7a046e31ed4a331b6def2523ea7a3 to your computer and use it in GitHub Desktop.

Select an option

Save dannon/89d7a046e31ed4a331b6def2523ea7a3 to your computer and use it in GitHub Desktop.

Triage: #22146 — Enable credential support by default

Classification: Feature request (usability / configuration improvement)

Analysis

Currently, Galaxy's credential support (used by tools via CredentialsService) stores secrets through the vault system, which requires admins to explicitly create a vault_conf.yml with a type: database entry and Fernet encryption keys. Without this config, VaultFactory.from_app() in lib/galaxy/security/vault.py returns a NullVault that throws InvalidVaultConfigException on any read/write.

As tools increasingly adopt the credentials framework (e.g., PR #21643 adding test credential support), every Galaxy instance that wants to use these tools needs manual vault configuration — a barrier that shouldn't exist for a core feature.

The DatabaseVault backend is self-contained (it uses the existing Galaxy database plus Fernet encryption keys), so it can be enabled by default without requiring any external service.

Recommendation

Modify VaultFactory.from_app() to fall back to a DatabaseVault instead of NullVault when no vault config file exists. Auto-generate a Fernet key on first use and persist it to a known location (e.g., <data_dir>/vault_key), or add a new config option like vault_encryption_key that can be auto-populated. The existing NullVault path should only apply if an admin explicitly disables the vault. Also update is_vault_configured() so that downstream checks (object store templates, file source templates) recognize the auto-configured vault.

Effort Estimate

Medium

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment