Keycloak: Enable Javascript-based policy

rounakcodes

rounakcodes

Posted on May 30, 2021

Keycloak: Enable Javascript-based policy

The recommended way to add Javascript based policy in Keycloak is to upload a JAR file.
However, if you are a Javascript developer with no clue what a JAR file is and have a deadline for your POC, then follow the below steps:

  1. In the keycloak folder from where you start your server using ./bin/standalone.sh, create a file profile.properties in standalone/configuration

  2. Paste feature.upload_scripts=enabled in the above created file

Run the server and you should be able to see "Javascript" under Clients > Authorization > Policies > Create Policy dropdown box

💖 💪 🙅 🚩
rounakcodes
rounakcodes

Posted on May 30, 2021

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related