Skip to content

[HOLD][Internal] Remove account_id fallback for TokenAudience resolution#1623

Draft
tanmay-db wants to merge 3 commits intomainfrom
remove-account-id-audience-fallback
Draft

[HOLD][Internal] Remove account_id fallback for TokenAudience resolution#1623
tanmay-db wants to merge 3 commits intomainfrom
remove-account-id-audience-fallback

Conversation

@tanmay-db
Copy link
Copy Markdown
Contributor

Summary

Removes the AccountID fallback for TokenAudience during host metadata
resolution. TokenAudience is now only set from
token_federation_default_oidc_audiences in the discovery endpoint response.

Why

The /.well-known/databricks-config endpoint is being updated to always
return token_federation_default_oidc_audiences. Once deployed, the SDK
no longer needs to guess the audience from AccountID for account hosts.
The fallback was a temporary workaround for hosts that didn't yet serve
the audience field. This PR should be merged after the API change is
deployed.

What changed

Interface changes

None.

Behavioral changes

When token_federation_default_oidc_audiences is absent from the host
metadata response, TokenAudience is no longer set to AccountID as a
fallback. It remains empty, and the OIDC token source's own
determineAudience logic handles the default.

Internal changes

  • Removed the 3-line AccountID fallback block from Config.resolveHostMetadata.
  • Removed TestApplyHostMetadata_TokenFederationDefaultOIDCAudiencesTakesPriorityOverAccountIDFallback
    (no longer meaningful without the fallback).
  • Replaced TestApplyHostMetadata_FallsBackToAccountIDWhenNoTokenFederationDefaultOIDCAudiences
    with TestApplyHostMetadata_DoesNotFallBackToAccountIDWhenNoTokenFederationDefaultOIDCAudiences
    which asserts TokenAudience stays empty.
  • Added changelog entry under Internal Changes.

How is this tested?

Unit tests updated and passing. The new
TestApplyHostMetadata_DoesNotFallBackToAccountIDWhenNoTokenFederationDefaultOIDCAudiences
verifies that TokenAudience remains empty when the field is absent.

TokenAudience is now only set from `token_federation_default_oidc_audiences`
in the host metadata discovery response. The previous fallback to AccountID
for account hosts is removed, to be merged after the API with the audience
field is deployed.

Co-authored-by: Isaac
Signed-off-by: Tanmay Rustagi <tanmay.rustagi@databricks.com>
@tanmay-db tanmay-db temporarily deployed to test-trigger-is April 13, 2026 13:59 — with GitHub Actions Inactive
@tanmay-db tanmay-db changed the title [Internal] Remove account_id fallback for TokenAudience resolution [HOLD][Internal] Remove account_id fallback for TokenAudience resolution Apr 13, 2026
@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-go

Inputs:

  • PR number: 1623
  • Commit SHA: 3d66bcf58097088b72471293c8061d7ce3eba0d2

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