-
Notifications
You must be signed in to change notification settings - Fork 90
db/snowflake: clarify connection_url
format when using keypair authentication
#940
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
vinay-gopalan
merged 5 commits into
vault/202509
from
vinayg/snowflake-keypair-query-params
Sep 22, 2025
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
d1727ea
make docs explicitly clear on connection URL format for keypair auth
vinay-gopalan dc48467
Apply suggestions from code review
cbiguet 08122a9
Fold note into the code example intro
cbiguet 4ad091a
Fully align content with newer versions
cbiguet 5dd7cd0
respond to feedback
vinay-gopalan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,8 +11,8 @@ description: |- | |
|
||
<Warning title="Password authentication removal"> | ||
Snowflake is disabling password authentication for all users in | ||
<a href="https://www.snowflake.com/en/blog/blocking-single-factor-password-authentification">November of 2025.</a> | ||
HashiCorp is working to support key pair authentication in place of passwords. | ||
<a href="https://www.snowflake.com/en/blog/blocking-single-factor-password-authentification">November of 2025.</a> | ||
HashiCorp has added support for key pair authentication in place of passwords. | ||
</Warning> | ||
|
||
Snowflake is one of the supported plugins for the database secrets engine. This plugin | ||
|
@@ -29,7 +29,7 @@ The Snowflake database secrets engine uses | |
|
||
| Plugin Name | Root Credential Rotation | Dynamic Roles | Static Roles | Username Customization | Credential Types | | ||
| --------------------------- | ------------------------ | ------------- | ------------ | ---------------------- |---------------------------| | ||
| `snowflake-database-plugin` | Yes | Yes | Yes | Yes (1.8+) | password(deprecated), rsa_private_key | | ||
| `snowflake-database-plugin` | Password-only | Yes | Yes | Yes (1.8+) | password(deprecated), rsa_private_key | | ||
|
||
## Setup | ||
|
||
|
@@ -43,7 +43,7 @@ The Snowflake database secrets engine uses | |
By default, the secrets engine will enable at the name of the engine. To | ||
enable the secrets engine at a different path, use the `-path` argument. | ||
|
||
1. Configure Vault with the proper plugin and connection information: | ||
1. Configure Vault with userpass authentication: | ||
|
||
```shell-session | ||
$ vault write database/config/my-snowflake-database \ | ||
|
@@ -71,9 +71,41 @@ The Snowflake database secrets engine uses | |
|
||
`db_name` is the name of a database in your Snowflake instance. | ||
|
||
~> **Note:** The user being utilized should have `ACCOUNT_ADMIN` privileges, and should be different | ||
from the root user you were provided when making your Snowflake account. This allows you to rotate | ||
the root credentials and still be able to access your account. | ||
1. Configure Vault with keypair authentication. Do not provide templated or | ||
hard-coded username or password information in the connection URL if you use | ||
key-pair authentication. The Snowflake plugin appropriately constructs the | ||
full DSN using the provided `username` and `private_key` to authenticate to | ||
Snowflake: | ||
|
||
```shell-session | ||
$ vault write database/config/my-snowflake-database \ | ||
plugin_name=snowflake-database-plugin \ | ||
allowed_roles="my-role" \ | ||
connection_url="<account>.snowflakecomputing.com/<db_name>" \ | ||
username="vaultuser" \ | ||
[email protected] | ||
``` | ||
|
||
The connection URL must include the following parameters in addition to any | ||
optional query parameters: | ||
|
||
- `account` - your Snowflake account identifier. Refer to the | ||
[`server` section](https://docs.snowflake.com/en/user-guide/odbc-parameters.html#connection-parameters) | ||
of the connection parameters for Snowflake ODBC configuration details. | ||
|
||
- `db_name` the name of a database in your Snowflake instance. | ||
|
||
For example: | ||
|
||
```text | ||
ecxxxx.west-us-1.azure.snowflakecomputing.com/my_app_data | ||
``` | ||
|
||
|
||
You must provide Vault with a Snowflake user that has `ACCOUNT_ADMIN` privileges. We | ||
strongly recommend using a unique user account for Vault access so Vault can | ||
rotate the associated root credentials without disrupting the account associated | ||
with your Snowflake account or other Snowflake users on the account. | ||
|
||
## Usage | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,8 +11,8 @@ description: |- | |
|
||
<Warning title="Password authentication removal"> | ||
Snowflake is disabling password authentication for all users in | ||
<a href="https://www.snowflake.com/en/blog/blocking-single-factor-password-authentification">November of 2025.</a> | ||
HashiCorp is working to support key pair authentication in place of passwords. | ||
<a href="https://www.snowflake.com/en/blog/blocking-single-factor-password-authentification">November of 2025.</a> | ||
HashiCorp has added support for key pair authentication in place of passwords. | ||
</Warning> | ||
|
||
Snowflake is one of the supported plugins for the database secrets engine. This plugin | ||
|
@@ -29,7 +29,7 @@ The Snowflake database secrets engine uses | |
|
||
| Plugin Name | Root Credential Rotation | Dynamic Roles | Static Roles | Username Customization | Credential Types | | ||
| --------------------------- | ------------------------ | ------------- | ------------ | ---------------------- |---------------------------| | ||
| `snowflake-database-plugin` | Yes | Yes | Yes | Yes (1.8+) | password(deprecated), rsa_private_key | | ||
| `snowflake-database-plugin` | Password-only | Yes | Yes | Yes (1.8+) | password(deprecated), rsa_private_key | | ||
|
||
## Setup | ||
|
||
|
@@ -43,7 +43,7 @@ The Snowflake database secrets engine uses | |
By default, the secrets engine will enable at the name of the engine. To | ||
enable the secrets engine at a different path, use the `-path` argument. | ||
|
||
1. Configure Vault with the proper plugin and connection information: | ||
1. Configure Vault with userpass authentication: | ||
|
||
```shell-session | ||
$ vault write database/config/my-snowflake-database \ | ||
|
@@ -71,9 +71,40 @@ The Snowflake database secrets engine uses | |
|
||
`db_name` is the name of a database in your Snowflake instance. | ||
|
||
~> **Note:** The user being utilized should have `ACCOUNT_ADMIN` privileges, and should be different | ||
from the root user you were provided when making your Snowflake account. This allows you to rotate | ||
the root credentials and still be able to access your account. | ||
1. Configure Vault with keypair authentication. Do not provide templated or | ||
hard-coded username or password information in the connection URL if you use | ||
key-pair authentication. The Snowflake plugin appropriately constructs the | ||
full DSN using the provided `username` and `private_key` to authenticate to | ||
Snowflake: | ||
|
||
```shell-session | ||
$ vault write database/config/my-snowflake-database \ | ||
plugin_name=snowflake-database-plugin \ | ||
allowed_roles="my-role" \ | ||
connection_url="<account>.snowflakecomputing.com/<db_name>" \ | ||
username="vaultuser" \ | ||
[email protected] | ||
``` | ||
|
||
The connection URL must include the following parameters (additional query parameters are not supported in Vault 1.17): | ||
|
||
- `account` - your Snowflake account identifier. Refer to the | ||
[`server` section](https://docs.snowflake.com/en/user-guide/odbc-parameters.html#connection-parameters) | ||
of the connection parameters for Snowflake ODBC configuration details. | ||
|
||
- `db_name` the name of a database in your Snowflake instance. | ||
|
||
For example: | ||
|
||
```text | ||
ecxxxx.west-us-1.azure.snowflakecomputing.com/my_app_data | ||
``` | ||
|
||
|
||
You must provide Vault with a Snowflake user that has `ACCOUNT_ADMIN` privileges. We | ||
strongly recommend using a unique user account for Vault access so Vault can | ||
rotate the associated root credentials without disrupting the account associated | ||
with your Snowflake account or other Snowflake users on the account. | ||
|
||
## Usage | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,8 +11,8 @@ description: >- | |
|
||
<Warning title="Password authentication removal"> | ||
Snowflake is disabling password authentication for all users in | ||
<a href="https://www.snowflake.com/en/blog/blocking-single-factor-password-authentification">November of 2025.</a> | ||
HashiCorp is working to support key pair authentication in place of passwords. | ||
<a href="https://www.snowflake.com/en/blog/blocking-single-factor-password-authentification">November of 2025.</a> | ||
HashiCorp has added support for key pair authentication in place of passwords. | ||
</Warning> | ||
|
||
Snowflake is one of the supported plugins for the database secrets engine. This plugin | ||
|
@@ -29,7 +29,7 @@ The Snowflake database secrets engine uses | |
|
||
| Plugin Name | Root Credential Rotation | Dynamic Roles | Static Roles | Username Customization | Credential Types | | ||
| --------------------------- | ------------------------ | ------------- | ------------ | ---------------------- |---------------------------| | ||
| `snowflake-database-plugin` | Yes | Yes | Yes | Yes (1.8+) | password(deprecated), rsa_private_key | | ||
| `snowflake-database-plugin` | Password-only | Yes | Yes | Yes (1.8+) | password(deprecated), rsa_private_key | | ||
|
||
## Setup | ||
|
||
|
@@ -43,7 +43,7 @@ The Snowflake database secrets engine uses | |
By default, the secrets engine will enable at the name of the engine. To | ||
enable the secrets engine at a different path, use the `-path` argument. | ||
|
||
1. Configure Vault with the proper plugin and connection information: | ||
1. Configure Vault with userpass authentication: | ||
|
||
```shell-session | ||
$ vault write database/config/my-snowflake-database \ | ||
|
@@ -71,9 +71,41 @@ The Snowflake database secrets engine uses | |
|
||
`db_name` is the name of a database in your Snowflake instance. | ||
|
||
~> **Note:** The user being utilized should have `ACCOUNT_ADMIN` privileges, and should be different | ||
from the root user you were provided when making your Snowflake account. This allows you to rotate | ||
the root credentials and still be able to access your account. | ||
1. Configure Vault with keypair authentication. Do not provide templated or | ||
hard-coded username or password information in the connection URL if you use | ||
key-pair authentication. The Snowflake plugin appropriately constructs the | ||
full DSN using the provided `username` and `private_key` to authenticate to | ||
Snowflake: | ||
|
||
```shell-session | ||
$ vault write database/config/my-snowflake-database \ | ||
plugin_name=snowflake-database-plugin \ | ||
allowed_roles="my-role" \ | ||
connection_url="<account>.snowflakecomputing.com/<db_name>" \ | ||
username="vaultuser" \ | ||
[email protected] | ||
``` | ||
|
||
The connection URL must include the following parameters in addition to any | ||
optional query parameters: | ||
|
||
- `account` - your Snowflake account identifier. Refer to the | ||
[`server` section](https://docs.snowflake.com/en/user-guide/odbc-parameters.html#connection-parameters) | ||
of the connection parameters for Snowflake ODBC configuration details. | ||
|
||
- `db_name` the name of a database in your Snowflake instance. | ||
|
||
For example: | ||
|
||
```text | ||
ecxxxx.west-us-1.azure.snowflakecomputing.com/my_app_data | ||
``` | ||
|
||
|
||
You must provide Vault with a Snowflake user that has `ACCOUNT_ADMIN` privileges. We | ||
strongly recommend using a unique user account for Vault access so Vault can | ||
rotate the associated root credentials without disrupting the account associated | ||
with your Snowflake account or other Snowflake users on the account. | ||
|
||
## Usage | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,34 +71,36 @@ The Snowflake database secrets engine uses | |
|
||
`db_name` is the name of a database in your Snowflake instance. | ||
|
||
~> **Note:** The user being utilized should have `ACCOUNT_ADMIN` privileges, and should be different | ||
from the root user you were provided when making your Snowflake account. This allows you to rotate | ||
the root credentials and still be able to access your account. | ||
|
||
1. Configure Vault with keypair authentication: | ||
1. Configure Vault with keypair authentication. Do not provide templated or | ||
hard-coded username or password information in the connection URL if you use | ||
key-pair authentication. The Snowflake plugin appropriately constructs the | ||
full DSN using the provided `username` and `private_key` to authenticate to | ||
Snowflake: | ||
|
||
```shell-session | ||
$ vault write database/config/my-snowflake-database \ | ||
plugin_name=snowflake-database-plugin \ | ||
allowed_roles="my-role" \ | ||
connection_url="ecxxxx.west-us-1.azure.snowflakecomputing.com/db_name" \ | ||
connection_url="<account>.snowflakecomputing.com/<db_name>" \ | ||
username="vaultuser" \ | ||
[email protected] | ||
``` | ||
|
||
You must provide properly formatted data source names (DSN) when you configure | ||
the database in the following format. When using key-pair authentication, do not | ||
provide any templates in the DSN: | ||
The connection URL must include the following parameters in addition to any | ||
optional query parameters: | ||
|
||
- `account` - your Snowflake account identifier. Refer to the | ||
[`server` section](https://docs.snowflake.com/en/user-guide/odbc-parameters.html#connection-parameters) | ||
of the connection parameters for Snowflake ODBC configuration details. | ||
|
||
```shell-session | ||
<account>.snowflakecomputing.com/<db_name> | ||
``` | ||
- `db_name` the name of a database in your Snowflake instance. | ||
|
||
- `account` - your Snowflake account identifier. Refer to the | ||
[`server` section](https://docs.snowflake.com/en/user-guide/odbc-parameters.html#connection-parameters) | ||
of the connection parameters for Snowflake ODBC configuration for further details. | ||
For example: | ||
|
||
```text | ||
ecxxxx.west-us-1.azure.snowflakecomputing.com/my_app_data | ||
``` | ||
|
||
- `db_name` the name of a database in your Snowflake instance. | ||
|
||
You must provide Vault with a Snowflake user that has `ACCOUNT_ADMIN` privileges. We | ||
strongly recommend using a unique user account for Vault access so Vault can | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.