Overview
When attempting to authenticate a client workload to a Snowflake Server Workload, you receive an error message stating "Missing password." This issue occurs even when using an authentication method that doesn't require a password.
Relates To
- Agent Proxy
- Transparent Steering
- Explicit Steering
- Snowflake
- Client and Server Workloads
Cause
Snowflake drivers and connectors are designed with a number of authentication options, including password-based authentication, key pair authentication, and SSO. When using certain drivers or connectors, the connection string expects a PASSWORD parameter to be present, even if the actual authentication method does not require a password. This is a common requirement for the driver to correctly parse the connection string and proceed with the specified authentication method.
For example, when using key pair authentication, the driver still requires the PASSWORD field to be included in the connection string to satisfy the connection parameter schema, although the value is not used for authentication.
Solution
To resolve this issue, you must include the PASSWORD parameter in your connection string and provide a placeholder or dummy value. This allows the driver to parse the connection string successfully and proceed with the correct authentication method.
Example for Key Pair Authentication:
Instead of:
conn = snowflake.connector.connect(
user='<username>',
account='<account_identifier>')
Use the following, including a placeholder for the password parameter:
conn = snowflake.connector.connect(
user='<username>',
account='<account_identifier>',
password='<dummy_password>')
By adding the password='<dummy_password>' parameter, you satisfy the driver's requirement and enable the connection to proceed using the specified authentication method (in this case, key pair authentication).