Skip to content

Commit

Permalink
Snowflake and Core OAuth (#6435)
Browse files Browse the repository at this point in the history
## What are you changing in this pull request and why?

Adding OAuth configs for Core/Snowflake

Closes #2892

## Checklist
- [ ] I have reviewed the [Content style
guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md)
so my content adheres to these guidelines.
- [ ] The topic I'm writing about is for specific dbt version(s) and I
have versioned it according to the [version a whole
page](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#adding-a-new-version)
and/or [version a block of
content](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#versioning-blocks-of-content)
guidelines.
- [ ] I have added checklist item(s) to this list for anything anything
that needs to happen before this PR is merged, such as "needs technical
review" or "change base branch."
- [ ] The content in this PR requires a dbt release note, so I added one
to the [release notes
page](https://docs.getdbt.com/docs/dbt-versions/dbt-cloud-release-notes).
<!--
PRE-RELEASE VERSION OF dbt (if so, uncomment):
- [ ] Add a note to the prerelease version [Migration
Guide](https://github.com/dbt-labs/docs.getdbt.com/tree/current/website/docs/docs/dbt-versions/core-upgrade)
-->
<!-- 
ADDING OR REMOVING PAGES (if so, uncomment):
- [ ] Add/remove page in `website/sidebars.js`
- [ ] Provide a unique filename for new pages
- [ ] Add an entry for deleted pages in `website/vercel.json`
- [ ] Run link testing locally with `npm run build` to update the links
that point to deleted pages
-->

<!-- vercel-deployment-preview -->
---
🚀 Deployment available! Here are the direct links to the updated files:


-
https://docs-getdbt-com-git-snowflake-oauth-dbt-labs.vercel.app/docs/core/connect-data-platform/snowflake-setup

<!-- end-vercel-deployment-preview -->

---------

Co-authored-by: Leona B. Campbell <[email protected]>
  • Loading branch information
matthewshaver and runleonarun authored Nov 7, 2024
1 parent 6eee8a7 commit 6bc8e2f
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions website/docs/docs/core/connect-data-platform/snowflake-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ my-snowflake-db:

</File>

### SSO Authentication
### SSO authentication

To use SSO authentication for Snowflake, omit a `password` and instead supply an `authenticator` config to your target.
`authenticator` can be one of 'externalbrowser' or a valid Okta URL.
Expand Down Expand Up @@ -332,7 +332,7 @@ my-snowflake-db:

</File>

### SSO Authentication
### SSO authentication

To use SSO authentication for Snowflake, omit a `password` and instead supply an `authenticator` config to your target.
`authenticator` can be one of 'externalbrowser' or a valid Okta URL.
Expand Down Expand Up @@ -421,6 +421,30 @@ my-snowflake-db:

Refer to the [Snowflake docs](https://docs.snowflake.com/en/sql-reference/parameters.html#label-allow-id-token) for info on how to enable this feature in your account.

### OAuth authorization

To learn how to configure OAuth in Snowflake, refer to their [documentation](https://docs.snowflake.com/en/user-guide/oauth-snowflake-overview). Your Snowflake admin needs to generate an [OAuth token](https://community.snowflake.com/s/article/HOW-TO-OAUTH-TOKEN-GENERATION-USING-SNOWFLAKE-CUSTOM-OAUTH) for your configuration to work.

Provide the OAUTH_REDIRECT_URI in Snowflake:`http://localhost:PORT_NUMBER`. For example, `http://localhost:8080`.

Once your Snowflake admin has configured OAuth, add the following to your `profiles.yml` file:

```yaml
my-snowflake-db:
target: dev
outputs:
dev:
type: snowflake
account: [account id]
# The following fields are retrieved from the Snowflake configuration
authenticator: oauth
oauth_client_id: [OAuth client id]
oauth_client_secret: [OAuth client secret]
token: [OAuth refresh token]
```

## Configurations

The "base" configs for Snowflake targets are shown below. Note that you should also specify auth-related configs specific to the authentication method you are using as described above.
Expand Down

0 comments on commit 6bc8e2f

Please sign in to comment.