Skip to content

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

License

Notifications You must be signed in to change notification settings

SizlePtyLtd/keycloak

 
 

Repository files navigation

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.

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 69.4%
  • Shell 18.7%
  • Dockerfile 11.9%