Altinn / altinn-register

Altinn platform microservice for handling register data
0 stars 1 forks source link

Analysis: Establishing Registers in Altinn 3 #171

Open TheTechArch opened 4 months ago

TheTechArch commented 4 months ago

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

image

image

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

SandGrainOne commented 1 month ago

@TheTechArch We're removing this issue from the Team Core board. If you want to track this you should add it to one of your boards.