This module is inspired by sentry-jboss-module.
This module helps you to send keycloak and jboss events to a sentry server.
Contributions are very welcome. Just open a pull request.
- Use a java build tool like gradle or maven to download and fulfill the transitive devendencies of the module
- Implement a custom event listerner spi suitable for keycloak which provides fine grained events generation
(https://dev.to/adwaitthattey/building-an-event-listener-spi-plugin-for-keycloak-2044)
- the default implementation distinguishes ony successful and error events (i.e. a password error is not the thing you always want to have as a sentry event)
- fingerprint/obfuscate userdetails to hide the detail information for non-GPDR compliant setups (we prefer to have our own on-prem instance :-))
- enhance context information of the events
- Create packages
Starting with sentry-release 4.1.0 it is possible to install a jul-based log handler in jboss/keycloak after the sentry project droped the resource for some time.
If you run keycloak with docker, you can execute this installation procedure right before starting the server process itself. (i.e. by placing the installation procedure as a shell script in /opt/jboss/startup-scripts/sentry.sh).
- Define a sentry project and gather the sentry dsn
- Stop your keycloak instance
- Identify your keycloak installation dir
- Run the installation target with the path
git clone https://github.com/scoopex/keycloak-sentry cd keycloak-sentry # "module" target supports you for pepackaging the module in you docker container make module make install KEYCLOAK_BASE_INSTALL_DIR=/opt/jboss/keycloak
- Set the following environment variables for your docker image or append them to them "/opt/jboss/keycloak/bin/standalone.conf" file
SENTRY_ENVIRONMENT=production SENTRY_DSN=https://[email protected]/4 export SENTRY_ENVIRONMENT SENTRY_DSN
- Start your keycloak instance
- Stop your keycloak instance
- Identify your keycloak installation dir
- Run the installation target with the path
git clone https://github.com/scoopex/keycloak-sentry cd keycloak-sentry make deinstall KEYCLOAK_BASE_INSTALL_DIR=/opt/jboss/keycloak
- Start your keycloak instance