This page contains topics supporting ongoing discussion at firstname.lastname@example.org.
Tracked as SYNCOPE-652.
The purpose of this new feature is to provide the possibility of defining separated "containers" for all entities currently managed by Syncope in order to allow the execution in multitenant environments.
- Physical separation: data for different domains MUST reside on different database instances
- Heterogeneity: data for different domains MAY be hosted on different database engines (domain A on MySQL, domain B on Oracle, ...)
Each and every entity will need to refer to a new Domain entity; all relationships among entities will require to be in the same domain.
The idea is to empower OpenJPA slices to achieve physical separation of SQL tables related to different domains (each domain will require a dedicated slice). An additional slice, the master slice, will always be available for working without domains or to hold domain information related to all domains.
The idea is to allow the definition of multiple
EntityManagerFactory instances via Spring's LocalContainerEntityManagerFactoryBean: being each
EntityManagerFactory related to a different
DBDictionary, this will permit to achieve physical separation of SQL tables related to different domains.
REST API changes
Each REST endpoint will check for the availability of a new HTTP header
X-Syncope-Domain containing the domain in which the requested operation will take place; absence of such header will imply that operation is to be performed on master domain.