mirror of
https://github.com/keycloak/keycloak.git
synced 2026-05-14 20:09:01 -05:00
03cf229edf
Previously, getOrCreateResource() would return any resource found by its authz DB ID without verifying it belonged to the requested resource type. This allowed resources of one type (e.g. Users) to be silently added to a permission of a different type (e.g. Groups) by passing the internal authz resource ID. - For per-entity resources found by ID, validate the name resolves as the expected entity type via getResourceName(); throw ModelValidationException on mismatch Closes #37243 Signed-off-by: Vinit Kumar <30852363+ThreeMangoTrees@users.noreply.github.com> Co-authored-by: Vranan <vinitkumar.utd@gmail.com>