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

[ISSUE] serving_endpoints.query raises BadRequest error when using azure-client-secret auth #657

Open
ericfeunekes opened this issue May 24, 2024 · 0 comments

Comments

@ericfeunekes
Copy link

Description
When using azure-client-secret auth, trying to query a model serving endpoint creates the following error (I replaced the actual UUID with :

databricks.sdk.errors.platform.BadRequest: io.jsonwebtoken.IncorrectClaimException: Expected aud claim to be: , but was: <UUID>.

Reproduction

  1. Use azure-client-secret auth to instantiate a WorkpspaceClient
  2. use w.serving_endpoints.query
  3. Error is raised

Expected behavior
Bad Request error should not be raise

Is it a regression?
Don't know

Debug Logs
anything in angle braces is something I replaced for privacy

INFO:databricks.sdk:Configured AAD token for Service Principal (<UUID>)
DEBUG:databricks.sdk.oauth:Retrieving token for <UUID>
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): login.microsoftonline.com:443
DEBUG:urllib3.connectionpool:https://login.microsoftonline.com:443 "POST /<UUID>/oauth2/token HTTP/1.1" 200 1437
DEBUG:databricks.sdk.oauth:Retrieving token for <UUID>
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): login.microsoftonline.com:443
DEBUG:urllib3.connectionpool:https://login.microsoftonline.com:443 "POST /<UUID>/oauth2/token HTTP/1.1" 200 1485
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): <databricks-host>:443
DEBUG:urllib3.connectionpool:<databricks-host>:443 "POST /serving-endpoints/<endpoint-name>/invocations HTTP/1.1" 400 492
DEBUG:databricks.sdk:POST /serving-endpoints/<endpoint-name>/invocations

Other Information

  • sdk version: 0.28.0

Additional context
The SPN has query permission on the endpoint. When I test the exact same endpoint/query with my own PAT, with the same permissions, it works. Also, when I use the same SPN to query a table using the same version of the SDK it works.

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

No branches or pull requests

1 participant