Skip to content

[P1] [FFI] Expose personal access token auth, token cache settings, and async federated auth #1131

Description

@teodordelibasic-db

SDK

FFI

Description

Besides OAuth client credentials, the Rust SDK can authenticate with:

  • a personal access token (PAT), and
  • federated auth: the application gets a token from its own identity provider (for example Microsoft Entra ID), and the SDK exchanges it for a Databricks token (FederatedTokenProvider and IdpTokenSupplier in rust/sdk/src/headers_provider.rs).

It can also turn its token cache off or change how early tokens are refreshed (token_cache_enabled and token_refresh_buffer on the SDK builder).

The C FFI creates streams with OAuth client credentials or a custom headers provider. PR #1106 adds blocking zerobus_sdk_create_stream_with_federated_token and zerobus_sdk_create_arrow_stream_with_federated_token for the Go SDK. Still missing: personal access tokens, async versions of the federated functions (which .NET needs), and the token cache settings.

Proposed Solution

  • Create a stream with a personal access token, in blocking and async versions
  • Async versions of the federated create functions from PR [Go] Add external-IdP token federation #1106, with a free_user_data hook for the token callback
  • SDK builder functions to enable or disable the token cache and set the refresh buffer
  • Tests, header docs, a README section and a NEXT_CHANGELOG entry

Additional Context

Priority P1: federated auth is required for GA, and the .NET work (#1142) depends on this. Builds on PR #1106 (federation in the FFI and the Go SDK, part of #1069). Related: #1119 (multiplexed streams). Rather than adding a zerobus_sdk_create_stream_* variant for every combination, consider one stream-builder handle that covers auth, record type and multiplexing.

Activity

  1. added
    enhancement
    ga-blocker
    on Nov 19, 2026
  2. changed the title [-][FFI] Expose personal access token and federated auth, and token cache settings[/-] [+][P1] [FFI] Expose personal access token and federated auth, and token cache settings[/+] on Nov 19, 2026
  3. changed the title [-][P1] [FFI] Expose personal access token and federated auth, and token cache settings[/-] [+][P1] [FFI] Expose personal access token auth, token cache settings, and async federated auth[/+] on Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancementga-blocker

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions