Storage server API that stores and serves various KomMonitor client config files
4.7K
This NodeJS project is part of the KomMonitor spatial data infrastructure. As a simple REST service it stores and serves several configuration files consumed by client applications like KomMonitor web client.
This Client Config Service offers REST endpoints to store and fetch configuration files consumed by the KomMonitor web client component. Thus it enables dynamic modification of configuration settings within dedicted administration pages of the web client. Three configuration files exist within the folder ./configStorage, each using a non-changeable name for update/retrieval via REST endpoint:
./configStorage/webClientAppConfig.js./configStorage/webClientKeycloakConfig.js - only relevant if KomMonitor stack uses active role-based data access via Keycloak./configStorage/webClientControlsConfig.js - only relevant if KomMonitor stack uses active role-based data access via KeycloakThe respective content of each file may change over time. Please refer to the documentation of the KomMonitor Web Client component to inspect each config file options or get hints on how to adjust contents.
The service is implemented as a NodeJS server application.
The described REST operations are specified using Swagger/OpenAPI v3. The corresponding openapi.yaml containing the REST API specification is located at api/openapi.yaml. To inspect the REST API you may use the online Swagger Editor or, having access to a running instance of the KomMonitor Client Config REST API simply navigate to <pathToDeyployedInstance>/docs, e.g. localhost:8088/docs.
Since version 2.0.0 KomMonitor Client Config service requires Keycloak for authenticated access to POST requests. Only KomMonitor administrators shall be allowed to call the POST endpoints of this service. Within the Keycloak realm the client-config component must be integrated as a realm client with access type confidential so that a keycloak secret can be retrieved and configured. The client config component itself is required by Web client component.
Only contains subset of whole KomMonitor stack to focus on the config parameters of this component
version: '2.1'
networks:
kommonitor:
name: kommonitor
services:
# web map client - main user interface of KomMonitor
kommonitor-client:
image: 'kommonitor/web-client'
container_name: kommonitor-client
#restart: unless-stopped
volumes:
- ./client/config-storage-server.json:/usr/share/nginx/html/config/config-storage-server.json # mount config for client-config-service
ports:
- 8089:80
networks:
- kommonitor
# simple REST service that stores and serves various config files for KomMonitor clients (i.e. web-client)
kommonitor-client-config:
image: 'kommonitor/client-config'
container_name: kommonitor-client-config
#restart: unless-stopped
ports:
- 8088:8088
networks:
- kommonitor
volumes:
- client_config_storage:/code/configStorage # persist web client config files on disk
environment:
- PORT=8088 # port
- KEYCLOAK_ENABLED=true # enable/disable keycloak
- KEYCLOAK_REALM=kommonitor # keycloak realm name
- KEYCLOAK_AUTH_SERVER_URL=http://localhost:8080/auth/ # keycloak target URL inlcuding /auth/
- KEYCLOAK_RESOURCE=kommonitor-client-config # keycloak client name
- KEYCLOAK_CLIENT_SECRET=keycloak-secret # keycloak client secret using access type confidential
- KOMMONITOR_ADMIN_ROLENAME=kommonitor-creator # name of kommonitor admin role within keycloak - default is 'kommonitor-creator'
| Name | Organization | |
|---|---|---|
| Christian Danowski-Buhren | Bochum University of Applied Sciences | [email protected] |
| Andreas Wytzisk | Bochum University of Applied Sciences | [email protected] |
Content type
Image
Digest
sha256:6665aa308…
Size
76.2 MB
Last updated
4 months ago
docker pull kommonitor/client-config