SORMAS-Project
SORMAS-Project copied to clipboard
[S2S] share with jurisdiction, not with server instance
Feature Description
S2S should be able to target jurisdiction with a share, not only an instance.
Problem Description
Currently S2S was build with the assumption that a receiver is only responsible for one district, however, this is not true.
Proposed Change
Redesign S2S in such a way that a receiver can be responsible for multiple jurisdictions and handles receives messages correctly.
Implementation Details
- We do not need to change
SormasServerDescriptor
as on the transport layer, we still address the an instance - When sending a case, provide a list of all jurisdictions we can target (please note that central provides single source of truth here, so we can rely on local DB to be correct) and not all server descriptors (i.e., switch
SormasToSormasDiscoveryService::getAllAvailableServers
) - Extend each S2S message with the target jurisdiction. It is advisable to include the full path in jurisdiction/location tree b/c this gives us a lot of flexibility w.r.t. exchange between countries etc.
- The receiving instance assigns the target jurisdiction to the entity, which ensures that only people with the correct access rights can see the case or share in the directories.
- Please note that this implies that each SORMAS instance needs to know for which jurisdictions it is responsible. This can be a whole country, multiple regions, multiple districts, one district with multiple communities etc.
- We need a mapping between for the sender which maps jurisdiction to server descriptor