keycloak: client scripts need --realm passed in

single-dockerfile
Trammell Hudson 3 years ago
parent 8bab7bf77a
commit b7e6b19504
  1. 3
      keycloak/client-create
  2. 2
      keycloak/client-delete

@ -8,11 +8,12 @@ source ../env.production || die "no top levle env?"
source env.production || die "no local env?"
source "../data/keycloak/env.secrets" || die "no local secrets?"
sudo docker-compose exec -T keycloak \
docker-compose exec -T keycloak \
/opt/keycloak/bin/kcadm.sh \
create clients \
--server http://localhost:8080/ \
--user admin \
--realm master \
--password "$KEYCLOAK_ADMIN_PASSWORD" \
-r "$REALM" \
-f - \

@ -20,6 +20,7 @@ CLIENT_ID="$(docker-compose exec -T keycloak \
--server http://localhost:8080/ \
--user admin \
--password "$KEYCLOAK_ADMIN_PASSWORD" \
--realm master \
-r "$REALM" \
| jq -r ".[] | select( .clientId == \"$CLIENT_NAME\" ).id")"
@ -33,6 +34,7 @@ docker-compose exec -T keycloak \
delete "clients/$CLIENT_ID" \
--server http://localhost:8080/ \
--user admin \
--realm master \
--password "$KEYCLOAK_ADMIN_PASSWORD" \
-r "$REALM" \
|| die "$CLIENT_NAME($CLIENT_ID): unable to remove"

Loading…
Cancel
Save