strimzi / strimzi-kafka-oauth

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

Check path `kcadm.sh` in keycloak #238

Open flo-kn opened 4 months ago

flo-kn commented 4 months ago

At the very beginning the examples/README.md refers to the directory docker/keycloak to spin up keycloak and run the demos. Following that path one can see the keycloak container image including image tag from qay.io registry that is used for the examples is here in this compose.yml: https://github.com/strimzi/strimzi-kafka-oauth/blob/229daee85b096804d16e2904c8c0f1add599cc99/examples/docker/keycloak/compose.yml#L6

Going further in the guide, one will run into an error trying to navigate to the script kcadm.sh. The directory in the guide is not correct for the current image version of keycloak referenced above (Currently 23.0.5): https://github.com/strimzi/strimzi-kafka-oauth/blob/229daee85b096804d16e2904c8c0f1add599cc99/examples/README.md?plain=1#L25

As one can see, when logging into the container based on the image version used in the keycloak/compose.yaml the path to the script should rather be /opt/keycloak/

docker ps
CONTAINER ID   IMAGE                              COMMAND                  CREATED        STATUS                         PORTS                                            NAMES
17512408edb1   quay.io/keycloak/keycloak:23.0.5   "/opt/keycloak/bin/k…"   14 hours ago   Up 14 hours                    0.0.0.0:8080->8080/tcp, 0.0.0.0:8443->8443/tcp   docker-keycloak-1
docker exec -ti docker-keycloak-1 /bin/sh
ls /opt/keycloak/bin/
client  federation-sssd-setup.sh  kcadm.bat  kcadm.sh  kc.bat  kcreg.bat  kcreg.sh  kc.sh

Not 100% sure where the difference between the guide and the actual situation in the container comes from (maybe a change that came with version upgrade of the imagequay.io/keycloak/keycloak, but has never been adjusted in the readme), but from perspective the path to the script kcadm.sh needs to be adjusted to...:

cd /opt/keycloak/

...in order to be consistent with the rest of the example.