-
Notifications
You must be signed in to change notification settings - Fork 983
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
Account-scoped personal access tokens #4805
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! We may need some time though to agree on when to roll this out, at least we need to push the deprecation date past January.
* For example, [email protected] belongs to two dbt Cloud accounts: Spice Harvesting Account and Guild Navigator Account. Before this release, the same API key was used to access both accounts. | ||
* After this release, Paul has to individually go into these accounts and create a unique PAT for each account he wants to access the API. These API tokens are account-specific and not user-specific. | ||
* **Cross-Account API endpoints will stop working after April X, 2024:** | ||
* These are /v2/accounts and /v3/accounts. Since all tokens are now account-specific, tying all accounts to a username will not work. So /v3/accounts will be deprecated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently we can't deprecate /v3/accounts because it's used on the front end for the account switcher. Once we fully migrate to MC then we might be able to
description: "Personal access tokens help you define permissions for securing access to your dbt Cloud account and its projects." | ||
--- | ||
|
||
Each dbt Cloud user with a [developer license](https://docs.getdbt.com/docs/cloud/manage-access/seats-and-users) can create a personal access token (PAT) to access the dbt Cloud API. This token is used to execute queries against the dbt Cloud API on the user's behalf. User API tokens inherit the permissions of the user that they were created for. These tokens are account-specific; If a user has access to more than one dbt Cloud account with the same email address, you need to create a unique PAT for each one of these accounts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might explicitly mention somewhere that account-scoped PATs can only query "accounts-level" endpoints (as in endpoints that have an account id within their either request path). With the exception of /whoami, /v3/accounts, and /v2/accounts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few comments that you can iterate on after you ship if you want!
@@ -4,19 +4,72 @@ id: "user-tokens" | |||
pagination_next: "docs/dbt-cloud-apis/service-tokens" | |||
--- | |||
|
|||
:::note Action required | |||
|
|||
The [user API tokens](#user-tokens) will eventually be deprecated. The deprecation date is yet to be determined, but we recommend you update to account-scoped personal access tokens to avoid service disruptions in the future. We will communicate, with ample notice, the deprecation date when it has been determined. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This note is kind of wordy and could use some fine-tuning. I worry people will miss the important bits.
|
||
:::info New | ||
|
||
On Feb 7, 2024, we introduced a new type of token for individual users called personal access tokens. Note that these differ from [Service Tokens or API Keys](/docs/dbt-cloud-apis/authentication#types-of-api-access-tokens). Before this release, user API keys were the only way to access dbt Cloud API on behalf of the user. These API Keys were user-specific and were not scoped to an account. To enhance the security of dbt Cloud, we are moving away from this model to account-specific tokens. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to be a note? Feels like a 1st paragraph?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've worked under the assumption that anything with dates should be temporary text, but I'm happy to change it.
Co-authored-by: Leona B. Campbell <[email protected]>
What are you changing in this pull request and why?
Updating the docs to reflect the change to account-scoped personal access tokens for APIs.
Renames the
Authentication
section toAPI Access
and updates theAuthentication
page toAuthentication tokens
No redirects required as URLs remain the same.
Checklist
Adding or removing pages (delete if not applicable):
website/sidebars.js
npm run build
to update the links that point to deleted pages