Skip to content

Resolve token_audience from default_oidc_audience in host metadata#1371

Open
tanmay-db wants to merge 9 commits intomainfrom
default-oidc-audience
Open

Resolve token_audience from default_oidc_audience in host metadata#1371
tanmay-db wants to merge 9 commits intomainfrom
default-oidc-audience

Conversation

@tanmay-db
Copy link
Copy Markdown
Contributor

@tanmay-db tanmay-db commented Mar 30, 2026

🥞 Stacked PR

Use this link to review incremental changes.


Changes

Resolve token_audience from the default_oidc_audience field in host metadata:

  • Add default_oidc_audience field to the HostMetadata dataclass, parsed from the discovery endpoint.
  • In Config._resolve_host_metadata(), set token_audience from default_oidc_audience when no explicit token_audience is configured. This takes priority over
    the existing account_id fallback for account-level hosts.
  • Remove the TODO comment about adding explicit audience to the metadata endpoint (now implemented).

Tests

  • default_oidc_audience sets token_audience when not explicitly configured.
  • default_oidc_audience takes priority over the account_id fallback for account hosts.
  • Explicitly configured token_audience is not overwritten by default_oidc_audience.
  • Falls back to account_id when default_oidc_audience is absent and no workspace_id.

Signed-off-by: Tanmay Rustagi <tanmay.rustagi@databricks.com>
Signed-off-by: Tanmay Rustagi <tanmay.rustagi@databricks.com>
Signed-off-by: Tanmay Rustagi <tanmay.rustagi@databricks.com>
@tanmay-db tanmay-db force-pushed the default-oidc-audience branch from ca751ee to 493fe38 Compare March 30, 2026 16:47
@tanmay-db tanmay-db temporarily deployed to test-trigger-is March 30, 2026 16:47 — with GitHub Actions Inactive
@tanmay-db tanmay-db temporarily deployed to test-trigger-is March 30, 2026 16:47 — with GitHub Actions Inactive
@tanmay-db tanmay-db temporarily deployed to test-trigger-is April 11, 2026 10:43 — with GitHub Actions Inactive
@tanmay-db tanmay-db changed the title Default OIDC audience Resolve token_audience from default_oidc_audience in host metadata Apr 13, 2026
Align the field name with the API contract for the well-known
databricks-config endpoint.

Co-authored-by: Isaac
The API returns this field as an array of strings. Use the first
element when resolving token_audience.

Co-authored-by: Isaac
@tanmay-db tanmay-db temporarily deployed to test-trigger-is April 13, 2026 13:03 — with GitHub Actions Inactive
@tanmay-db tanmay-db marked this pull request as ready for review April 13, 2026 13:12
@tanmay-db tanmay-db temporarily deployed to test-trigger-is April 13, 2026 13:18 — with GitHub Actions Inactive
@github-actions
Copy link
Copy Markdown

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-py

Inputs:

  • PR number: 1371
  • Commit SHA: 9fd8f3723bdfd9b86fc3d8c0957c236e06965bc7

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