Skip to content
Snippets Groups Projects
Commit e7ecd257 authored by Marco Martorana's avatar Marco Martorana
Browse files

Updated README.md and removed un used

parent e3fbc357
No related branches found
No related tags found
No related merge requests found
# 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 these 3:
The docker-compose uses as internal components the following:
- Spring Boot as Controller
- PostgreSQL as meta-data storage DBMS
- Keycloak as IDM
......@@ -40,14 +40,14 @@ $ docker-compose up
## RESTFull APIs
An OpenAPI description is available in [dashboardapp-openapi.yaml](https://gitlab.com/marcomatto/urbanite-dashboard-controller/-/blob/main/dashboardapp-openapi.yaml)
An OpenAPI description is available in [dashboardapp-openapi.yaml](https://git.code.tecnalia.com/urbanite/private/wp5-integration-and-devops/urbanite-dashboard-controller/-/blob/master/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](https://gitlab.com/marcomatto/urbanite-dashboard-controller/-/blob/main/data_model.png)
The data model design is available in [data_model.png](https://git.code.tecnalia.com/urbanite/private/wp5-integration-and-devops/urbanite-dashboard-controller/-/blob/main/data_model.png)
Create Database manually:
......@@ -68,11 +68,11 @@ $ createdb dashboarddb
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](https://gitlab.com/marcomatto/urbanite-dashboard-controller/-/blob/main/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](https://gitlab.com/marcomatto/urbanite-dashboard-controller/-/blob/main/idm_config_0.png)
See [idm_config_1.png](https://git.code.tecnalia.com/urbanite/private/wp5-integration-and-devops/urbanite-dashboard-controller/-/blob/main/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](https://git.code.tecnalia.com/urbanite/private/wp5-integration-and-devops/urbanite-dashboard-controller/-/blob/main/idm_config_0.png)
<i>Note:</i>
In the [application.properties](https://gitlab.com/marcomatto/urbanite-dashboard-controller/-/tree/main/src/main/resources/application.properties) the followings properties defines the user's credential of the IDM user enabled with view permission (See IDM_USER*)
In the [application.properties](https://git.code.tecnalia.com/urbanite/private/wp5-integration-and-devops/urbanite-dashboard-controller/-/tree/main/src/main/resources/application.properties) the followings properties defines the user's credential of the IDM user enabled with view permission (See IDM_USER*)
```bash
idm.user4view.username
......
src/main/docker/idm_config_2(not used).png

44 KiB

src/main/docker/idm_config_3(not used).png

60.6 KiB

src/main/docker/idm_config_4(not used).png

35.1 KiB

# This configuration is intended for development purpose, it's **your** responsibility to harden it for production
version: '3.8'
services:
keycloak:
image: jboss/keycloak:12.0.4
command:
[
'-b',
'0.0.0.0',
'-Dkeycloak.migration.action=import',
'-Dkeycloak.migration.provider=dir',
'-Dkeycloak.migration.dir=/opt/jboss/keycloak/realm-config',
'-Dkeycloak.migration.strategy=OVERWRITE_EXISTING',
'-Djboss.socket.binding.port-offset=1000',
'-Dkeycloak.profile.feature.upload_scripts=enabled',
]
volumes:
- ./realm-config:/opt/jboss/keycloak/realm-config
environment:
- KEYCLOAK_USER=admin
- KEYCLOAK_PASSWORD=admin
- DB_VENDOR=h2
#- KEYCLOAK_LOGLEVEL=DEBUG
# If you want to expose these ports outside your dev PC,
# remove the "127.0.0.1:" prefix
ports:
- 9080:9080
- 9443:9443
- 10990:10990
This diff is collapsed.
{
"realm": "jhipster",
"users": [
{
"id": "4c973896-5761-41fc-8217-07c5d13a004b",
"createdTimestamp": 1505479415590,
"username": "admin",
"enabled": true,
"totp": false,
"emailVerified": true,
"firstName": "Admin",
"lastName": "Administrator",
"email": "admin@localhost",
"credentials": [
{
"id": "b860462b-9b02-48ba-9523-d3a8926a917b",
"type": "password",
"createdDate": 1505479429154,
"secretData": "{\"value\":\"4pf9K2jWSCcHC+CwsZP/qidN5pSmDUe6AX6wBerSGdBVKkExay8MWKx+EKmaaObZW6FVsD8vdW/ZsyUFD9gJ1Q==\",\"salt\":\"1/qNkZ5kr77jOMOBPBogGw==\"}",
"credentialData": "{\"hashIterations\":27500,\"algorithm\":\"pbkdf2-sha256\"}"
}
],
"disableableCredentialTypes": [],
"requiredActions": [],
"realmRoles": ["offline_access", "uma_authorization"],
"clientRoles": {
"account": ["view-profile", "manage-account"]
},
"notBefore": 0,
"groups": ["/Admins", "/Users"]
},
{
"id": "c4af4e2f-b432-4c3b-8405-cca86cd5b97b",
"createdTimestamp": 1505479373742,
"username": "user",
"enabled": true,
"totp": false,
"emailVerified": true,
"firstName": "",
"lastName": "User",
"email": "user@localhost",
"credentials": [
{
"id": "7821832b-1e82-45a2-b8d3-f1a6ad909e64",
"type": "password",
"createdDate": 1505479392766,
"secretData": "{\"value\":\"MbKsMgWPnZyImih8s4SaoCSCq+XIY/c6S9F93sXEidHF1TjPWxCqMkec0+o3860CMLXHt3az61cIJOWI0FW9aw==\",\"salt\":\"fmpBI1r8R1u75hDLMUlwBw==\"}",
"credentialData": "{\"hashIterations\":27500,\"algorithm\":\"pbkdf2-sha256\"}"
}
],
"disableableCredentialTypes": [],
"requiredActions": [],
"realmRoles": ["offline_access", "uma_authorization"],
"clientRoles": {
"account": ["view-profile", "manage-account"]
},
"notBefore": 0,
"groups": ["/Users"]
}
]
}
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment