Skip to main content

Multi-Tenancy

HIP CDR is built as a multi-tenant capable system. Multi-tenancy is promoted across nearly all services including EHRbase, CDR Bridge, CDR Suite, and other components. The logical separation of data is achieved using dedicated schemas for each tenant on the database level, complemented by OAuth2 authentication workflows in Keycloak.

Please note that the Multi-Tenancy feature has been developed with the integration into the HIP CDR platform in mind. This means that there are dependencies towards Keycloak and its multi-tenancy concept, which is based on the concept of realms in Keycloak (in which realms are used to represent a tenant).

For the case you want to use multi-tenancy in EHRbase outside the context of HIP CDR, please be aware of these dependencies.

Configuration

PropertyEnv VariableUseExample
multitenancy.enabledMULTITENANCY_ENABLEDEnables multi-tenancytrue

Attention: Enabling multi-tenancy will create additional schemas for each new tenant. Enabling it for an already running system should be done after carefuly considering migrating of the existing data.

REST API

For managing tenants through the REST API checkout the Multi-Tenant API Definition