adorsys / keycloak-config-cli

Import YAML/JSON-formatted configuration files into Keycloak - Configuration as Code for Keycloak.
Apache License 2.0
705 stars 133 forks source link

javascript Variable Substitution #934

Open taxone opened 9 months ago

taxone commented 9 months ago

Current Behavior

I'm trying to use javascript for variable substitution, as indicated in the documentation:

Script: $(script:javascript:3 + 4)

but it seems that it does not work properly.

Expected Behavior

The KeyCloak JSON file contains this line:

"enabled": $(script:javascript:"$(env:APP_ENV)" === "INT"),

The environment variable is defined and its value is 'INT'. When the CLI is executed I get the error below :

java.lang.IllegalArgumentException: Cannot resolve variable 'script:javascript:"INT" === "INT"' (enableSubstitutionInVariables=true)

Steps To Reproduce

No response

Environment

Anything else?

No response

vwegert-mag commented 4 months ago

I am seeing the same behavior wirh an even more basic expression: $(script:javascript:2*24*60*60)