keycloak / keycloak-quickstarts

Apache License 2.0
1.99k stars 985 forks source link

Could find js policy provider #375

Open afeiluo opened 1 year ago

afeiluo commented 1 year ago

Describe the bug

When I followed readme in app-authz-rest-springboot do the following step

You should also deploy some JS policies into the Keycloak Server. For that, perform the following steps:

   mvn -f ../authz-js-policies clean install && cp ../authz-js-policies/target/authz-js-policies.jar {KEYCLOAK_HOME}/standalone/deployments

I found that theres no dir named standalone/deployments in my keycloak home (my keycloak version is 20.0.3)

then I found that there is a providers dir in keycloak home , so I followed the step in readme file located in providers dir after start keycloak server with command bin/kc.sh start-dev successfully, when I import realm in admin console, it says occurs error, after checking log in it says :

ERROR [org.keycloak.services.error.KeycloakErrorHandler] (executor-thread-1) Uncaught server error: java.lang.RuntimeException: Could find policy provider with type [xxx.js]

Version

20.0.3

Expected behavior

import realm from json file succuessfully

Actual behavior

failed

How to Reproduce?

No response

Anything else?

No response

afeiluo commented 1 year ago

finnaly downgrade keycloak version to 12.0.4 solved