-
Notifications
You must be signed in to change notification settings - Fork 0
Add HeadersProvider which provides needed gRPC connection headers
#5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: teodordelibasic-db <[email protected]>
9bbfb3b to
4a38b87
Compare
Signed-off-by: teodordelibasic-db <[email protected]>
Signed-off-by: teodordelibasic-db <[email protected]>
| ) -> ZerobusStream | ||
| ``` | ||
| Creates a new ingestion stream. Returns a `ZerobusStream` instance. | ||
| Creates a new ingestion stream using OAuth 2.0 Client Credentials authentication. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
| ### API Changes | ||
|
|
||
| - Added `HeadersProvider` abstract base class for custom header strategies | ||
| - Added `OAuthHeadersProvider` class for OAuth 2.0 authentication with Databricks OIDC endpoint |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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]>
What changes are proposed in this pull request?
HeadersProviderclass which has an abstract method to return touples of header keys and values for gRPC metadata.OAuthHeadersProviderclass which is implicitly created increate_streammethod so that we don't break the existing API.How is this tested?