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

Splitte ut seen til egen tabell #460

Closed
9 tasks done
elsand opened this issue Feb 20, 2024 · 0 comments
Closed
9 tasks done

Splitte ut seen til egen tabell #460

elsand opened this issue Feb 20, 2024 · 0 comments
Assignees

Comments

@elsand
Copy link
Member

elsand commented Feb 20, 2024

Introduksjon

Seen-innslag skilles ut fra aktivitetshistorikken over til egen tabell og del av dialog-aggregatet

Beskrivelse

Innslag i seen skiller seg ut fra de øvrige innslagene i aktivitetshistorikken, både fordi de populeres av dialogporten selv (og ikke tjenesteeier), og inneholder felter som kun finnes ifm seen (hash av sluttbrukers fnr). Her vil det også potensielt komme flere felter ifm seen-innslag utført gjennom tjenesteeier-API som oppgir sluttbruker-auth.

Implementasjon

Seen ser ut som følgende (ligger på rot som sibling av activities), hvor man kun viser de innslag som er nyere i tid enn updatedAt på dialogen:

{
// ...
    "seenSinceLastUpdate": {
    "seenAt": "2024-03-23T16:34:15.3400060Z",
    "seenBy": "OLA NORDMANN",
    "endUserIdHash": "42c8c25585",
    "isAuthenticatedUser": true,
    "via": [ // nullable. Skal kun populeres hvis seen gjøres via tjenesteeier-API
            {
                "value": "Norwegian Digitalisation Agency ",
                "cultureCode": "en-us"
            },
            {
                "value": "Digitaliseringsdirektoratet",
                "cultureCode": "nb-no"
            }
    ]
}
// ...

// For lista /dialogs/{dialogId}/seenlog - her får man ut absolutt alle seen-innslag sortert synkede etter seenAt
[
    {
        "seenAt": "2024-03-23T16:34:15.3400060Z",
        "seenBy": "OLA NORDMANN",
        "endUserIdHash": "42c8c25585",
        "isAuthenticatedUser": true,
        "via": [ // nullable. Skal kun populeres hvis seen gjøres via tjenesteeier-API
                {
                    "value": "Norwegian Digitalisation Agency ",
                    "cultureCode": "en-us"
                },
                {
                    "value": "Digitaliseringsdirektoratet",
                    "cultureCode": "nb-no"
                }
        ]
    }
]

// For enkelt "seen-innslag": /dialogs/{dialogId}/seenlog/{seendLogId}
{
    "seenAt": "2024-03-23T16:34:15.3400060Z",
    "seenBy": "OLA NORDMANN",
    "endUserIdHash": "42c8c25585",
    "IsCurrentEndUser": true,
    "via": [ // nullable. Skal kun populeres hvis seen gjøres via tjenesteeier-API
            {
                "value": "Norwegian Digitalisation Agency ",
                "cultureCode": "en-us"
            },
            {
                "value": "Digitaliseringsdirektoratet",
                "cultureCode": "nb-no"
            }
       ]
}

Logikk for når seen-innslag skal genereres forblir uforandret. Det å skulle legge inn seen-innslag med "via" håndteres i #386

Oppgaver

Preview Give feedback
  1. oskogstad
@elsand elsand added this to the Pilotproduksjon milestone Mar 19, 2024
@MagnusSandgren MagnusSandgren self-assigned this Mar 26, 2024
oskogstad added a commit that referenced this issue Apr 9, 2024
## Description
* New SeenLog endpoints for ServiceOwner
* Updated swagger

Marking as chore, don't need another entry in the changelog.  
I will make a manual edit on this before merging 1.4.0.

Adding tests in separate PR.

- #{issue number}
#460 

## Verification

- [x] **Your** code builds clean without any errors or warnings
- [x] Manual testing done (required)
- [x] Relevant automated test added (if you find this hard, leave it and
we'll help out)

## Documentation

- [x] Documentation is updated (either in `docs`-directory, Altinnpedia
or a separate linked PR in
[altinn-studio-docs.](https://github.com/Altinn/altinn-studio-docs), if
applicable)
oskogstad added a commit that referenced this issue Apr 29, 2024
Adding tests for hash length on seen log, EndUser queries

## Description

Making sure we don't leak un-hashed user IDs

## Related Issue(s)

- #460 

## Verification

- [x] **Your** code builds clean without any errors or warnings
- [x] Manual testing done (required)
- [x] Relevant automated test added (if you find this hard, leave it and
we'll help out)

## Documentation

- [ ] Documentation is updated (either in `docs`-directory, Altinnpedia
or a separate linked PR in
[altinn-studio-docs.](https://github.com/Altinn/altinn-studio-docs), if
applicable)
oskogstad added a commit that referenced this issue Apr 29, 2024
Adding the same test as for EU, verifying user ID hashes length

## Related Issue(s)

- #460

## Verification

- [x] **Your** code builds clean without any errors or warnings
- [x] Manual testing done (required)
- [x] Relevant automated test added (if you find this hard, leave it and
we'll help out)

## Documentation

- [ ] Documentation is updated (either in `docs`-directory, Altinnpedia
or a separate linked PR in
[altinn-studio-docs.](https://github.com/Altinn/altinn-studio-docs), if
applicable)
@elsand elsand closed this as completed May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants