Move PolicyEnforcerTest to keycloak-client repository #22
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
closes keycloak/keycloak#31980
Moving
PolicyEnforcerTest
from Keycloak repository to keycloak-client repository.The test requires some javascript policies deployed on the Keycloak server. So I've created module
providers
in the testsuite for the providers to be deployed to the server and added the javascript policies. For now, I've copy/pasted all the policies from this directory https://github.com/keycloak/keycloak/tree/main/testsuite/integration-arquillian/servers/auth-server/services/testsuite-providers-deployment/src/main/resources/scripts (Hence why so many changed files in this PR together with many enforcer files as mentioned below).Also copied all the enforcer configurations from this directory https://github.com/keycloak/keycloak/tree/main/testsuite/integration-arquillian/tests/base/src/test/resources/authorization-test (I hope we will be able to remove them from Keycloak main if we move all policy enforcer tests or whole policy enforcer)
Also copied some utilities, mostly utilities for manipulating representation objects (like
RealmBuilder
,UserBuilder
etc)For make the test passing on Keycloak 24, it is also this change needed in Keycloak main Impossible to import RolePolicy with newest admin-client against Keycloak 24 keycloak#32117 (Related PR Update RolePolicyRepresentation fields from 'boolean' to 'Boolean' keycloak#32118) . So I've also synced files after fix that one locally (Used separate commit for the synced files in this PR).