Skip to content

Return error if scopes set explicitly with databricks-cli auth#663

Open
tejaskochar-db wants to merge 1 commit intomainfrom
scopes-cli-auth-error
Open

Return error if scopes set explicitly with databricks-cli auth#663
tejaskochar-db wants to merge 1 commit intomainfrom
scopes-cli-auth-error

Conversation

@tejaskochar-db
Copy link
Contributor

What

Error if users set scopes explicitly with databricks-cli auth. Keep track of whether scopes are set explicitly with a flag.

Why

Explicit scopes are currently not respected with databricks-cli auth as the token store does not support it. We were silently ignoring user set scopes and returning a possibly differently set token. This changes that, we now error instead and inform the user that explicit scopes are not respected, and the scopes set when logging in with the CLI are used instead.

Tests

  • databricks-cli + scopes set -> scopes error
  • other auth + scopes set -> no scopes error
  • no scopes -> no scopes error
  • test setting the flag tracking whether scopes are set explicitly

NO_CHANGELOG=true

@github-actions
Copy link

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/sdk-java

Inputs:

  • PR number: 663
  • Commit SHA: ee789e51fcfba5c26327adbcb15b3266c160870e

Checks will be approved automatically on success.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant