Repository navigation
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block the changes enabling client audit events by default.
No open issues 🎉
What changed in this PR
Enables Admin API v2 client audit events by default, addressing #55698 while avoiding duplicate events for roles changed through client writes.
Changes:
- Removes the JVM property gate for client lifecycle events.
- Uses a separate, non-emitting event builder for client role changes.
- Updates tests to use default configuration and verify client-only events for role changes.
| File | Description |
|---|---|
| rest/admin-v2/tests/src/test/java/org/keycloak/tests/admin/client/v2/AdminEventV2Test.java | Removes event-toggle setup and adds role-event suppression coverage. |
| rest/admin-v2/services/src/main/java/org/keycloak/services/client/scim/ClientResourceTypeProvider.java | Enables client events by default and isolates role event handling. |
Review effort: Balanced
Unreported flaky test detectedIf the flaky tests below are affected by the changes, please review and update the changes accordingly. Otherwise, a maintainer should report the flaky tests prior to merging the PR. org.keycloak.testsuite.federation.ldap.LDAPUserLoginTest#loginLDAPUserCredentialVaultAuthenticationSimpleEncryptionStartTLSKeycloak CI - Java Distribution IT (windows-latest - temurin - 21) |
|
I'd keep firing the v1 role events here, otherwise it's a breaking change. |
It was unclear if that was ever intended behavior based upon what we're doing in 27 (as in these events are a bug), but I'm fine with keeping in 26.8 if you want. |
d659087 to
e99a131
Compare
Closes keycloak#55698 Signed-off-by: Steve Hawkins <shawkins@redhat.com>
e99a131 to
64db9dd
Compare
This presumes that it was our intention to always omit the v1 role events - if needed we can incorporate some of the change note from the roles service refactor to say that the v2 client events need to be used instead to determine role modifications.Closes #55698