-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Kafka SASL GSSAPI exception #20088
Comments
/cc @cescoffier, @ozangunalp |
I guess we will have to relax some checks. |
@sberyozkin any advice? |
@sberyozkin by any chance, you have an idea where this "wildfly.sasl.relax-compliance" property is managed in wildfly? I would like to see what it is actually doing. |
Thanks @irenakezic ! I'm seeing https://github.com/wildfly-security/wildfly-elytron/blob/021ae1a096f5e864bbe4fc153256e2a2871ea0d3/sasl/gssapi/src/main/java/org/wildfly/security/sasl/gssapi/AbstractGssapiMechanism.java#L76, so I'm wondering why the system property does not work in Quarkus. |
The property gets replaced by |
Workaround 1: Add
The question is whether we want to automatically detect that Elytron is on the classpath and inject the configuration automatically. @Ladicek @ozangunalp WDYT? |
I don't really have an opinion, but I guess adding this property unconditionally for the Kafka connector can't hurt? :-) |
We can add the |
Yes, it would be in the kafka-client extension. Most probably injected directly in the global config map. |
Hi @cescoffier, Do you have any suggestions on how to workaround this one? |
Did you try both workarounds? The problem is that it sees "true", and transforms it to a boolean in 1.11, but AbstractGssapiMechanism wants it as a String. |
@cescoffier I did try both options :( |
When you use Infinispan and Kafka at the same time and you connect to a Kafka broker with SASL, the SASL client uses Elytron. However, Elytron SASL implementation is stricter than what Kafka expects. This commit relaxes Elytron checks for Kafka.
Unfortunately, there is nothing we can do. How Elytron is configured is not really "Kafka-friendly" ("-" instead of ".", String value instead of object)... |
@cescoffier thx, I guess we will need to migrate to a more recent version than. |
When you use Infinispan and Kafka at the same time and you connect to a Kafka broker with SASL, the SASL client uses Elytron. However, Elytron SASL implementation is stricter than what Kafka expects. This commit relaxes Elytron checks for Kafka. (cherry picked from commit c17f875)
Describe the bug
Connecting to a Kafka broker using SASL GSSAPI works fine without the quarkus-infinispan-client extension. However, when quarkus-infinispan-client extension is added as a dependency the exception occurs when connecting to Kafka.
Expected behavior
Kafka connection is sucessful.
Actual behavior
The following exception occurs:
How to Reproduce?
Reproducer:
https://github.com/irenakezic/kafka-sasl.git
Steps to reproduce:
Please note that Kafka testcontainer in the example provided runs on port 9092 and container will not start properly if port is already taken on your localhost.
The reproducer is created using version 2.2.2.Final as it is the latest one but I need a fix for 1.11.7.Final-redhat-00009 if possible.
Output of
uname -a
orver
No response
Output of
java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
1.11.7.Final-redhat-00009
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
The reason is wildfly.elytron.sasl.gssapi dependency that comes along with quarkus-infinispan-client. It seems that elytron GSSAPI implementation has more restrictive checks than default one.
Noticed that wildfly uses "wildfly.sasl.relax-compliance" config property to relax security checks for elytron gssapi. I wonder if there an option to add something similar in Quarkus?
The text was updated successfully, but these errors were encountered: