Skip to content

Latest commit

 

History

History
107 lines (75 loc) · 2.69 KB

File metadata and controls

107 lines (75 loc) · 2.69 KB

Identity Access Management (IAM) Setup

This guide describes how to setup a IAM instance locally using docker container and import existing realm.json file.

Launch keycloak docker container

docker run --name keycloak -p 8088:8080 -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=admin -d jboss/keycloak

Import realm

Import the realm.json located in current directory

Create users

After importing the realm, the users need to be created manually.

Example users:

  • User 1: company 1 user
    Password: changeme
    Role: OEM, Dismantler

  • User 2: company 2 user
    Password: changeme
    Role: Recycler

Integration with vuejs app

Enable keycloak configuration

Install the keycloak plugin for vuejs app from npm install keycloak-js

The keycloak configurations are defined in dpp-frontend/src/services/service.const.js.

Build and run the app

npm install --legacy-peer-deps
npm run serve

General Docker commands

Build Image

docker build -t <IMAGE_NAME>:<IMAGE_TAG> .

Run Container

docker run -p <HOST_PORT>:<CONTAINER_PORT> --name <CONTAINER_NAME> -d <IMAGE_NAME>:<IMAGE_TAG>

Tag Image

docker tag <IMAGE_NAME>:<IMAGE_TAG> <REGISTRY>/<IMAGE_NAME>:<IMAGE_TAG>

Push Image

docker push <REGISTRY>/<IMAGE_NAME>:<IMAGE_TAG>

Stop Container

docker stop <CONTAINER_NAME>;

Remove Container

docker rm <CONTAINER_NAME>;

Java Remote Debugging:

Add this parameter when running docker run:

-e "JAVA_TOOL_OPTIONS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:8000" -p 8000:8000