Altinn / altinn-studio

Next generation open source Altinn platform and applications.
https://docs.altinn.studio
BSD 3-Clause "New" or "Revised" License
109 stars 73 forks source link

Deleting a user account should delete all its data #12902

Open mlqn opened 1 month ago

mlqn commented 1 month ago

Description

Closing a user account in Gitea should result in the deletion of all associated data.

Here is a non-exhaustive list of data that are not deleted :

A possible solution could be to add a new endpoint to our API that decommissions apps and cleans up all data, and then call this endpoint via webhooks when closing the account in Gitea

Additional Information

No response

### Tasks
- [ ] https://github.com/Altinn/altinn-studio/issues/12904
- [ ] Create a new endpoint that cleans up user data
- [ ] Create a new webhook for when a user account is deleted
nkylstad commented 3 weeks ago

Description

Closing a user account in Gitea should result in the deletion of all associated data.

Here is a non-exhaustive list of data that are not deleted :

  • Apps deployed to Kubernetes services

Not sure about this one. Only orgs have environments to deploy apps to, thus deleting a user should not do anything about the orgs deployed apps.

  • Repository / application files used by Studio

This is probably the most important one. The actual repos associated with the user will probably be deleted (would have to check with Gitea docs to confirm), but the local clone that is made for each user for each app they have accessed should definitely be deleted.

  • Docker repositories + docker images

Same as for deployed apps. Not something that is available to a user, only to an org.

  • Data in Postgres database (e.g. releases, deployments)

Same as for deployed apps. Not something that is available to a user, only to an org.

  • Analytics data, logs?

Is that classified as "data", or could we call analytics/logs metadata?

In general we need to figure our how Studio (Designer) will be notified when a user deletes their account in Gitea 🤔 They are two completely separate applications.