JavaScript-Based Policy missing


I was testing keycloak’s authorization and found out that there is a type of policy called *JavaScript-Based policy (from Keycloak’s authorization documnetation).

Apparently it should be posible to create a new policy based on javascript by selecting the right option on the dropdown when you try to create a new one. But it doesn’t appear as it can be seen on this picture:

Also I was wondering why on some images from the official domunetation the authoraztion tab is located on the left hand side of the following image (In my keycloak it does not appear):

Thanks in advance.

Hi. I think it’s because the “upload_scripts” feature is now disabled by default (and deprecated).

You should be able to enable it by adding -Dkeycloak.profile.feature.upload_scripts=enabled option when starting the server. But the recommended way is to deploy any JS code via JARs, same as Java code (providers).