fix: clear every tuple on a deleted agent instance - #73
Open
vitramir wants to merge 1 commit into
Open
Conversation
Deleting an instance removed only the three tuples creation wrote, so can_write_inbox grants -- which are written afterwards, by whoever is allowed to write that inbox -- outlived the instance they named. The tuples on the instance are read back and deleted as a set. The one exception is organization membership, which names the instance as the user rather than the object and so is never returned by that read; it is still deleted by hand. Thread participations name it as the user too, but those belong to the threads and go with them.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
removeAgentInstanceAuthorizationdeleted only the three tuples creation wrote.can_write_inboxis granted after creation — to identities and groups allowed to write that inbox — so those grants outlived the instance they named. authz.md:185 requires every tuple on the object to go.The tuples on
agent_instance:<id>are now read back and deleted as a set.One exception is handled by hand: organization membership names the instance as the user rather than the object, so a read scoped to the object never returns it. My first attempt missed that and the existing test caught it. Thread participations also name the instance as the user, but those belong to the threads and are removed with them.