Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Altinn Platform Storage Integration PoC #1138

Open
10 of 16 tasks
Tracked by #55
elsand opened this issue Sep 16, 2024 · 1 comment
Open
10 of 16 tasks
Tracked by #55

Implement Altinn Platform Storage Integration PoC #1138

elsand opened this issue Sep 16, 2024 · 1 comment
Assignees

Comments

@elsand
Copy link
Member

elsand commented Sep 16, 2024

Introduction

This lays the groundwork for the solution outlined in #56 on the Dialogporten end.

The purpose of this PoC is to determine whether or not we have the data available for a basic, automatic integration and if the overall solution is feasible. After the PoC is done, we should have more information about how to move forward (do we need additional changes in storage, and/or changes in Studio?)

Description

See #56 for details.

In this PoC, we want to attempt to

  • Establish a git repository for the new component
  • Set up a ASP.NET application
  • Expose a Maskinporten-secured endpoint that takes a instance-id and app reference
  • Perform API requests to storage fetching instance and app metadata
  • Map the current state to a dialog
  • Create, update or delete the dialog using Dialogporten APIs

Out of scope:

  • Establishing a message bus
  • Message production in storage based on instance state changing events
  • Introducing admin scope for accessing any instance data (limited to Digdir/TTD apps in PoC)

Implementation

In order to support migration scenarios, we need to be able to map any given instance in any state (even without the corresponding app existing, save the application metadata) to a dialog. Each of the main state transitions (creation, archival, deletion) should add some sort of activity log entry. In addition, instance events should be mapped to activity history entries. Only a subset is relevant (ie. not every Save operation).

Deletion

Deleting from dialogporten are implemented as write actions, which require as dialog token enabled endpoint to access. This must be implemented and provided by dialogporten-adapter, which will verify the request via the dialog token and, if valid, proxy a deletion request to storage. This will (when implemented) trigger an event from storage to the adapter, which will in turn delete the dialog in Dialogporten. For the PoC, the adapter should dual write the deletion request to Dialogporten directly.

Tasks

Preview Give feedback
  1. 1 of 2
    arealmaas
  2. 2 of 2
    oskogstad
  3. 1 of 4
    oskogstad
  4. 3 of 5
    oskogstad
  5. 4 of 4
    Fargekritt
  6. 5 of 5
    Fargekritt
  7. Alxandr

Threat modelling

Preview Give feedback

Acceptance criteria

GIVEN ...
WHEN ....
THEN ...

GIVEN ...
WHEN ....
THEN ...

@MagnusSandgren
Copy link
Collaborator

MagnusSandgren commented Jan 24, 2025

Glenstående aktiviteter:

  • API-er fra altinn autorisasjon for å hente ut fnr/orgnr/systemuserid fra partyId/userId (se slack tråd)
  • Utvidelse av GET /storage/api/v1/instances i storage for å sortere på Created desc eller asc (se slack tråd)
  • ✅ Utvid DialogActivityType med Submitted og DraftSaved/FormSaved i Dialogporten
  • Ta i bruk alle endringene ovenfor i Storage.Platform.DialogpotenAdapter ☝️
  • Verifiser dialogtoken på DELETE /api/v1/instance/{instanceId} i Adapter
  • Skriv spec for når InstanceEvent skal sendes (ikke send dersom datavalues endres)
  • Ta stilling til applicaiton.hideSettings (ref dette)
  • Ta stilling til create copy (GuiAction for kopier? kun når instansen er arkivert) (ref dette)
  • Ta stilling til størrelsen på den konverterte dialogen slik at vi ikke får 413 payload too large fra dialogporten
    • Hva gjør vi dersom Attachments har for mange elementer?
    • Hva med om Activities har for mange elementer?
  • Ta stilling til hva vi gjør med summary. Det er et nødvendig felt i dialogen, men instansene har ingen konsept om summary.
  • Statiske LocalizationSet utfordringer:
    • Legg inn engelsk og nynorsk (i tillegg til norsk som ligger der fra før)
    • Templatefisere for å ikke duplisere data i dialogporten?

Gjenstående test oppgaver (ukomplett liste):

  • Verifiser at en dialog kan traversere fra Draft til InProgress etter et feedback steg.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Doing
Development

No branches or pull requests

2 participants