Commit cc5965f
authored
Resolve TokenAudience from host metadata for account hosts (#714)
## 🥞 Stacked PR
Use this
[link](https://github.com/databricks/databricks-sdk-java/pull/714/files)
to review incremental changes.
-
[**hectorcast-db/stack/port-5-token-audience-from-metadata**](#714)
[[Files
changed](https://github.com/databricks/databricks-sdk-java/pull/714/files)]
-
[hectorcast-db/stack/port-6-gcp-sa-nonblocking](#718)
[[Files
changed](https://github.com/databricks/databricks-sdk-java/pull/718/files/2dd4a6da83dd5de9f279c0b2bfe37d3abf7a74a8..ed4ef1be20407d8797dfc2dc71528a059167cead)]
-
[hectorcast-db/stack/port-7-integration-test-metadata](#719)
[[Files
changed](https://github.com/databricks/databricks-sdk-java/pull/719/files/ed4ef1be20407d8797dfc2dc71528a059167cead..206961d539aca2b5eb89c25154d2c4f41d958c64)]
-
[hectorcast-db/stack/port-8-remove-unified-flag](#720)
[[Files
changed](https://github.com/databricks/databricks-sdk-java/pull/720/files/206961d539aca2b5eb89c25154d2c4f41d958c64..a380c97d6fa383c573f02d4c4784a38d520c27d2)]
---------
## Summary
Port of Go SDK
[#1543](databricks/databricks-sdk-go#1543).
When `resolveHostMetadata()` runs on an account host and `tokenAudience`
is not already set, automatically sets it to the `accountId`. This
enables OIDC token exchange to work correctly for account-level
operations without explicit `TOKEN_AUDIENCE` configuration.
**Changes:**
- `DatabricksConfig.resolveHostMetadata()`: sets `tokenAudience =
accountId` for ACCOUNT clients when not already configured
- Tests: `testResolveHostMetadataSetsTokenAudienceForAccountHost`,
`testResolveHostMetadataDoesNotOverwriteTokenAudience`
`NO_CHANGELOG=true`
## Test plan
- [x] `DatabricksConfigTest`: token audience resolution tests pass1 parent 31fd142 commit cc5965f
File tree
2 files changed
+50
-0
lines changed- databricks-sdk-java/src
- main/java/com/databricks/sdk/core
- test/java/com/databricks/sdk/core
2 files changed
+50
-0
lines changedLines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
907 | 907 | | |
908 | 908 | | |
909 | 909 | | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
910 | 914 | | |
911 | 915 | | |
912 | 916 | | |
| |||
Lines changed: 46 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
586 | 586 | | |
587 | 587 | | |
588 | 588 | | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
589 | 635 | | |
590 | 636 | | |
591 | 637 | | |
| |||
0 commit comments