About arc42
arc42, the Template for documentation of software and system architecture.
By Dr. Gernot Starke, Dr. Peter Hruschka and contributors.
Template Revision: 7.0 EN (based on asciidoc), January 2017
© We acknowledge that this document uses material from the arc 42 architecture template, http://www.arc42.de. Created by Dr. Peter Hruschka & Dr. Gernot Starke.
1. System Scope and Context
1.1. Business Context
1.1.1. General Overview
The following graphic depicts 4 different examples how different RFs could potentially interact with our platform (OpenPrevo Hub).
The following table explains the graphic above in more detail. All the different interfaces used for the communication between the different systems, would be pre-defined REST interfaces. Therefore a RF can implement their system independent of any programming language / framework. Every time the platform informs a RF about a match, it would send the payment information to the RF so that they have all information needed to transfer the money.
System | Description |
---|---|
OpenPrevo Hub |
The Hub knows all different RFs which are registered on the platform and it is aware of their matching strategies. It is responsible for the matching. |
EX1 / RF1 |
The first and most likely the default strategy would be, that the RF provides the data of people leaving or entering this RF. The platform fetches the data in regular intervals and matches it. The RF will be informed about the matches. Every match must be notified only once. |
EX2 / RF2 |
If the RF does not want to provide an interface, it can also push the data into the platform and the platform stores the data. The platform still performs regularly its matching. The RF can consume the current matches via an API. |
EX3 / RF3 |
Another strategy would be that the RF itself does the matching. Therefore the platform would ask the RF for matches during the execution of the matching. On the other hand the RF can also ask the platform for matches, e.g. when a new person enters into their system. Also here the platform would notify the RF if there is a match and provide the payment information. The goal of this strategy would be that the data never leaves the RF. |
EX4 / RF4 |
There might be even the case that a RF wants to manually enter the data on the platform. This would most likely be a web application. The application would also display all matches for the entered data. |
To limit the information that will be exchanged between the different RFs and the platform, every RF needs to provide a unique identifier (UID) for each person. In the case of a match the platform would then only inform the RF that we found a match for a certain UID and how the money needs to be transferred to the new RF.
1.1.2. MVP Business Context
To limit the scope for the MVP, we decided to implement the following solution. There will be only one of the above mentioned strategies (EX1/RF1), but we’ll provide two different implementations. One of the implementation would integrate with the PAKT system and on the other hand we’ll provide a simple implementation which could potentially be used by a small RF.
System | Description |
---|---|
OpenPrevo Hub |
The Hub fetches the data of the different RFs and is responsible for the matching. |
PAKT |
"Personen Applikation Kollektiv" which is used by different RFs to manage their customers. The TOE / COE will be extracted from the system and stored in a database that can be consumed by the OpenPrevo Client. |
OpenPrevo Node |
An implementation of the API that can be consumed by the OpenPrevo Hub. The node should be able to consume different data storages like e.g. a database or an Excel file. |
Excel File |
Could be a simple data exchange format for a small RF, if they’re not able to provide an integration into their system. |
2. Solution Strategy
2.1. Technology Decisions
In the team we’ve decided to use the following technologies:
-
Language: Java 8
-
Framework: Spring Boot
-
REST API
-
OpenAPI Swagger for documentation
-
-
used during development
-
Docker container for integration testing
-
OpenJ9-JVM
-
3. Runtime View
3.1. Hub
3.1.1. main loop: data lookup, matching and notification
-
Node A: has a matching termination
-
Node B: has a matching commencement
-
Step: lookup data at nodes (in parallel)
-
ask nodes for commencement of employment(s)
-
ask nodes for termination of employment(s)
-
-
Step: wait for response(s)
-
Step: find match(es) in response(s)
-
Step: notify about match(es)
-
notify node B with matching commencement (passing the public key from node A with termination) and ask for payload
-
notify node A with matching termination (and encrypted payload from B)
-
optional (in grey)
-
response from A to B
-
pass the public key on notify from node B to A
-
pass encrypted response from A to B
-
-
4. Cross-cutting Concepts
4.1. Security and data protection
Since we’re operating on very sensitive information, security is an important aspect of this project.
4.1.1. Authentication
When a Node and the Hub communicate with each other, both have to ensure that the communication partner is the one it claims to be. Our recommendation is to handle the authentication via server-certificates.
As this can be done with standard technologies (e.g. Spring Security) and does not add much value when demonstrating the functionality of OpenPrevo, we decided that authentication is out-of-scope for the MVP.
4.1.2. Symmetric Encryption
Currently we have implemented an end-to-end encryption for the exchange of the capital transfer information. Therefore the data is symmetrically encrypted via AES 256 by using a randomly generated Key and IV (inital vector) for every time it is being encrypted.
The key and the IV are then encrypted via an asymmetric encryption method, so that only the recipient is able to decrypt the key and the data itself. This is described in the next chapter.
4.1.3. Asymmetric Encryption
To encrypt the data asymmetrically, we’re using the RSA algorithm. Each participant of the OpenPrevo system needs to have a private and public-key pair. The public key will be provided via a public key registry. The private key must not leave a RFs environment.
4.1.4. Public Key Registry
To implement reliable authentication, signatures, and encryption via public- and private keys, one has to ensure that the public keys in use are really coming from the communication partner. In principal there are three approaches how public keys can be distributed:
-
In addition to the hub, we setup a central key server for the public keys. Every time a node requires the public key of another node, it requests it from the server. Only authorised persons must be allowed to change the key of their node. In addition a notification should be sent out to the RF every time the public key of a node has been changed. One may wonder, why the RFs should trust the key server, if they do not trust the hub. Manipulations are much easier to discover, because the data is publicly visible and can be checked anytime. Technically an LDAP-server would probably already be sufficient, though specialized key servers exists, in particular in the PGP ecosystem.
-
The management and distribution of public keys can be outsourced to an independent third party. There are service providers, who offer PKI as a service. With this solution, the distribution of the public keys would be completely separated from the organization that is running OpenPrevo. But it also means that all RFs have to trust the service provider.
-
A completely different approach is a "web of trust". If a participant is sure, that a public key belongs to another participant, he or she can sign the public key. The more signatures the public key of a person has, who is unknown to me, the more I can trust his or her public key. Usually one sets a threshold when unknown keys can be trusted, e.g. if it has three or more signatures. One difficult question to be answered is how a new participant can get the first signatures. This approach is the least feasible in our context and should only be chosen, if the RFs cannot agree on a central instance that everybody trusts (internal or external).
It needs to be decided, if the public key registry will be maintained by the same team that maintains the hub, if it will be outsourced to an independent third party or if no central authority can be established and a "web of trust" has to be implemented. This is not a technical question and probably has to be discussed with potential customers first. Therefore it is probably out-of-scope of the MVP.
4.1.5. Signing
To make sure that the data (in our case the capital transfer information) originates really from the correct RF and not another party encrypted some information with ones public key, we sign the message before we sent it to the other RF. The message is signed with the private key of the RF, so only the RF itself is capable of doing this. For signing we’re using the SHA256withRSA algorithm.
4.1.6. Hashing
According to data protection guidelines in Switzerland we are not allowed to read any personal data of an insured person on our platform. Therefore, a RF is responsible for sending us only a hash of their data. For hashing we use SHA-512 algorithm.
4.1.7. Transport-Layer Security
In a production environment we recommend to use HTTPS exclusively. This can be achieved using standard technologies and is rather a question of deployment than one of development. Therefore we decided that this is not part of the MVP.
As an additional security measure, the Hub should be enhanced so that it accepts only HTTPS-Urls to communicate with the Nodes.
4.2. Legal compliance
4.2.1. FZG background
The old / previous retirement fund is legally obligated to transfer the FZL to the new / next retirement fund.
Treten Versicherte in eine neue Vorsorgeeinrichtung ein, so hat die frühere Vorsorgeeinrichtung die Austrittsleistung an die neue zu überweisen.
Artikel 3 Absatz 1
The insured person has no choice: only if no new retirement fund is available he has a choice.
Versicherte, die nicht in eine neue Vorsorgeeinrichtung eintreten, haben ihrer Vorsorgeeinrichtung mitzuteilen, in welcher zulässigen Form sie den Vorsorgeschutz erhalten wollen.
Artikel 4 Absatz 1
When entering a new retirement fund the FZE has to transfer the vested benefits to the new retirement fund.
Treten die Versicherten in eine neue Vorsorgeeinrichtung ein, so müssen die Freizügigkeitseinrichtungen das Vorsorgekapital für die Erhaltung des Vorsorgeschutzes der neuen Vorsorgeeinrichtung überweisen.
Artikel 4 Absatz 2bis
The new retirement fund is allowed to claim the FZL from the previous retirment fund.
Die Vorsorgeeinrichtung kann die Austrittsleistung aus dem früheren Vorsorgeverhältnis sowie das Vorsorgekapital aus einer Form der Vorsorgeschutzerhaltung für Rechnung der Versicherten einfordern.
Artikel 11 Absatz 2
4.2.2. BVG background
Neutral institutions assigned with tasks (performing, controlling, supervision) related to the federal BVG law are allowed to process the necessary data.
Sofern kein überwiegendes Privatinteresse entgegensteht, dürfen Daten bekannt gegeben werden an a. andere mit der Durchführung sowie der Kontrolle oder der Beaufsichtigung der Durchführung dieses Gesetzes betrauten Organe, wenn sie für die Erfüllung der ihnen nach diesem Gesetz übertragenen Aufgaben erforderlich sind;
Artikel 86a Abschnitt g/a
4.2.3. "Verordnung des EDI" background: Usage of OASI numbers
We process OASI numbers in a systematic way without mutations, hence this by-law is applicable for OpenPrevo.
Für die systematische Verwendung der Versichertennummer in Datensammlungen, in denen keinerlei Mutationen im Zusammenhang mit der Versichertennummer vorgenommen werden, sind nur die Bestimmungen nach den Artikeln 6-8 anwendbar.
Artikel 2 Absatz 2
Risk analysis and minimal security requirements
2) Wird die Versichertennummer in komplexen Systemen systematisch verwendet, so sind die nötigen Schutzmassnahmen gestützt auf eine detaillierte Risikoanalyse zu treffen. Die Analyse hat insbesondere dem Risiko einer unerlaubten Zusammenführung von Datensammlungen Rechnung zu tragen. 3) Beim Betrieb von Informatikmitteln und Datenspeichern sind die minimalen Sicherheitsvorgaben nach Anhang 2 einzuhalten.
Artikel 6 Absatz 2 und 3
Transferred data in public IT infrastructure has to be encrypted.
Werden Datensammlungen mit Datensätzen, welche die Versichertennummer enthalten, über ein öffentliches Netz übertragen, so sind sie nach dem Stand der Technik zu verschlüsseln.
Artikel 7
Encrypted access only for authenticated and authorized partners with active auditing of activities and events
1) […] Beim Einsatz mobiler Informatikmittel und Datenspeicher muss mit Hilfe von dem Stand der Technik entsprechenden kryptografischen Verfahren (Datenverschlüsselung) sichergestellt sein, dass die Nutzung bzw. der Zugriff für Unberechtigte nicht möglich ist. 2) Der Zugriff auf Informatikmittel und Datenspeicher muss mit Hilfe von angemessenen, dem Stand der Technik und der Risikolage entsprechenden Informatiksicherheitsmassnahmen geschützt sein. […] 3) Benutzer und Benutzerinnen, die auf Informatikmittel und Datenspeicher zugreifen, müssen authentifiziert werden. […] 5) Auf Informatiksystemen sind wichtige Aktivitäten und Ereignisse aufzuzeichnen und regelmässig auszuwerten. […]
Anhang 2
5. Glossary
acronym | English | Deutsch | Française | Italiano | |
---|---|---|---|---|---|
Old-age and survivor’s insurance |
Alters- und Hinterlassenenversicherung (AHV) |
Assurance-vieillesse et survivants (AVS) |
Assicurazione vecchiaia e superstiti (AVS) |
||
Auxiliary fund |
Auffangeinrichtung |
Institution supplétive |
Istituto Collettore |
||
Benefits |
Leistungen |
Prestations |
Prestazioni |
||
Berufliche Vorsorge Gesetz |
Loi fédérale sur la prévoyance professionnelle vieillesse, survivants et invalidité (LPP) |
Legge federale sulla previdenza professionale per la vecchiaia, i superstiti e l’invalidità (LPP) |
|||
Central Compensation Office |
Zentrale Ausgleichsstelle (ZAS) |
La Centrale de compensation (CdC) |
L’Ufficio centrale di compensazione (UCC) |
||
CF |
Collective Foundation |
Sammelstiftung |
Fondation collective |
Fondazione collettiva |
|
CO |
Compensation Office |
Ausgleichskasse |
Caisse de compensation |
Cassa di compensazione |
|
COE |
Commencement of Employment |
Diensteintritt |
Entrée en service |
Entrata in servizio |
|
EC |
Employer Change |
Stellenwechsel |
|||
EDI |
Eidgenössische Departement des Innern |
Le Département fédéral de l’intérieur (DFI) |
Dipartimento federale dell’interno (DFI) |
||
inpayment slip with reference number (ISR) |
Einzahlungsschein mit Referenznummer |
bulletin de versement avec numéro de référence (BVR) |
bollettino di versamento con numero di riferimento (BVR) |
||
Federal law on vested benefits |
Freizügigkeitsgesetz |
Loi sur le libre passage (LFLP) |
Legge sul libero passaggio (LFLP) |
||
Occupational pension plan |
Berufliche Vorsorge (BV) |
Prévoyance professionelle (PP) |
Previdenza professionale (PP) |
||
PF |
Pension Fund |
Pensionskasse (PK) |
Caisse de pensions (CP) |
Cassa pensioni (CP) |
|
Personen Applikation Kollektiv |
|||||
Retirement |
Pensionierung |
Retraite |
Pensionamento |
||
RF |
Retirement fund |
Vorsorgeeinrichtung (VE) |
Institution de prévoyance |
istituto di previdenza |
|
Foundation |
Stiftung |
Fondation |
Fondazione |
||
Swiss Compensation Office |
Schweizerische Ausgleichskasse (SAK) |
Caisse suisse de compensation (CSC) |
Cassa svizzera di compensazione (CSC) |
||
TB |
Termination benefit |
Austrittsleistung |
Prestation de sortie |
Prestazione di uscita |
|
TOE |
Termination of Employment |
Dienstaustritt |
Sortie de service |
Uscita dal servizio |
|
Enterprise Identification Number |
Unternehmens-Identifikationsnummer |
Numéro d’identification des entreprises (IDE) |
Numero d’identificazione delle imprese (IDI) |
||
VB |
Vested Benefits |
Freizügigkeitsleistung (FZL) |
prestation de libre passage |
prestazione di libero passaggio |
|
VBI |
Vested Benefits Institution |
Freizügigkeitseinrichtung (FZE) |
institution de libre passage |
istituto di libero passaggio |
|
VBA |
Vested Benefits Account |
Freizügigkeitskonto |
Compte de libre passage |
Conto di libero passaggio |
|
VBP |
Vested Benefits Policy |
Freizügigkeitspolice |
Police de libre passage |
Polizza di libero passaggio |
|