Add support for admin events. This should be done by adding onEvent(AdminEvent event) to EventListener and corresponding methods to EventProvider. There should also be separate options to configure admin events, as well as separate screen to view admin events.
An admin event should contain:
- Operation Type (view, create, update, delete, action)
- Resource Path
- Auth Details
- Error (optional)
- Representation (only for create and update operation types)
Mock code is available at https://github.com/stianst/keycloak/tree/admin-events, most interesting are:
- EventListener - https://github.com/stianst/keycloak/blob/admin-events/events/api/src/main/java/org/keycloak/events/EventListenerProvider.java
- AdminEvent - https://github.com/stianst/keycloak/blob/admin-events/events/api/src/main/java/org/keycloak/events/admin/AdminEvent.java
- AdminEventQuery - https://github.com/stianst/keycloak/blob/admin-events/events/api/src/main/java/org/keycloak/events/admin/AdminEventQuery.java
- AuthDetails - https://github.com/stianst/keycloak/blob/admin-events/events/api/src/main/java/org/keycloak/events/admin/AuthDetails.java
- OperationType - https://github.com/stianst/keycloak/blob/admin-events/events/api/src/main/java/org/keycloak/events/admin/OperationType.java
User events and admin events are configured separately. Admin events allow enabling persistance of admin events, what operation types to persist and whether or not json representations should be included for create and update events.
Time, operation type, resource path and details are shown for each event. Clicking on Auth or Representation opens a modal panel displaying the details.
After clicking 'Auth' for an event the authentication details are shown in a modal panel
After clicking 'Represenation' for an event the json representation is shown in a modal panel
It is possible to filter/search for events by clicking on filter.