Skip to content

Warehouse password silently lost when keyring is not installed #195

@mhallida

Description

@mhallida

When adding a Snowflake warehouse connection via warehouse_add, the password is silently discarded if the keyring Python package is not installed in the altimate-engine's venv (~/.local/share/altimate-code/engine/venv/).

Root Cause

credential_store.pysave_connection() always sets sensitive fields to null in connections.json and attempts to store them in the OS keychain via keyring. However, _keyring_available() returns False when keyring is not installed, and store_credential() silently returns False — so the password is removed from the JSON file but never persisted anywhere.

Steps to Reproduce

  1. Fresh install of altimate-code via Homebrew on macOS
  2. The engine venv at ~/.local/share/altimate-code/engine/venv/ does not include keyring
  3. Run warehouse_add with Snowflake credentials including a password
  4. connections.json is written with "password": null
  5. warehouse_test fails with 251006: Password is empty
  6. No error or warning is shown to the user during warehouse_add

Expected Behavior

Either:

  • keyring should be bundled as a dependency of the engine venv, OR
  • If keyring is unavailable, fall back to storing the password in connections.json (with a warning about plaintext storage), OR
  • Surface an error at warehouse_add time: "Warning: password could not be saved — keyring package is missing"

Additional Context

  • The MCP server process also caches _keyring_cache = False at the module level (credential_store.py), so even after installing keyring, a full restart of the MCP server is required before it takes effect.
  • snowflake-connector-python was also missing from the engine venv and had to be manually installed.

Workaround

Manually install keyring into the engine venv:

~/.local/share/altimate-code/engine/venv/bin/python3 -m pip install keyring

Then re-add the connection and restart the MCP server/IDE.


Metadata

Field Value
CLI Version v0.2.5
Platform darwin
Architecture arm64
OS Release 25.3.0
Category bug
Working Directory AI-Tools
Session ID ses_307cc9cbaffexaotgpBFFWoqh6

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingfrom-cliFeedback submitted via CLIuser-feedbackFeedback submitted by users

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions