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

databricks auth token command doesn't support oauth-m2m flow #1939

Open
zackverham opened this issue Nov 27, 2024 · 0 comments
Open

databricks auth token command doesn't support oauth-m2m flow #1939

zackverham opened this issue Nov 27, 2024 · 0 comments
Labels
auth Bug Something isn't working CLI CLI related issues

Comments

@zackverham
Copy link

Note: I'm not sure what the expected behavior for the databricks auth token command is - filing this as a bug report because the context in the bug report template seems useful.

Describe the issue

I'm trying to run the databricks auth token command using a profile which specifies a service principal (with a client_id and client_secret).

When I run databricks auth token --profile <service-principal>, I get back an access token that identifies me rather than the service principal.

Steps to reproduce the behavior

  • Setup a profile in your databrickscfg file which specifies an oauth-m2m flow with a service principal.
  • Use databricks auth describe --profile <service-principal> and databricks auth env --profile <service-principal> to confirm that the profile represents the oauth-m2m auth type
  • Run databricks auth token --profile <service-principal>
  • Observe that the returned access token does not represent the service principal, but represents me, the user.

Expected Behavior

I'd expect the databricks auth token command to return an access token for the service principal.

Actual Behavior

I receive an access token for myself.

OS and CLI version

Please include the version of the CLI (eg: v0.1.2) and the operating system (eg: windows). You can run databricks --version to get the version of your Databricks CLI

Databricks CLI v0.225.0
MacOS

Is this a regression?

I don't believe so, no.

Debug Logs

Output logs if you run the command with debug logs enabled. Example: databricks clusters list --log-level=debug. Redact if needed

10:01:58  INFO start pid=97471 version=0.225.0 args="databricks, auth, token, --debug, --profile, <service-principal>"
<access_token payload>
10:01:58  INFO completed execution pid=97471 exit_code=0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth Bug Something isn't working CLI CLI related issues
Projects
None yet
Development

No branches or pull requests

2 participants