Skip to content

Comments

Adding support for private_key_file_pwd field from connections.toml#2739

Open
costrouc wants to merge 5 commits intosnowflakedb:mainfrom
costrouc:feat-use-private-key-file-pwd
Open

Adding support for private_key_file_pwd field from connections.toml#2739
costrouc wants to merge 5 commits intosnowflakedb:mainfrom
costrouc:feat-use-private-key-file-pwd

Conversation

@costrouc
Copy link

@costrouc costrouc commented Jan 21, 2026

Closes #2738

Pre-review checklist

  • I've confirmed that instructions included in README.md are still correct after my changes in the codebase.
  • I've added or updated automated unit tests to verify correctness of my new code.
  • I've added or updated integration tests to verify correctness of my new code.
  • I've confirmed that my changes are working by executing CLI's commands manually on MacOS.
  • I've confirmed that my changes are working by executing CLI's commands manually on Windows.
  • I've confirmed that my changes are up-to-date with the target branch.
  • I've described my changes in the release notes.
  • I've described my changes in the section below.
  • I've described my changes in the documentation.

Changes description

Prior to this PR the snowflake cli only supported
PRIVATE_KEY_PASSPHRASE. The snowflake python connector which this library uses supports private_key_file_pwd.

This PR:

  • adds the field private_key_file_pwd to the config
  • uses the environment variable PRIVATE_KEY_PASSPHRASE then falls back to using the private_key_file_pwd for compatibility
  • adds the private_key_file_pwd to masked sensitive parameters
  • adds unit tests to ensure that PRIVATE_KEY_PASSPHRASE is prefered over private_key_file_pwd and that it correctly falls back to using private_key_file_pwd if PRIVATE_KEY_PASSPHRASE not set

Closes snowflakedb#2738

Prior to this PR the snowflake cli only supported
PRIVATE_KEY_PASSPHRASE. The snowflake python connector which this
library uses supports private_key_file_pwd.

This PR:
 - adds the field `private_key_file_pwd` to the config
 - uses the `private_key_file_pwd` and then falls back to using the
 environment variable PRIVATE_KEY_PASSPHRASE for compatibility
 - adds the private_key_file_pwd to masked sensitive parameters
@costrouc costrouc force-pushed the feat-use-private-key-file-pwd branch from f870b2e to f90c5af Compare January 21, 2026 16:29
@costrouc costrouc marked this pull request as ready for review January 21, 2026 16:35
@costrouc costrouc requested a review from a team as a code owner January 21, 2026 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SNOW-3012806: Snowflake CLI does not use the private_key_file_pwd key in toml

1 participant