TheThingsNetwork / lorawan-stack

The Things Stack, an Open Source LoRaWAN Network Server
https://www.thethingsindustries.com/stack/
Apache License 2.0
983 stars 310 forks source link

Delete cascade connection profiles when deleting user/organization #7238

Open PavelJankoski opened 2 months ago

PavelJankoski commented 2 months ago

Summary

The connection profiles are not deleted when the user/organization that created them is deleted.

Steps to Reproduce

  1. Create user.
  2. Create wifi/ethernet profile with that user.
  3. Delete the user.
  4. Create user with the same user-id.
  5. Fetch profiles for that user.

Current Result

The previously created profiles are there.

Expected Result

Profiles should be empty for that user-id.

Deployment

The Things Stack Open Source (self-hosted)

Contributing

Validation

Code of Conduct

johanstokking commented 4 weeks ago

This is actually quite hard.

We would need to distribute deleted entities from IS to components (like GCS) to purge their own data stores, including remote databases, via some form of notifications from IS to clusters.

This will be useful for AS, NS and JS as well to clean up stuff.

I'm moving this out of the version milestone because this requires quite some work.