Skip to content

[Java] Support custom HeadersProvider authentication #386

@Ewan-Keith

Description

@Ewan-Keith

SDK

Java

Description

The Java SDK currently only supports clientId + clientSecret Oauth flows, while the other SDKs and rust core support custom identity flows via HeadersProvider:

  • Rust: HeadersProvider trait and stream_builder().headers_provider(...), including Arrow streams.
  • Python: subclassable HeadersProvider, passed via headers_provider= or Arrow-specific provider creation methods.
  • TypeScript: public HeadersProvider interface and optional headers_provider support in stream creation.
  • Go: public HeadersProvider interface with CreateStreamWithHeadersProvider(...) and CreateArrowStreamWithHeadersProvider(...).

This prevents custom identity flows from being used with the Java SDK as is currently supported by all the other language SDKs.

Proposed Solution

Add Java SDK support for a custom authentication headers provider, matching the capability already exposed in the Rust, Python, TypeScript, and Go SDKs. This will let Java users implement their own identity flow and pass the resulting Zerobus authentication headers into stream creation, without requiring long-lived OAuth client credentials in the SDK configuration.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions