Skip to content

Latest commit

 

History

History
31 lines (25 loc) · 1.46 KB

README.md

File metadata and controls

31 lines (25 loc) · 1.46 KB

About

Example of implementing a Quarkus extension to mask Ip Addresses in Keycloak logs. Should be easy to build upon to integrate new filters.

Readers should be familiar with Java and Dependency Injection in Java frameworks.

With Extension

Picture of a log without Ip Address Masking

Running the Extension

A docker-compose.yml file has been provided. To run Keycloak with the extension, run the command docker compose up -d.

Issues/Contributions

Please create an issue if you have any questions. Contributions are welcome. Most of the code was put together using tutorials/documentation on the Quarkus website, stackoverflow, and reading Quarkus source code/tests.

References:

  1. https://quarkus.io/guides/building-my-first-extension#description-of-a-quarkus-extension
  2. https://quarkus.io/guides/logging#add-a-logging-filter-to-your-log-handler
  3. keycloak/keycloak#10884
  4. quarkusio/quarkus#25981
  5. https://stackoverflow.com/questions/68375755/how-to-intercept-logging-messages-with-quarkus-for-testing-purposes

FAQ

  1. How do I know that my extension has been loaded ? Check the logs. All the installed extensions ("features") are logged when Keycloak starts. Picture of Installed Features
  2. How can I create an extension ? Follow tutorial