Keycloak is an open-source identity and access management tool. It helps add authentication to applications and secure services with minimum effort. Keycloak provides user federation, strong authentication, user management, fine-grained authorization, and more.
This integration parses the following types of logs:
user-event : Events generated from activity of users like authentication, and profile updates.
admin-event : Events generated from the activity of the admin.
Visualize detailed insights into these logs through the out-of-the-box dashboards. Additionally, out-of-the-box detection rules are available to help you monitor and respond to potential security threats effectively.
To install the Keycloak integration, run the following Agent installation command and the steps below. For more information, see the Integration Management documentation.
Note: This step is not necessary for Agent version >= 7.63.0.
Collecting logs is disabled by default in the Datadog Agent. Enable it in thedatadog.yaml:
logs_enabled:true
Add this configuration block to your keycloak.d/conf.yaml file to start collecting your logs.
See the sample keycloak.d/conf.yaml for available configuration options. The appropriate protocol (either TCP or UDP) should be chosen based on the Keycloak syslog forwarding configuration. By default, Keycloak uses TCP.
TCP: If TCP protocol is used for syslog forwarding, set the type to tcp.
UDP: If UDP protocol is used for syslog forwarding, modify the type to udp.
Connect to the remote machine where Keycloak is installed.
Navigate to the directory where Keycloak is installed (typically located at /opt/keycloak, depending on the configuration).
Add the following options in the start command to configure Keycloak to forward logs on the Datadog Agent server and execute the same options on the Keycloak server terminal.
Ensure traffic is bypassed from the configured port if the firewall is enabled.
Port already in use:
If you see the Port <PORT_NUMBER> Already in Use error, see the following instructions. The following example is for port 514:
On systems using Syslog, if the Agent listens for events on port 514, the following error can appear in the Agent logs: Can't start UDP forwarder on port 514: listen udp :514: bind: address already in use. This error occurs because by default, Syslog listens on port 514. To resolve this error, take one of the following steps:
Disable Syslog.
Configure the Agent to listen on a different, available port.