FusionAuth / fusionauth-issues

FusionAuth issue submission project
https://fusionauth.io
90 stars 12 forks source link

Deleting a Tenant does not remove entities from the search index #2600

Open jobannon opened 6 months ago

jobannon commented 6 months ago

Summary

Deleting a Tenant does not remove entities from the search index #2600

Description

When removing a tenant (synchronously or asynchronously), entities associated to that Tenant are removed, but the entities index does not update itself. Now-deleted entities are still included in the index.

Affects versions

>= 1.26.0

Steps to reproduce

  1. Create a tenant.
  2. Create one or more entities in that tenant.
  3. Delete this tenant
  4. Perform a search on one of the entities that was created in step 2.

Note that is evidenced by the entities view in the admin UI saying Displaying 1 to 7 of 10. In this case, Entities 8,9,10 are the removed entities from the Tenant Delete Operation, but Entities Index was not refreshed (it should say Displaying 1 to 7 of 7).

Expected behavior

If I have ten entities and three entities are created in tenant A. When I remove tenant A, the entities index should be updated to reflect this (i.e. Displaying 1 to 7 of 7 in the entities view in the Admin UI)

Workarounds

Re-indexing entities will correct the index.

Community guidelines

All issues filed in this repository must abide by the FusionAuth community guidelines