Keycloak Logs - Device Information


We’re currently deploying keycloak in a docker container and I’m trying to establish if it’s possible to identify the source of a authentication request. Any information really that can provide guidance on what type of device requested the authentication (mobile, tablet, computer etc).

I have established that I can get the source IP in the logs which is a great start, however in the Keycloak manual Personal data collected by Keycloak

By default, Keycloak collects the following:

** Basic user profile, such as email, firstname, and lastname*
** Basic user profile used for social accounts and references to the social account when using a social login*
** Device information collected for audit and security purposes, such as the IP address, operating system name, and browser name it says the following… .*

The part that has my attention is the reference to operating system name and browser name. Can anyone provide further details on this? I’d really like to see these in the logs.

How can I log the OS name and Browser name?
How can I view the logs which show the OS name and Browser name?
Where are the logs stored for this information?

Kind Regards,

1 Like

I am also interested in capturing/viewing OS & Browser as well. Did you figure this out yet? I searched thru all the DB tables but don’t see anything obvious. Ideally, I would like to capture the user-agent with all the user login events. Is this possible out-of-the-box or would I need to implement my own event listener and log it to ELK or something like that? Thanks.

Just thought I’d reply to be kind. I stopped pursuing this, there is some basic information such as source IP that gets logged in the gui if enabled, but thats about all I could find.

good luck