[PureGo] Add UC OAuth token provider with per-table caching#496
Draft
zlata-stefanovic-db wants to merge 1 commit into
Draft
[PureGo] Add UC OAuth token provider with per-table caching#496zlata-stefanovic-db wants to merge 1 commit into
zlata-stefanovic-db wants to merge 1 commit into
Conversation
This was referenced Jul 13, 2026
97dc552 to
4216362
Compare
94ef28c to
abf30aa
Compare
4216362 to
ef30a63
Compare
abf30aa to
66492c8
Compare
ef30a63 to
43ab91e
Compare
1be9430 to
91838e1
Compare
393067d to
d680b28
Compare
91838e1 to
5f5f2d0
Compare
d680b28 to
6ca2b78
Compare
39031f4 to
5c701b0
Compare
6ca2b78 to
0c04862
Compare
5c701b0 to
97cba97
Compare
0c04862 to
ef3c99c
Compare
97cba97 to
0048318
Compare
acbbfea to
194d670
Compare
0048318 to
f030ec5
Compare
194d670 to
834d10f
Compare
f030ec5 to
8dbcde8
Compare
f4295e7 to
3fa080c
Compare
8dbcde8 to
d0dc6d9
Compare
3fa080c to
fcbf80c
Compare
fcbf80c to
e7e2570
Compare
d0dc6d9 to
f2f3a05
Compare
e7e2570 to
d0dc6d9
Compare
d0dc6d9 to
f2f3a05
Compare
10 tasks
f2f3a05 to
fed65af
Compare
Add OAuthTokenProvider (Unity Catalog OAuth 2.0 client-credentials flow with downscoped per-table tokens, proactive refresh, and endpoint/table validation) and OAuthHeadersProvider bridging it to the transport headers-provider hook. Treat all 4xx token responses as non-retryable and anchor cached TTL at response receipt, matching the Rust SDK. Signed-off-by: Zlata Stefanovic <zlata.stefanovic@databricks.com>
a91f05b to
e5c044e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Third of a 3-PR stack. Stacked on #495 (base branch
purego-auth-cache).Adds the Unity Catalog OAuth 2.0 provider:
OAuthTokenProvider— client-credentials flow minting downscoped per-table tokens, with proactive refresh and endpoint/table validation. Concrete type (no interface), mirroring the Rust SDK'sDefaultTokenFactory.OAuthHeadersProvider— wrapsOAuthTokenProviderand emits the Zerobus metadata headers, satisfying the transport headers-provider hook (from [PureGo] Add custom auth-header hook to transport #494).Stack
Test plan
go build ./...andgo test ./internal/...pass.Note
OAuthHeadersProviderlives inheaders_provider.goalongsideHeadersProvider/StaticHeadersProvider(added in #495), since it depends onoauth.goin this PR. Rebased on the updated #495/#494, which droppedStreamParams.Tokenand the unusedTokenProviderlayer; the README's transport blurb describes auth coming fromStreamParams.HeadersProvider.