Given below is my command to install bitnami keycloak on my kube.netes cluster
helm install kc --set auth.adminPassword=admin,auth.adminUser=admin,service.httpPort=8180 bitnami/keycloak -n my-namespace
I want to import realms(contains users,groups,clients and roles) into my keycloak but before i do that i need to enable upload scripts flag, most of you might already know that we can do that in using standalone.sh as given below on standalone keycloak installation
bin/standalone.bat -Djboss.socket.binding.port-offset=10 -Dkeycloak.profile.featur
e.upload_scripts=enabled
can someone help me how can I do this using helm install command by passing flags just as I am doing for auth.adminPassword=admin,auth.adminUser=admin,service.httpPort=8180
thanks in advance
In your Keycloak yaml file you need to add the field extraEnvVars
and set the KEYCLOAK_EXTRA_ARGS
environment variable as shown in the example below:
keycloak:
enabled: true
auth:
adminUser: admin
adminPassword: secret
extraEnvVars:
- name: KEYCLOAK_EXTRA_ARGS
value: -Dkeycloak.profile.feature.upload_scripts=enabled
extraVolumeMounts:
...
Bear in mind, however, that the feature upload_scripts
will be remove from Keycloak in the future.
From Keycloak Documentation :
Ability to upload scripts through the admin console is deprecated and will be removed in a future version of Keycloak
As dreamcrash said, the upload_scripts
feature is deprecated. As to what is the replacement, the Keycloak documentation says:
Administrators should always deploy scripts directly to the server using a JAR file to prevent attacks when you run scripts at runtime.
Meaning that you should upload your scripts as a JAR file into a specific folder ( /opt/jboss/keycloak/standalone/deployments/
in case of a docker container?), and avoid putting them into the real import file. More info in the Keycloak documentation .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.