Skip to content
Snippets Groups Projects
Select Git revision
  • 83a7814cfdfb6045e1ef426c60a313e36d2190dc
  • master default
2 results

dashboard-controller

URBANITE Dashboard Controller

This repository contains the docker-compose used by the URBANITE Dashboard Controller (Spring Boot App) secured by Keycloak IDM.

The docker-compose uses as internal components the following:

  • Spring Boot as Controller
  • PostgreSQL as meta-data storage DBMS
  • Keycloak as IDM

Table of Contents

  1. Docker
  2. Docker-compose
  3. RESTFull APIs
  4. Data Model
  5. IDM Configuration
  6. License

Docker

Build docker image:

$ cd urbanite-dashboard-controller
$ docker build ./ -t dashboardapp

Docker-compose

Run docker image:

$ cd urbanite-dashboard-controller
$ docker-compose up

RESTFull APIs

An OpenAPI description is available in dashboardapp-openapi.yaml

The documentation of the REST services can be found when the root context is opened in a browser: http://localhost:8085/swagger-ui.html

Data Model

The data model design is available in data_model.png

Create Database manually:

$ docker exec -it <id_container_postgres> /bin/bash
$ su - postgres
$ createdb dashboarddb

Configuration changes on IDM Keycloak

  • IDM_USER*: Add the view permission to the "urbanite" keycloak user.
  • TOKEN_CLAIM: Change "Token Claim Name" on the "urbanite" realm.

Details:

  • IDM_USER: Add to the "urbanite" user following this path "Role Mappings", the view permission to reads users, groups and roles See idm_config_1.png. The "urbanite" user is the one enabled to see all users, groups and roles.
  • TOKEN_CLAIM: In the "urbanite" realm, following this path "Client Scopes > roles > Mappers > realm roles" set the "Token Claim Name" equals to "realm_access.roles" See idm_config_0.png

Note: In the docker-compose.yml the followings properties, in the dashboardapp.environment, defines the IDM URI and user's credential of the IDM user enabled with view permission (See IDM_USER*)

IDM_URI
IDM_USER4VIEW_USERNAME
IDM_USER4VIEW_PASSWORD

License

Apache License, Version 2.0