Skip to content
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

Feature: add sasl_oauthbearer support #1631

Closed
filip-danieluk opened this issue Jul 29, 2024 · 1 comment · Fixed by #1632
Closed

Feature: add sasl_oauthbearer support #1631

filip-danieluk opened this issue Jul 29, 2024 · 1 comment · Fixed by #1632
Labels
enhancement New feature or request

Comments

@filip-danieluk
Copy link
Contributor

filip-danieluk commented Jul 29, 2024

Hi!

Faststream doesn't allow to authenticate with Oauth. According to librdkafka/CONFIGURATION.md sasl.mechanism must be set to OAUTHBEARER. However this value will get overwritten when specifying it in config and providing it during broker creation. To be precise it will get overwritten by one of _parse_* functions in faststream\confluent\security.py depending on which security class from faststream\security.py will be chosen. Changes should allow broker configuration with oauth:

broker = KafkaBroker(
    "host:port",
    config=config,
    security=SASLOAuthBearer(use_ssl=True),
)

To achieve this we need to implement a new security class and new parser. I have already created fork with these changes and successfully deployed it.

@filip-danieluk filip-danieluk added the enhancement New feature or request label Jul 29, 2024
@filip-danieluk
Copy link
Contributor Author

filip-danieluk commented Jul 29, 2024

PR resolving the issue #1632

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant