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

Notification log #551

Open
4 tasks
acn-sbuad opened this issue Jun 13, 2024 · 4 comments
Open
4 tasks

Notification log #551

acn-sbuad opened this issue Jun 13, 2024 · 4 comments
Labels
Epic status/draft Status: When you create an issue before you have enough info to properly describe the issue.

Comments

@acn-sbuad
Copy link
Contributor

acn-sbuad commented Jun 13, 2024

Description

A requirement of Notifications is to provide logs. Both for end user and system integrations. The logs must provide an overview of the activities that have been performed in relation to a specific notification and/or notification order.

Bør kunne slå opp på andre felter ifm varslingssenter etc
/api/log?associatedWith=urn:dialogporten:dialog-id:
Mulig modell:

  • varslingsordreid
  • innslagstype: sendeforsøk, bekreftetlevert
  • assosiasjonsId
  • userid
  • mottaker av varslingsordre (orgnr/fnr)
  • ressursid
  • endepunktstype (sms, epost, push?, brevdue)
  • endpunkt
  • tidspunkt

In scope

No response

Out of scope

No response

Additional Information

No response

Tasks

Preview Give feedback
@acn-sbuad acn-sbuad added status/draft Status: When you create an issue before you have enough info to properly describe the issue. Epic labels Jun 13, 2024
@elsand
Copy link
Member

elsand commented Jun 17, 2024

Here's a model we've been sketching with in Dialogporten:

// GET varsling.altinn.no/api/v1/notification-log/?associatedWith=urn:altinn:dialogporten:dialog-id:{{some-dialog-guid-here}}
[
  {
     "entryType": "sendAttemptMade", // a new entry for "deliveryConfirmed"
     "timestamp": "2024-06-20T10:34:45.2353522",
     "notificationOrderId": "{{some-notification-order-guid}}",
     "resource": "urn:altinn:resource:ske_tredjepartsopplysninger_boligsameier",
     "resourceinstance": "{{some-dialog-guid-here}}",
     "party": "urn:altinn:organization:identifier-no:912345678",
     "associatedWith": [
       { "type": "urn:altinn:dialogporten:dialog-id", "id": "{{some-dialog-guid-here}}" }
       { "type": "urn:altinn:dialogporten:transmission-id", "id": "{{some-transmission-guid-here}}" }
     ],
     "endpointType": "email",
     "endpoint": "some@example.com",
     "endpointOwnerName": "Ola Nordmann"
  }
]

Having natural IDs here (ie. fnr/dnr) is probably a no-go as we probably cannot substantiate that the end-user has a need for secure identification of each of the alerted recipients (this will often eg. include the general manager etc). We might get away with using internal IDs here (eg. user IDs) but then arbeidsflate (or the other end-user systems) will have to look this up somehow at runtime. As this is a (non-mutable) log, I would expect the endpoint owner name to be resolved at write-time and stored in the database. We can (and should) store the identifiers as well, but resolving these 10 years later is sometimes hard (people change names, dnr->fnr merge/splits).

@SandGrainOne
Copy link
Member

@elsand I would think the correct way to handle identifiers would be to find the current information. We shouldn't show the past name of a person or organization, but the current name.

@SandGrainOne
Copy link
Member

@elsand Burde vi se litt på tilgangskontroll av disse loggene? Skal hvem som helst kunne gjøre oppslag på "tilfeldige" dialog id å få ut loggen assosiert med den?

@elsand
Copy link
Member

elsand commented Oct 17, 2024

@elsand I would think the correct way to handle identifiers would be to find the current information. We shouldn't show the past name of a person or organization, but the current name.

I disagree; in principle logs should be immutable and reflect the state of things when the log entry was created, and not the state at any arbitrary display time, which is in context of the event that log entry represents is irrelevant or even misleading. This also lets us avoid storing personal identifiers in the logs.

Burde vi se litt på tilgangskontroll av disse loggene? Skal hvem som helst kunne gjøre oppslag på "tilfeldige" dialog id å få ut loggen assosiert med den?

Yes, this should be authorized, so information about resource and party should be preserved so that a PDP can be consulted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Epic status/draft Status: When you create an issue before you have enough info to properly describe the issue.
Projects
None yet
Development

No branches or pull requests

3 participants