API for key-pair rotation

Date
  • Morgan Sadr-Hashemi
    VP of Engineering at SELECT

To let our customers update their Snowflake access credentials in SELECT, we’ve created our first API endpoint, and a way to create and manage API keys for your SELECT organization.

Our customers regularly ask us if they can rotate SELECT’s access to their Snowflake accounts. Security best practices indicate you should rotate access often, and Snowflake themselves are pushing users to migrate all access to key-pair authentication.

Now, you can do that using our newly minted API!

How to rotate your Snowflake account access using our API

First, you’ll need to ensure you have two key pair authentication methods available to your user in your snowflake instance, for key pair rotation. That way SELECT won’t lose access to your Snowflake account when you change your credentials.

Then, you’ll need an API key to authenticate with our API, and switch over which key pair you’re using.

Authentication

Our full authentication reference guide can be found here. All API endpoints are authenticated using Bearer tokens. You’ll need to create an API key in the SELECT dashboard.

In the navbar, head to Settings -> API Keys and follow the flow there to create one.

SELECT API for key-pair rotation.

In that settings menu you can also delete keys if necessary.

Then, once you have an API key, you can use it to fill in the Authorization header with a Bearer token for your requests. All our API endpoints are accessed via the base URL https://api.select.dev/.

curl --request PUT \
--url https://api.select.dev/api/snowflake-accounts/{snowflake_account_uuid}/credentials \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"private_key": "<string>",
"private_key_passphrase": "<string>"
}'

For more information on what goes into each of those variables, snowflake_account_uuid, private_key and private_key_passphrase in the command above, check out our API docs!

SELECT Improved filters.

In our docs we have:

  • Details of input to requests e.g. types and descriptions of fields.
  • Expected output responses.
  • An API playground you can use to test out an API call against your account.
  • Examples of the same request the playground makes in code, with language support for multiple languages.

There’s lots more to come from this API, with other customer requests already lined up on our roadmap to go in there. Stay tuned for more!

Other Things We Shipped 🚀

  • 🐛 Monitor names are more consistently shown on the monitor's history table

Get up and running with SELECT in 15 minutes.

Snowflake optimization & cost management platform

Gain visibility into Snowflake usage, optimize performance and automate savings with the click of a button.

SELECT web application screenshot

Want to get notified when we release new features? 
Subscribe to get notified.