digitaldemocratic/config/dd.sh

25 lines
849 B
Bash
Raw Normal View History

2021-04-08 13:52:16 +02:00
#!/bin/bash
source ../digitaldemocratic.conf
echo "Dump realm.json"
docker exec -i isard-sso-keycloak sh -c '/opt/jboss/keycloak/bin/kcadm.sh \
config credentials --server http://localhost:8080/auth \
--realm master --user $KEYCLOAK_USER --password $KEYCLOAK_PASSWORD &> /dev/null && \
/opt/jboss/keycloak/bin/kcadm.sh \
2021-05-19 19:19:16 +02:00
get realms/master' > keycloak/realm.json
2021-04-08 13:52:16 +02:00
2021-05-21 18:44:25 +02:00
echo "Dump clients.json"
2021-04-08 13:52:16 +02:00
docker exec -i isard-sso-keycloak sh -c '/opt/jboss/keycloak/bin/kcadm.sh \
config credentials --server http://localhost:8080/auth \
--realm master --user $KEYCLOAK_USER --password $KEYCLOAK_PASSWORD &> /dev/null && \
/opt/jboss/keycloak/bin/kcadm.sh \
2021-05-21 18:44:25 +02:00
get clients' > keycloak/clients.json
kcadm.sh create realms -f - << EOF
{ "realm": "demorealm", "enabled": true }
EOF
### NEW
./kcadm.sh update realms/master -f realm.json