The DCM Maintenance App supports multi-tenancy for communication with the Case Engine, it's data sources and asynchronous messaging.
Enabling multi-tenancy
To enable multi-tenancy, the following properties should be provided in the configuration:
Code Block |
---|
language | yml |
---|
title | blueriq-dcm-maintenance-app.yml |
---|
|
blueriq:
multi-tenancy:
enabled: true
allowed-tenants:
- A
- B |
Excerpt |
---|
AuthenticationTo be able to use the DCM Maintenance App, the user should be authenticated. This is done through Keycloak as explained in Blueriq Gateway and OAuth2 configuration. The difference with multi-tenancy is that the application now expects a claim to be present in the JWT token with the claim path name "tenant" and with the tenant name as value. This claim name is customizable if the tenant is present in the JWT token with a different claim name. Customizing the tenant pathThe tenant claim can be customized using a JsonPath expression in the same way the roles-path and username-path can be set. Code Block |
---|
language | yml |
---|
title | blueriq-dcm-maintenance-app.yml |
---|
| blueriq:
jwt:
tenant-path: $.custom_tenant_claim_path |
RabbitMQ and MongoDB configurationFor RabbitMQ and MongoDB the properties need to be set per tenant as well. Currently, it's required to supply the queue and exchange names if multi-tenancy is enabled. This is an example of this configuration:
Code Block |
---|
language | yml |
---|
title | blueriq-dcm-maintenance-app.yml |
---|
| blueriq:
multi-tenancy:
enabled: true
allowed-tenants:
- A
- B
dcm:
maintenance:
app:
dlq:
retry:
delay: 2m
max-retries: 3
rabbitmq:
tenants:
A:
host: localhost
| port: 5672
username: guest
password: guest
virtualHost: A_vhost
queueNames:
- dcmEventsDlq
- dcmTasksEventsDlq
- dcmScheduledEventsDlq
- traceDlq
- timelineDlq
- dcmMaintenanceEventsDlq
- auditEventsDlq
- dcmListsEventsDlq
B:
host: localhost
port: 5672
username: guest
password: guest
virtualHost: B_vhost
queueNames:
- dcmEventsDlq
- dcmTasksEventsDlq
- dcmScheduledEventsDlq
- traceDlq
- timelineDlq
- dcmMaintenanceEventsDlq
- auditEventsDlq
- dcmListsEventsDlq
case-engine:
rabbitmq:
tenants:
A:
host: localhost
| username: guest
password: guest
queueNames:
- dcmMaintenanceEventsQueue
virtualHost: A_vhost
B:
host: localhost
| port: 5672
username: guest
password: guest
queueNames:
- dcmMaintenanceEventsQueue
virtualHost: B_vhost
mongodb:
tenants:
A:
host: localhost
| database: A_messages
B:
host: localhost
| port: 27017
database: B_messages |
|