Currently, the registers (Folkeregister, ER) in Altinn 3 are just a proxy for our copy of the registers in Altinn 2.
This causes all calls are done to go to on-prem.
We need to be able to duplicate data into the authorization database to get high-performance queries where we need to register data. (Reportee list as an example)
We consider that is not possible when data is only available in Altinn 2
In scope
Support population of roles and names from own databases in Authorization
Requirements
Authorization needs data in its database to be performant enough
Should work after Altinn 2 is turned off
Altinn 2 will create PartyID and PartyID for new organizations and persons. Altinn 3 needs to get that from Altinn 2. (will later start generating that when Altinn 2 is turned off)
Enough data to support register person and organization
This strategy is based on the fact that integration with two Altinn registers is impossible for all registers and that Altinn 2 would be master for the PartyId and PartyUid.
Main concept
Event feed Altinn
Since Altinn 2 will be master for Register until Altinn 2 is shut down and Altinn 3 would need to update their copies of the register, Altinn 2 needs to publish changes on register data in Altinn 2. This include
New Organization
New Persons
Changes in status (death, bankruptcy)
New names
New roles
++
To support this, we will introduce a new Register database table where all jobs updating register data will add events.
Create data table for events
Update all jobs that update register data to push events to this table
Expose API to get changes from a given time/changeid.
Create job that can load events for all parties in to this table
Consuming event feed Altinn 2
We need a component to listen to the "event Feed" in Altinn 2 and push it to a cloud component like Azure Service Bus that can publish this to a topic that the Altinn 3 register listen to.
Consuming
Consuming topic in Altinn 3
When a new event happens for a party, the Altinn 3 register needs to call Altinn 2 to get updated data about the Party. This includes
Party info about ssn/orgno name +++
Roles connected to party
Addresses and other information
Altinn 3 register needs to identify the changes and store updates to the database.
Exposing Feed in Altinn 3 register
When Altinn 3 Register updates data, it should expose an event feed of changes to a component like Azure Service Bus.
This allows other components (like Access Management) to consume events and sync the needed data.
For access management only roles between org-org and org-persons are of interest. When changes on this happens in Altinn 3 Register, changes will be consumed by calling the Register API to load roles from Altinn 3 register
Tasks
Create a new table in Altinn 2 and register with PartyEvents. This table contains references to a party that has been updated, timing, a unique eventID, and eventType (creation, update, name change, rolechange+++ )
Update Folkeregister update code to also populate the new partyevent table
Update online API for ER also to update PartyEvents
Create ExportAPI on Bridge to be able to export all parties for initializing register. This need to be able to load sections with with input PartyID
PartyEvent API where input is first event after given eventID. If no eventID is given as input it shows the first 100 events
Separation
Should we have one register component or many register components?
Description
Currently, the registers (Folkeregister, ER) in Altinn 3 are just a proxy for our copy of the registers in Altinn 2.
This causes all calls are done to go to on-prem.
We need to be able to duplicate data into the authorization database to get high-performance queries where we need to register data. (Reportee list as an example)
We consider that is not possible when data is only available in Altinn 2
In scope
Requirements
https://github.com/Altinn/altinn-register/blob/main/Altinn.Platform.Models/src/Register/Models/Organization.cs
https://github.com/Altinn/altinn-register/blob/main/Altinn.Platform.Models/src/Register/Models/Person.cs
https://github.com/Altinn/altinn-register/blob/main/Altinn.Platform.Models/src/Register/Models/Party.cs
Overall strategy
Different strategies can be used.
Altinn 2 as master
This strategy is based on the fact that integration with two Altinn registers is impossible for all registers and that Altinn 2 would be master for the PartyId and PartyUid.
Main concept
Event feed Altinn
Since Altinn 2 will be master for Register until Altinn 2 is shut down and Altinn 3 would need to update their copies of the register, Altinn 2 needs to publish changes on register data in Altinn 2. This include
To support this, we will introduce a new Register database table where all jobs updating register data will add events.
Consuming event feed Altinn 2
We need a component to listen to the "event Feed" in Altinn 2 and push it to a cloud component like Azure Service Bus that can publish this to a topic that the Altinn 3 register listen to.
Consuming
Consuming topic in Altinn 3
When a new event happens for a party, the Altinn 3 register needs to call Altinn 2 to get updated data about the Party. This includes
Altinn 3 register needs to identify the changes and store updates to the database.
Exposing Feed in Altinn 3 register
When Altinn 3 Register updates data, it should expose an event feed of changes to a component like Azure Service Bus. This allows other components (like Access Management) to consume events and sync the needed data.
For access management only roles between org-org and org-persons are of interest. When changes on this happens in Altinn 3 Register, changes will be consumed by calling the Register API to load roles from Altinn 3 register
Tasks
Separation
Should we have one register component or many register components?
Database server?
Should we share
Database?
Should we share?
Import DSF
Batch/API
Import ER
Batch/API
Out of scope
No response
Additional Information
No response
Tasks
No response