Created
November 6, 2025 23:45
-
-
Save StevenJDH/caa7cfd59b546da34e24b7da1b2cd901 to your computer and use it in GitHub Desktop.
Strimzi 0.48.0 with Kafka 4.1.0 custom image workaround for strimzi/strimzi-kafka-oauth#283 to fix topic authorization failures when using Keycloak and delegateToKafkaAcls until official fix is released.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # USAGE: | |
| # docker build -f ./Strimzi-0.48.0-Kafka-4.1.0-OAuth-0.17.1-Dockerfile -t stevenjdh/kafka:0.48.0-kafka-4.1.0-oauth-0.17.1 . | |
| # docker run --rm -it stevenjdh/kafka:0.48.0-kafka-4.1.0-oauth-0.17.1 sh -c "ls -l /opt/kafka/libs/*.jar | grep kafka-oauth" | |
| FROM quay.io/strimzi/kafka:0.48.0-kafka-4.1.0 | |
| USER root:root | |
| ENV OAUTH_VERSION=0.17.1 \ | |
| MAVEN_BASE_URL=https://repo1.maven.org/maven2/io/strimzi \ | |
| KAFKA_LIBS_DIR=/opt/kafka/libs | |
| RUN set -eux; \ | |
| cd "${KAFKA_LIBS_DIR}"; \ | |
| \ | |
| rm -f kafka-oauth-common-0.17.0.jar kafka-oauth-keycloak-authorizer-0.17.0.jar; \ | |
| \ | |
| curl -fSL -O ${MAVEN_BASE_URL}/kafka-oauth-common/${OAUTH_VERSION}/kafka-oauth-common-${OAUTH_VERSION}.jar; \ | |
| curl -fSL -O ${MAVEN_BASE_URL}/kafka-oauth-keycloak-authorizer/${OAUTH_VERSION}/kafka-oauth-keycloak-authorizer-${OAUTH_VERSION}.jar; \ | |
| \ | |
| chown -R 1001:0 "${KAFKA_LIBS_DIR}"; \ | |
| chmod -R g+r "${KAFKA_LIBS_DIR}" | |
| USER 1001 |
Comments are disabled for this gist.