Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

javascript Variable Substitution #934

Open
taxone opened this issue Oct 10, 2023 · 1 comment
Open

javascript Variable Substitution #934

taxone opened this issue Oct 10, 2023 · 1 comment
Labels

Comments

@taxone
Copy link

taxone commented Oct 10, 2023

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

  • Keycloak Version: 20.0.5
  • keycloak-config-cli Version: 8.5.0
  • Java Version:11

Anything else?

No response

@taxone taxone added the bug label Oct 10, 2023
@vwegert-mag
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants