[Java][Go] Add first-class external-IdP (Entra ID) token federation
I maintainer di solito rispondono entro 4 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Ambito
- authentication, backend-api-design
Direzione di ricerca
Read the Rust core’s FederatedTokenProvider and IdpTokenSupplier implementation from #760, then trace the Java JNI and Go cgo binding layers. Add callback bridging and supplier identity handling in both bindings, with tests for account and workload federation, caching, invalidation, and callback errors. Done means both SDKs pass those unit tests and include a README section and example; live gRPC validation against a real workspace is also in the testing plan.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
SDK
Java and Go
Description
Summary
Follow-up to #740: extend first-class external-IdP (for example Microsoft Entra ID)
token federation to the Java and Go (cgo) SDKs. The feature shipped in Rust
2.11.0 and Python 1.10.0 (#760), and these two SDKs are next by usage. The native
Pure Go SDK (purego/) is out of scope here: it has its own OAuth stack, so it
would need a separate implementation.
Same feature as #740: the caller supplies a callback that returns the current
external IdP token. The SDK exchanges it for a Zerobus-scoped Databricks token
using the RFC 8693 token-exchange grant, then caches and refreshes it the same way
the existing OAuth client-credentials path does. The Zerobus service does not change.
Motivation
Enterprise customers who can't use Databricks-managed OAuth secrets today work
around it on Java and Go by hand-rolling the exchange inside a custom
HeadersProvider. That means each team re-implements the request shaping (the
zerobusDirectWriteApi resource and table-scoped authorization_details), the
caching and the refresh. Rust and Python callers no longer have to do this, and
Java and Go callers shouldn't have to either.
Both modes from #740 are in scope:
- Account-level federation:
noclient_id. The subject resolves to the SCIM-synced identity. - Workload identity federation:
a service principalclient_idwith no secret, and a federation policy attached.
Design
Both SDKs wrap the Rust core: Java through JNI and Go (cgo) through the C FFI. So
the token exchange, request shaping, token cache, proactive refresh and
invalidate() handling are reused from the Rust core as-is (the
FederatedTokenProvider / IdpTokenSupplier from #760). This work is mostly
binding-layer work:
- Rust JNI / FFI layers: expose the federated provider, with a language
callback bridged as the IdP token supplier. Errors raised in the callback
propagate back as SDK auth errors. - Supplier identity: keep the stable identity-string cache key design from
#760, keyed on(client_id-or-none, table)plus supplier identity. Do not key
on callback pointers or handles, because addresses can be reused after
release. - Callback, not a bare token (same reasoning as #740): IdP tokens are
short-lived, so a static token would strand the stream when it expires. Callers
that hold a static token can wrap it in a trivial callback.
Backward compatibility
Purely additive and opt-in, same as #740.
Testing plan
- Unit tests in each binding: both modes, the callback is called only on a cache
miss or refresh,invalidate(), callback-error propagation, and independent
caching per mode and per service principal. - Live end-to-end validation of both modes on gRPC against a real workspace
(Entra ID), including a run over a full token lifetime to show auto-refresh. - README section and an example per SDK.
Related
- #740 (design and tracking issue for Rust/Python), #760 (implementation)
- Public docs: Zerobus federation section (already published)
I will proceed to open the PR(s) against this issue.
Proposed Solution
Java: a FederatedToken auth option on the stream builder that takes a
callback (Supplier<String>, plus an async Supplier<CompletableFuture<String>>
variant) and an optional clientId.
Go: an option on stream creation that takes
func(ctx context.Context) (string, error) and an optional client ID.
The existing client-credentials and custom HeadersProvider paths are
unchanged.
The above is open for discussion once the PR is created
Additional Context
No response
- Lingua principale
- Rust
- Stelle
- 95
- Fork
- 36
- Merge medio
- 4g 7h
- PR unite (30g)
- 46
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di databricks/zerobus-sdk
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
databricks/zerobus-sdk#910 ·
I maintainer di solito rispondono entro 4 giorni
-
[Rust] tools/generate_files tests require a system protoc (no vendored fallback)Forse già presa @alwaysprince05 l’ha presa 45 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
databricks/zerobus-sdk#875 ·
I maintainer di solito rispondono entro 4 giorni
-
[All] Conformance testsForse già presa @irinatomic-db l’ha presa 7 giorni fa. Aperta
databricks/zerobus-sdk#1068 · 1 assegnatario ·
I maintainer di solito rispondono entro 4 giorni
-
[Java] Forward native logs to SLF4J and expose stream metricsForse già presa @teodordelibasic-db l’ha presa 10 giorni fa. Aperta
databricks/zerobus-sdk#1020 · 1 assegnatario ·
I maintainer di solito rispondono entro 4 giorni
-
[Java] Support the protobuf-java 3.25 runtimeForse già presa @teodordelibasic-db l’ha presa 10 giorni fa. Aperta
databricks/zerobus-sdk#1019 · 1 assegnatario ·
I maintainer di solito rispondono entro 4 giorni
Tutte le issue di databricks/zerobus-sdk
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 63/100
servo/rust-smallvec#877 ·
-
A-documentation S-needs-triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
Quantinuum/hugr#3344 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
tauri-apps/plugins-workspace#3780 ·
I maintainer di solito rispondono entro 3 giorni