8000 Enable Admin API v2 client events by default by shawkins · Pull Request #55791 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

Enable Admin API v2 client events by default - #55791

Open
shawkins wants to merge 1 commit into
keycloak:release/26.8from
shawkins:issue-55698-client-v2-admin-events
Open

shawkins wants to merge 1 commit into
keycloak:release/26.8from
shawkins:issue-55698-client-v2-admin-events

Conversation

@shawkins
@shawkins shawkins commented Dec 3, 2026 •
Copy link
Copy Markdown
Contributor

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

Copilot AI left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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

@shawkins
shawkins marked this pull request as ready for review December 3, 2026 14:42
@shawkins
shawkins requested review from a team as code owners December 3, 2026 14:42
@keycloak-github-bot keycloak-github-bot Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unreported flaky test detected, please review

@keycloak-github-bot
Copy link
Copy Markdown

Unreported flaky test detected

If 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#loginLDAPUserCredentialVaultAuthenticationSimpleEncryptionStartTLS

Keycloak CI - Java Distribution IT (windows-latest - temurin - 21)

java.lang.RuntimeException: org.apache.http.NoHttpResponseException: localhost:8543 failed to respond
	at org.keycloak.testsuite.util.oauth.AbstractHttpPostRequest.send(AbstractHttpPostRequest.java:89)
	at org.keycloak.testsuite.util.oauth.AbstractOAuthClient.doAccessTokenRequest(AbstractOAuthClient.java:134)
	at org.keycloak.testsuite.AbstractTestRealmKeycloakTest.sendTokenRequestAndGetResponse(AbstractTestRealmKeycloakTest.java:126)
	at org.keycloak.testsuite.federation.ldap.LDAPUserLoginTest.verifyLoginSucceededAndLogout(LDAPUserLoginTest.java:153)
...

Report flaky test

@vmuzikar
vmuzikar commented Dec 3, 2026
Copy link
Copy Markdown
Contributor

I'd keep firing the v1 role events here, otherwise it's a breaking change.

@shawkins
shawkins commented Dec 3, 2026
Copy link
Copy Markdown
Contributor Author

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.

@shawkins
shawkins force-pushed the issue-55698-client-v2-admin-events branch from d659087 to e99a131 Compare December 3, 2026 19:25
Closes keycloak#55698

Signed-off-by: Steve Hawkins <shawkins@redhat.com>
@shawkins
shawkins force-pushed the issue-55698-client-v2-admin-events branch from e99a131 to 64db9dd Compare December 3, 2026 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Admin API v2 client mutations bypass admin event auditing by default

3 participants

0