luni, 5 mai 2025

Configure svenstaro/keycloak-http-webhook-provider for Keycloak 24.0.5

To configure svenstaro/keycloak-http-webhook-provider with Keycloak 24.0.5, I followed these steps:

Clone the repository: https://github.com/svenstaro/keycloak-http-webhook-provider

Create a Dockerfile in the root of the repository with the following content to build a custom Keycloak image that includes the webhook provider:

FROM quay.io/keycloak/keycloak:24.0.5-0

COPY target/keycloak_http_webhook_provider.jar /opt/keycloak/providers/

ENTRYPOINT ["/opt/keycloak/bin/kc.sh", "start-dev"]

Build the JAR

Build the Docker image:

docker buildx build --debug -t keycloak-http-webhook-provider .

Run the container with the required environment variables to configure the webhook:

docker run -e KC_SPI_EVENTS_LISTENER_HTTP_WEBHOOK_SERVER_URL=https://your-webhook-url \
           -e KC_SPI_EVENTS_LISTENER_HTTP_WEBHOOK_USERNAME=youruser \
           -e KC_SPI_EVENTS_LISTENER_HTTP_WEBHOOK_PASSWORD=yourpassword \
           -e KEYCLOAK_ADMIN=admin \
           -e KEYCLOAK_ADMIN_PASSWORD=admin \
           -p 8080:8080 keycloak-http-webhook-provider

Niciun comentariu:

Trimiteți un comentariu