Claude Sonnet 5.5 · Balanced
add-client-resource-type-and-scopes-to-authorization-schema-keycloak
Keycloak · Java · L · 300–799 lines · 5 files
The normal review, with one generalist agent. Judge: Claude Haiku 5.5.
- Gold bugs found
- 2 of 8
- Comments published
- 2
- Comments matching a bug
- 2
- Comments not matching
- 0
- Cost of this PR
- $1.495
Published comments (2)
canExchangeTo throws UnsupportedOperationException, crashing token exchange in V2 — With V2 enabled, `MgmtPermissionsV2.clients()` returns this class, so `AbstractTokenExchangeProvider` hits an uncaught `UnsupportedOperationException` on every cross-audience exchange. Return `false` instead so the caller produces the normal 403 response.
getClientsWithPermission may miss per-client resources and include the type resource — Per-client resources made by `AdminPermissionsSchema.getOrCreateResource` have no type, so `resourceStore.findByType` likely skips them, and `AvailableRoleMappingResource` loses those clients. Iterate per-client resources by name or owner, or set the type there, and skip the "Clients" type resource.