-
Bug
-
Resolution: Done
-
Undefined
-
None
Before reporting an issue
[x] I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.
Area
admin/client-java
Describe the bug
After upgrading Keycloak from 26.4.1 to 26.4.7, I observed that AdminEvent.getResourcePath() returns paths containing duplicated slashes (//),
for example:
{{clients//
This behavior did not occur in Keycloak 26.4.1.
The issue impacts Admin Event Listeners, where the resourcePath is forwarded as-is to downstream systems (e.g. message queues, audit logs). The duplicated slashes break downstream routing and require manual normalization.
Example usage of event listener class
`public class EventAdminNotificationMqMsg extends AdminEvent implements Serializable {
public static EventAdminNotificationMqMsg create(AdminEvent adminEvent) { EventAdminNotificationMqMsg msg = new EventAdminNotificationMqMsg(); msg.setAuthDetails(adminEvent.getAuthDetails()); msg.setError(adminEvent.getError()); msg.setOperationType(adminEvent.getOperationType()); msg.setRealmId(adminEvent.getRealmId()); msg.setRepresentation(adminEvent.getRepresentation()); --> msg.setResourcePath(adminEvent.getResourcePath()); msg.setResourceType(adminEvent.getResourceType()); msg.setResourceTypeAsString(adminEvent.getResourceTypeAsString()); msg.setTime(adminEvent.getTime()); return msg; }
}`
h3. Version
26.4.7
h3. Regression
[ ] The issue is a regression
h3. Expected behavior
`
{"resourcePath": "clients/{client-id}
"
`
Actual behavior
`
{"resourcePath": "clients//
"
`
How to Reproduce?
1. Deploy Keycloak 26.4.7 (tested on 26.4.7; does not occur on 26.4.1)
2. Enable or implement an Admin Event Listener that consumes AdminEvent
3. Log in to Keycloak Admin Console
4. Create a new client with any valid configuration and save it
5. In the Admin Event Listener, capture the AdminEvent generated by the client creation: adminEvent.getResourcePath()
6. Observe the emitted resourcePath value
Anything else?
No response
- links to