"Require SSL" with Docker

26 views
Skip to first unread message

bob sheknowdas

unread,
Dec 11, 2019, 4:58:14 AM12/11/19
to Keycloak User
Hi everyone,
 
is there a way to configure the master realm "Require SSL" property on container startup?
I'd like to avoid logging into the master console and  manually doing the configuration on each container reset.
 
Best
Bob

Vinod plank

unread,
Dec 11, 2019, 5:03:16 AM12/11/19
to Keycloak User
I do not have the one you are wishing, but I have a shell script which does the job. The shell scripts does require ssl to none. The code below, you may modify and use it. Thanks.
Host=myHost
User=ubuntu
Key=abc.pem
ssh -i $Key $User@$Host <<Block
docker exec -i keycloak_1 bash
cd keycloak/bin/
./kcadm.sh config credentials --server http://localhost:8080/auth --realm master --user admin --password password
sleep 2
./kcadm.sh update realms/master -s sslRequired=NONE
Block
echo "SSL is disabled"
Reply all
Reply to author
Forward
0 new messages