Repository navigation
Replies: 7 comments
|
I tried to rebuild with features=scripts according to this documentation
It's indeed enabled But still not able to add a Script to the browser/registration flow, and I still have the error when loading my previous Custom Browser config that was using script
If no answer I will open a real ticket for this maybe ? |
|
Have you followed this guide and packaged your scripts in JAR Files and deployed them via file system? https://www.keycloak.org/docs/latest/server_development/index.html#_script_providers Editing scripts in browser and store them in the DB ist not supported any more... |
|
Thanks for this information @bonnm , I didn't know about this migration. I will try tomorrow and close the discussion. |
|
I tried today without success. I think my structure is good Every JS script here is correct I copy paste them from the admin UI of our keycloak 15 version I think my keycloak-scripts.json is correct too Then I build (I tries with and without --features=scripts) It even appears in kc.sh show-config The request to get the flow return this GET https://hostname/auth/admin/realms/hbp/authentication/flows/Custom%20browser/executions So I feel like nothing happens on the build, the 4 SPI that was saw in the logs are from an other providers (a java extension), but for the scripts extension nothing and my Custom Browser flow is still broken with same error than in the first post Did I forgot something ? |
|
The new jar-based JS providers and the old ones stored in your DB are not the same. You have to delete the old authenticators/flows/subflows/executions and create new ones with the new JS providers. If the deletion is not possible with the admin UI, try to delete them directly in the database. Then, in the admin UI, the new authenticators are listed each as single execution (named as defined in your keycloak-scripts.json), there's no generic javascript executor any more. To get the scrips executed in Java 17, you need to run Keycloak 21.1 (it ships with the necessary nashorn scripting engine). For older Keycloaks (21.0 and lower), Java 11 is needed (or Java 17 plus manually added nashorn engine). |
|
Thanks for the answer ! Indeed unbind my KC15 flow remove it and recreate it solved my issue ! Also I had to add I close this thread I hope it will help other persons. |
|
Hello! I would like to know why the ability to create and store JS scripts in the UI was deprecated |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
hello,
On my keycloak 15 instance I have a custom browser flow using some scripts script
In the new
/opt/keycloak/conffolder in keycloak 21 I have been creatingprofile.propertiescontainingThis was working on keycloak 15 but doesn't seems to works on keycloak 21
When I'm trying to reach my custom browser flow I have an error in the UI and a warning in the log
2023-04-18 18:25:58,995 WARN [org.keycloak.services.resources.admin.AuthenticationManagementResource] (executor-thread-5) Cannot find authentication provider implementation with provider ID 'auth-script-based'Screenshot
Are Script still available with KC 21 on Quarkus and how to use them please ? Any documentation ?
Thanks
All reactions