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

Include OAuth libs into images #29

Merged
merged 6 commits into from
Oct 29, 2024
Merged

Include OAuth libs into images #29

merged 6 commits into from
Oct 29, 2024

Conversation

see-quick
Copy link
Member

This PR adds OAuth libs to our images. That way, we can possibly configure OAuth inside the test-container repository. The image size increases by only 12 MB, which is negligible, in my opinion.

Signed-off-by: see-quick <maros.orsak159@gmail.com>
Signed-off-by: see-quick <maros.orsak159@gmail.com>
Signed-off-by: see-quick <maros.orsak159@gmail.com>
Signed-off-by: see-quick <maros.orsak159@gmail.com>
@see-quick see-quick requested a review from a team October 22, 2024 15:07
@see-quick see-quick self-assigned this Oct 22, 2024
@see-quick see-quick added this to the 0.109.0 milestone Oct 22, 2024
@see-quick see-quick added the enhancement New feature or request label Oct 22, 2024
Copy link
Member

@scholzj scholzj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we create something similar to the 3rd part libraries we have in operators repo here to add various addons? Adding it JAR by JAR does not seem to be very stable way to do this.

Signed-off-by: see-quick <maros.orsak159@gmail.com>
@see-quick
Copy link
Member Author

Should we create something similar to the 3rd part libraries we have in operators repo here to add various addons? Adding it JAR by JAR does not seem to be very stable way to do this.

Sure I can do it :).

Comment on lines +17 to +22
OAUTH_SERVER_URL="https://repo1.maven.org/maven2/io/strimzi/kafka-oauth-server/${OAUTH_LIB_VERSION}/kafka-oauth-server-${OAUTH_LIB_VERSION}.jar" && \
OAUTH_SERVER_PLAIN_URL="https://repo1.maven.org/maven2/io/strimzi/kafka-oauth-server-plain/${OAUTH_LIB_VERSION}/kafka-oauth-server-plain-${OAUTH_LIB_VERSION}.jar" && \
OAUTH_KEYCLOAK_AUTHORIZER_URL="https://repo1.maven.org/maven2/io/strimzi/kafka-oauth-keycloak-authorizer/${OAUTH_LIB_VERSION}/kafka-oauth-keycloak-authorizer-${OAUTH_LIB_VERSION}.jar" && \
OAUTH_CLIENT_URL="https://repo1.maven.org/maven2/io/strimzi/kafka-oauth-client/${OAUTH_LIB_VERSION}/kafka-oauth-client-${OAUTH_LIB_VERSION}.jar" && \
NIMBUS_JOSE_JWT_URL="https://repo1.maven.org/maven2/com/nimbusds/nimbus-jose-jwt/${NIMBUS_JOSE_JWT_VERSION}/nimbus-jose-jwt-${NIMBUS_JOSE_JWT_VERSION}.jar" && \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So if you wanna do it this way ... aren't you missing Jackson Databind and Json Path?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I tried using OAuth in test containers, and it worked well without any issues. If those libs were needed, would I get an error?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a question on @mstruk?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I guess they might be needed only in some configs?

Copy link
Member Author

@see-quick see-quick Oct 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I guess they might be needed only in some configs?

That's what I am thinking also 🤔 .

Copy link
Member Author

@see-quick see-quick Oct 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay using OAUTHBEARER method throws

Caused by: java.lang.ClassNotFoundException: com.fasterxml.jackson.annotation.JsonKey
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
	... 53 more

when using producer and consumer so I think those dependencies needed.

Signed-off-by: see-quick <maros.orsak159@gmail.com>
@scholzj
Copy link
Member

scholzj commented Oct 29, 2024

/azp run test-container-images

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@see-quick see-quick merged commit 2508ed9 into main Oct 29, 2024
3 checks passed
@see-quick see-quick deleted the oauth-include branch December 4, 2024 10:00
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 this pull request may close these issues.

2 participants