Just run ./scripts/run.sh and access keycloak server in browser http://localhost:9090. User and password are admin.
You can pass port number as first parameter of run script, like following:
./scripts/run.sh ${OTHER_PORT_THAN_9090}
The easiest way to interact with keycloak is throw its cli tool. It is provided inside keycloak docker image.
docker run --name=kcadm.sh --network="host" --rm -it \
--entrypoint /bin/bash jboss/keycloak
Inside the container create the following alias:
alias kcadm.sh=/opt/jboss/keycloak/bin/kcadm.sh
Login to the server:
kcadm.sh config credentials \
--server http://localhost:8080/auth \
--realm master \
--user keycloak\_admin
Then you can execute the setup script contained in scripts folder:
./scripts/keycloak_setup.sh
You can ho ahead and import a test environment configuration directly by using the file under the path conf/realm-test.
After that, create a user using mockuser as username and password. Be aware that password must not be temporal and user must be enabled.
Finally, get Access token by executing:
curl -s -X POST \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'username=mockuser&grant_type=password&client_id=frontend-office&password=mockuser' \
http://localhost:9090/auth/realms/SAV/protocol/openid-connect/token
- Finish scripts.
- Test scripts.
- Added ci/cd.
- Export a mssql volume folder.
© Singleton SD, France, 2019.