connectedhomeip icon indicating copy to clipboard operation
connectedhomeip copied to clipboard

Make sure Leave event is emitted on internal deletions of fabrics

Open tcarmelveilleux opened this issue 2 years ago • 2 comments

Problem

The Basic Info cluster Leave event is required to be generated when a fabric is removed. It is not certain this is generated in every instance of fabric removal.

Proposed Solution

  • Audit all paths of fabric removal to ensure Leave event is generated.

tcarmelveilleux avatar Jun 24 '22 02:06 tcarmelveilleux

@tcarmelveilleux Note that after https://github.com/project-chip/connectedhomeip/commit/e5e09f5c00 Leave event is no longer generated because ACLs are removed first and then generating a report fails with UNSUPPORTED_ACCESS error. I onced fixed it by moving this part to operational-credentials-server.cpp to have a better control over the order of the operation (see https://github.com/project-chip/connectedhomeip/pull/18434), but maybe we should do the other way around. The point is to execute all the actions in a single listener because otherwise it's very easy to break things by changing order of initialization of certain components.

Damian-Nordic avatar Jul 14 '22 13:07 Damian-Nordic

https://github.com/project-chip/connectedhomeip/issues/21012 tracks the ordering issue there.

bzbarsky-apple avatar Jul 25 '22 21:07 bzbarsky-apple

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] avatar Apr 25 '23 19:04 stale[bot]

We now generate Leave events in FabricWillBeRemoved, which is a notification from the fabric table. So any fabric removal that the fabric table knows about will generate the event.

@tcarmelveilleux Are you worried about fabric removals directly from storage, bypassing the fabric table?

bzbarsky-apple avatar Apr 25 '23 19:04 bzbarsky-apple