Skip to content

Ravimoshark Keycloak Auth server implementation. It contains basic configuration for different environments.

Notifications You must be signed in to change notification settings

singletonsd/ravimoshark-apis-auth-app-keycloak

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RAVIMOSHARK LOCAL API AUTH

HOW TO RUN

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}

SETUP

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

TESTING SETUP

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

DOCS

TODO

  • Finish scripts.
  • Test scripts.
  • Added ci/cd.
  • Export a mssql volume folder.

© Singleton SD, France, 2019.

About

Ravimoshark Keycloak Auth server implementation. It contains basic configuration for different environments.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages