Skip to content

Latest commit

 

History

History
49 lines (33 loc) · 1.54 KB

README.md

File metadata and controls

49 lines (33 loc) · 1.54 KB

Keycloak HTTP Webhook Provider

CI

A Keycloak provider that posts events to a URL via HTTP POST as JSON

How to build

mvn clean install

How to install

Copy the provider to the correct directory:

cp target/keycloak_http_webhook_provider.jar /opt/keycloak/standalone/deployments/

In your config, you'll have to find the section

<subsystem xmlns="urn:jboss:domain:keycloak-server:1.1">

and inside that section insert

<spi name="eventsListener">
    <provider name="http_webhook" enabled="true">
        <properties>
            <property name="serverUrl" value="http://example.com/webhook"/>
            <property name="username" value="your-basic-auth-user"/>
            <property name="password" value="your-basic-auth-password"/>
        </properties>
    </provider>
</spi>

Next, add the provider as an event listener on your Keycloak instance. For instance:

/opt/jboss/keycloak/bin/kcadm.sh update events/config -s eventsListeners+=http_webhook \
    --no-config --server http://localhost:8080/auth --user admin --password admin --realm master

How to develop

To very quickly start a development instance of Keycloak with Docker, you can ran

keycloak/run-keycloak-container.sh

How to publish

Snapshot versions are automatically published via GitHub Actions. Pushing a tag will cause GitHub Actions to create a proper release with a build artifact.