Innhold
1 Introduction
This document is mandated by https://jira.usit.uio.no/browse/CRB-1190.
It aims at providing an overall guideline for the future integration between Cerebrum and the various digital mailbox implementations officially used by the Norwegian state.
2 Goals
Currently Cerebrum is capable of providing sensitive information (most notably newly generated passwords) to unregistered users by email, paper-mail and SMS.
Each of those comes with security concerns and limitations.
The goal is to use the secure mail system(s) provided by the Norwegian state.
This document takes into consideration Difi's guidelines
3 Cerebrum
Currently most users (Person and Account instances) are registered (imported) using some form of import script.
Another possibility is to add the user completely manually via bofh.
We should be able to handle both cases by using the National-ID for the person in question (if available).
Cerebrum should be able to encrypt passwords and codes (tokens) to several recipients using its existing public key cryptography fundamentals. The Cerebrum WS should be able to provide the encrypted data to the corresponding recipient. Currently this is just a matter of configuration. Apart from that, no other changes or additional logic in Cerebrum should be required.
3.1 Difi and digital mailbox
Difi provides a SOAP API for interaction with their "backends" (currently Digipost and E-Boks). Detailed description of the architecture can be found here.
All available documentation as well as some code examples can be found on GitGub.
Difi's API is:
- serving as a proxy for the backend APIs.
- providing a lookup in the "reservation register"
- providing a fallback solution in case of reservation (usually a regular mail)
4 Recommendations
- extending / configuring the Cerebrum WS so it can handle encrypted passwords and / or temporary activation codes
- create a DigiMailbox micro-service (MS) that subscribes to events in a way similar to AD-MS and is able to communicate with the Difi API and other external APIs if needed. The DigiMailbox-MS will generate digi-mailbox messages (letters) based on predefined templates for each of the supported events. The MS should have a fallback capability in case of missing National-ID, technical error or temporary API unavailability. No changes in the existing message format should be necessary.
- message broker (RabbitMQ??) should be used in order to facilitate the interactions described above
5 Further steps
- Acquiring certificate from Difi
- Creating testuser at Difi
- Creating testusers (recipients) for the backends