Skip to content
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

change oauth default scope #776

Merged
merged 2 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- Persist table comments for incremental models, snapshots and dbt clone (thanks @henlue!) ([750](https://github.com/databricks/dbt-databricks/pull/750))
- Update tblproperties on incremental runs. Note: only adds/edits. Deletes are too risky/complex for now ([765](https://github.com/databricks/dbt-databricks/pull/765))
- Update default scope/redirect Url for OAuth U2M, so with default OAuth app user can run python models ([776](https://github.com/databricks/dbt-databricks/pull/776))

## dbt-databricks 1.8.5 (August 6, 2024)

Expand Down
13 changes: 2 additions & 11 deletions dbt/adapters/databricks/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,17 +273,8 @@ def authenticate(self, in_provider: Optional[TCredentialProvider]) -> TCredentia
return provider

client_id = self.client_id or CLIENT_ID

if client_id == "dbt-databricks":
# This is the temp code to make client id dbt-databricks work with server,
# currently the redirect url and scope for client dbt-databricks are fixed
# values as below. It can be removed after Databricks extends dbt-databricks
# scope to all-apis
redirect_url = "http://localhost:8050"
scopes = ["sql", "offline_access"]
else:
redirect_url = self.oauth_redirect_url or REDIRECT_URL
scopes = self.oauth_scopes or SCOPES
redirect_url = self.oauth_redirect_url or REDIRECT_URL
scopes = self.oauth_scopes or SCOPES

oauth_client = OAuthClient(
host=host,
Expand Down
Loading