In Your Login Works. Now Prove Who Did What, Hadil Ben Abdallah uses an unexpected role change to show how a software team can reconstruct a customer's identity history. The investigation has three parts: checking authentication activity, finding the administrative operation, and looking for subsequent actions in the application.
Start with the affected account
A user event can place a login, a failed authentication attempt, or a credential change on the timeline. A report about an unexpected promotion to administrator calls for a search of admin events as well. Those events cover operations through Keycloak's administrative interfaces, including role assignments. The administrator's identifier in the event can be resolved to an account in Keycloak. That establishes which account performed the operation and gives investigators a specific change to examine.
Choose how much of the request to keep
Keycloak configures event saving at the realm level. Its admin event settings offer an additional Include Representation switch. The switch can attach the JSON sent through the Admin REST API, which gives an investigator more context about the request. Ben Abdallah points out the storage cost and the need to consider what information the log retains. A team reviewing its configuration can check whether the ordinary event fields already answer the questions its support staff routinely receive before deciding how much request data to retain.
Follow the timeline into the application
A role assignment and a later export of customer data are distinct events. Keycloak can supply the identity-side record for the assignment. The application that handles the export needs to record the action, actor, target, time, and outcome itself. Ben Abdallah suggests bringing relevant events together so investigators can search across systems.
An investigation exercise can start with one known role change and one known business action in a test environment. The useful result is a timeline that lets someone locate both records and tell which account made each change, even when two people were active around the same time.