I have a question to the feature “scripts” - I have enabled the feature in my Dockerfile and when I build it I found in logs “INFO [org.keycloak.common.Profile] (build-38) Preview feature enabled: scripts”
In the new Admin-GUI under enabled Feature I can see the Feature “scripts” is enabled.
But when I clone a Authentication Flow and want to add a “Authenticator Execution” I can not found in the provider List “Script” - not in the new or old admin GUI.
Do you have any error or warning entires in your logs?
What is the content of keycloak-scripts.json?
Do you run a JDK version different from 11? (Script engine has to be manually added on newer Java versions…)?
Have you tried a maximal simple authenticator (just doing a context.success() within the authenticate(…) method)?
Or tried a primitive JS token mapper? Is that working?
If you try without docker on a bare metal setup, is it working then?
My failure -
I use a Dockerfile and build a custom docker Image.
When I import a script and rebuild it will affect in this.
When I import a script with the Dockerfile and build my container than it works.
So you can’t use the base image from quay.io and you have to build your own dockerfile?
So if the server says this:
2022-10-20 09:02:37,845 INFO [io.quarkus] (Shutdown thread) Keycloak stopped in 0.177s
Changes detected in configuration. Updating the server image.
Updating the configuration and installing your custom providers, if any. Please wait.
2022-10-20 09:02:44,184 INFO [org.keycloak.common.Profile] (build-95) Preview feature enabled: scripts
2022-10-20 09:02:50,643 INFO [io.quarkus.deployment.QuarkusAugmentor] (main) Quarkus augmentation completed in 8888ms
Server configuration updated and persisted. Run the following command to review the configuration:
kc.sh show-config
Next time you run the server, just run:
kc.sh start --optimized
Then its actually not doing what it is supposed to do “Installing your custom providers” and it needs to be done in the dockerfile? Geez.
EDIT: Same here, I can see the custom_providers jar.
My .jar file had an extra folder in it /build_folder/META-INF
I generated the jar with ansible, so i needed to fix the ansible command it it created it the right way, and I can use the quay.io image and don’t have to build it myself.