Skip to content

Conversation

@teodordelibasic-db
Copy link
Collaborator

@teodordelibasic-db teodordelibasic-db commented Oct 24, 2025

What changes are proposed in this pull request?

  1. Abstract HeadersProvider class which has an abstract method to return touples of header keys and values for gRPC metadata.
  2. Default OAuthHeadersProvider class which is implicitly created in create_stream method so that we don't break the existing API.

How is this tested?

  1. New unit tests.
  2. Manual testing.

Signed-off-by: teodordelibasic-db <[email protected]>
Signed-off-by: teodordelibasic-db <[email protected]>
Signed-off-by: teodordelibasic-db <[email protected]>
@teodordelibasic-db teodordelibasic-db marked this pull request as ready for review October 27, 2025 17:01
) -> ZerobusStream
```
Creates a new ingestion stream. Returns a `ZerobusStream` instance.
Creates a new ingestion stream using OAuth 2.0 Client Credentials authentication.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should mention that you also have to align with existing methods of authentication. Because I can already see a situation where someone will override this and not include needed authentication headers for Zerobus and complain.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment on lines 18 to +21
### API Changes

- Added `HeadersProvider` abstract base class for custom header strategies
- Added `OAuthHeadersProvider` class for OAuth 2.0 authentication with Databricks OIDC endpoint
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add the create_stream_with_headers_provider method here too

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Signed-off-by: teodordelibasic-db <[email protected]>
@teodordelibasic-db teodordelibasic-db added this pull request to the merge queue Oct 28, 2025
Merged via the queue into main with commit 6afbd65 Oct 28, 2025
10 checks passed
@teodordelibasic-db teodordelibasic-db deleted the headers-provider branch October 28, 2025 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants