-
-
Notifications
You must be signed in to change notification settings - Fork 101
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
Auth: Support Azure Entra (Event Hub with Kafka Protocol) #530
Conversation
FE/BE Added Azure Entra Authentication for Event Hub
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.
Hi tnewman-at-gm! 👋
Welcome, and thank you for opening your first PR in the repo!
Please wait for triaging by our maintainers.
Please take a look at our contributing guide.
Fixed Linter errors
api/src/main/java/io/kafbat/ui/sasl/azure/entra/AzureEntraOAuthBearerTokenImpl.java
Outdated
Show resolved
Hide resolved
api/src/main/java/io/kafbat/ui/sasl/azure/entra/AzureEntraOAuthBearerTokenImpl.java
Outdated
Show resolved
Hide resolved
api/src/main/java/io/kafbat/ui/sasl/azure/entra/AzureEntraLoginCallbackHandler.java
Outdated
Show resolved
Hide resolved
api/src/main/java/io/kafbat/ui/sasl/azure/entra/AzureEntraLoginCallbackHandler.java
Outdated
Show resolved
Hide resolved
api/src/main/java/io/kafbat/ui/sasl/azure/entra/AzureEntraOAuthBearerTokenImpl.java
Outdated
Show resolved
Hide resolved
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.
This looks great! Thanks for contribution
Thank you. @Haarolean made some very good feedback on this PR, so I will make those updates within the next day or two. |
FE/BE - Azure Entra Support (Event Hub with Kafka Protocol)
Updated based on feedback |
@Haarolean, I addressed all of your comments. Can you take a look again? |
@tnewman-at-gm thanks for your contribution! |
@Haarolean / @tnewman-at-gm: why is a a login callback handler (AzureEntraLoginCallbackHandler) being specified as sasl.client.callback.handler.class and not sasl.login.callback.handler.class? I think either the class is named incorrectly, or the property is incorrect...? |
@credmond why should it be? It's the same for IAM:
|
It's not the same as IAMClientCallbackHandler (correctly) has the word "Client" in it, not "Login". (I tried to use "bold" in my previous comment to make my point obvious.) There is also a class called: There are two important properties in Kafka Java clients: sasl.login.callback.handler.class
None of those refer to "Client" in their class name. sasl.client.callback.handler.class
None of these refer to "Login" in their classname, except yours. So if you look around at all internal or 3rd-party libs, you'll see many classes with the word "Login", intended for use with sasl.login.callback.handler.class and many with the word "Client", intended for sasl.client.callback.handler.class. It's the convention. You do not see a class with the word "Login" in its name, intended to be used with sasl.client.callback.handler.class, or vica-versa. Also, to make things more confusing, the Azure docs refer to using the "login" (not client) property (https://learn.microsoft.com/en-us/azure/event-hubs/azure-event-hubs-kafka-overview) in their examples:
My point is, if you're building a class intended to be used for sasl.login.callback.handler.class, you usually do not use the word "Client" in it, and if you're building a class intended for use with sasl.client.callback.handler.class, you usually do not use the word "Login" in it. It's confusing and goes against the convention that everyone else had followed. So my question is why you've done this and if it's definitely correct? |
@credmond feel free to raise a PR, I don't mind accepting the renaming until this is released. @tnewman-at-gm what do you think? |
I agree that The Kafka docs directly call out that When is the next release planned? I can try to get this fixed, tested and PRed. |
Thanks folks -- I was mainly just curious how/why it was working for you... I don't have an Azure a/c to test. |
@credmond, I don't use the UI to add configuration. I edit the configuration YAML, so I think you pointed out something that was never going to work if someone tried it. |
Ah, good to know :) Thanks |
Shouldn't we rename the class in this case? |
It could be renamed if this will reduce confusion |
What changes did you make? (Give an overview)
Azure Event Hub provides Kafka protocol compatibility. This PR adds Azure Entra support to allow Kafka UI to authenticate with Event Hub with Kafka protocol using Azure Entra credentials.
Is there anything you'd like reviewers to focus on?
New Azure Entra classes and changes to the SASL configuration options on the front end.
How Has This Been Tested? (put an "x" (case-sensitive!) next to an item)
Checklist (put an "x" (case-sensitive!) next to all the items, otherwise the build will fail)
Check out Contributing and Code of Conduct
A picture of a cute animal (not mandatory but encouraged)