strimzi / strimzi-kafka-oauth

OAuth2 support for Apache Kafka® to work with many OAuth2 authorization servers
Apache License 2.0
146 stars 90 forks source link

jayway:json-path dependency is required but excluded from kafka-oauth-client #209

Open ozangunalp opened 1 year ago

ozangunalp commented 1 year ago

Since the change 47e76b104838e9a11f468e6729b65bdb37eb122b the json-path dependency is required by the PricincipalExtractor but still is excluded from the kafka-oauth-client : https://github.com/strimzi/strimzi-kafka-oauth/blob/9fb18887f659817ea216a669a700440525fab866/oauth-client/pom.xml#L18C19-L18C19

This causes at least https://github.com/quarkusio/quarkus/issues/36653 for native builds but I think would result in class not founds at JVM runtime if json-path is not added manually to the classpath.

mstruk commented 1 year ago

Looks like a bug indeed. You can work around by explicitly adding json-path dependency to your project, but I agree it should not be excluded any more from the client. Looks like we need a test in the testsuite for this.

ozangunalp commented 1 year ago

Thanks!

The issue here is the change to the PricincipalExtractor effectively pulls json-path and transitively json-smart, whereas before only json related library required by the kafka-oauth-client was jackson-databind.

I just want to make sure this is done willingly.