SnowCLI version
main
Python version
Python 3.13.5
Platform
Linux-6.14.0-37-generic-x86_64-with-glibc2.39
What happened
The snowflake cli does not respect the private_key_file_pwd key in toml that is supported in the snowflake python connector
https://github.com/snowflakedb/snowflake-connector-python/blob/fef4999534be5180aa0e601a2a4cc2a95d1c2c0e/src/snowflake/connector/connection.py#L236-L237
The snow cli implementation is here
|
private_key_passphrase = SecretType(os.getenv("PRIVATE_KEY_PASSPHRASE", None)) |
|
if ( |
|
private_key_pem.value.startswith(ENCRYPTED_PKCS8_PK_HEADER) |
|
and private_key_passphrase.value is None |
|
): |
|
raise ClickException( |
|
"Encrypted private key, you must provide the " |
|
"passphrase in the environment variable PRIVATE_KEY_PASSPHRASE" |
|
) |
.
Console output
How to reproduce
Create a snowflake connections.toml file with private_key_file and private_key_file_pwd set and not have PRIVATE_KEY_PASSPHRASE set.
SnowCLI version
main
Python version
Python 3.13.5
Platform
Linux-6.14.0-37-generic-x86_64-with-glibc2.39
What happened
The snowflake cli does not respect the
private_key_file_pwdkey in toml that is supported in the snowflake python connectorhttps://github.com/snowflakedb/snowflake-connector-python/blob/fef4999534be5180aa0e601a2a4cc2a95d1c2c0e/src/snowflake/connector/connection.py#L236-L237
The snow cli implementation is here
snowflake-cli/src/snowflake/cli/_app/snow_connector.py
Lines 351 to 359 in 78174c6
Console output
How to reproduce
Create a snowflake
connections.tomlfile withprivate_key_fileandprivate_key_file_pwdset and not havePRIVATE_KEY_PASSPHRASEset.