[keycloak-user] Show Username in Admin Events / Login Events

Huw McNamara huwmcnamara at msn.com
Fri May 17 15:17:55 EDT 2019


Hi Guido,

Apologies, I misread your question. I answered from the perspective of outputting the information to an external logging system. As far as extending the admin console goes, I do not know if that is possible. Hopefully, someone else on the mailing list can help.

Glad you got an answer to your second question.

Kind regards,
Huw
________________________________
From: Guido Wimmel <guido_99 at gmx.de>
Sent: 16 May 2019 20:06
To: Huw McNamara; keycloak-user at lists.jboss.org
Subject: Re: [keycloak-user] Show Username in Admin Events / Login Events

Hi Huw,

thank you very much for the helpful advice.

The event listener would be able to get the real user names - but probably the Admin Console would have to be extended somehow to make the user names appear in the Admin Events view?

BTW, the solution for the second question (seeing which roles were added/removed) is simple - just turning on "Include Representation".
Sorry for overlooking this.

Best regards,
   Guido

Am 13.05.19 um 20:07 schrieb Huw McNamara:
Hi Guido,

One possible way you could achieve what you want is to implement a custom event listener. See https://github.com/zekidkiller/keycloak/tree/master/examples/providers/event-listener-sysout for an example.

Then using a combination of the API https://www.keycloak.org/docs-api/6.0/rest-api/index.html#_users_resource and/or Keycloak classes https://www.keycloak.org/docs-api/6.0/javadocs/org/keycloak/storage/user/UserLookupProvider.html#getUserById-java.lang.String-org.keycloak.models.RealmModel- you should be able to get real values for IDs.

The easiest way might be the API as it is very frequently a 1-1 mapping for any resource path (given in the event details).

Kind regards,
Huw

________________________________
From: keycloak-user-bounces at lists.jboss.org<mailto:keycloak-user-bounces at lists.jboss.org> <keycloak-user-bounces at lists.jboss.org><mailto:keycloak-user-bounces at lists.jboss.org> on behalf of Guido Wimmel <guido_99 at gmx.de><mailto:guido_99 at gmx.de>
Sent: 08 May 2019 20:04
To: keycloak-user at lists.jboss.org<mailto:keycloak-user at lists.jboss.org>
Subject: Re: [keycloak-user] Show Username in Admin Events / Login Events

Hi,

does anyone possibly have similar concerns / a workaround? The Admin
Events View
in the Administration Console is of limited use for our Keycloak admins
if they have to lookup
the usernames of the concerned users.

In addition, it seems that the Admin Events do not contain information
on which role(s)
were assigned to / removed from a user - I can only see a general update
of the
client-role-mapping.
Is this true? Is there a way to extend the Admin Events such that it is
possible to see which role(s) were
added/removed?

Thanks in advance, best regards,
   Guido

On 06.04.19 10:39 Guido Wimmel wrote:
> Hi,
>
> in the Admin Events / Login Events - View in the Administration Console
> in Keycloak, I can see e.g. if users logged in or were assigned to a role.
> However, the users are only referenced by their id.
>
> I can determine the username by constructing an URL (e.g.
> .../realms/<MY_REALM>/users/<UserId> ) and navigating to it.
>
> Is there an easier way?
>
> Best regards,
>      Guido
>
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org<mailto:keycloak-user at lists.jboss.org>
> https://lists.jboss.org/mailman/listinfo/keycloak-user


_______________________________________________
keycloak-user mailing list
keycloak-user at lists.jboss.org<mailto:keycloak-user at lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/keycloak-user



More information about the keycloak-user mailing list