Repository navigation
feat(audit): name deleted resources and record no-op deletes - #5609
Merged
Merged
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
🌿 Preview your docs: https://nvidia-preview-pr-5609.docs.buildwithfern.com/openshell |
3 of 5 tasks
krishicks
force-pushed
the
feat/2911-name-deleted-resources/krishicks
branch
from
November 16, 2026 18:51
dc9f24c to
859548d
Compare
Base automatically changed from
feat/2911-record-gateway-mutations/krishicks
to
main
November 16, 2026 19:40
krishicks
force-pushed
the
feat/2911-name-deleted-resources/krishicks
branch
from
November 16, 2026 19:41
859548d to
fb5b6f1
Compare
krishicks
marked this pull request as ready for review
November 16, 2026 19:43
TaylorMutch
reviewed
Nov 16, 2026
TaylorMutch
previously approved these changes
Nov 16, 2026
TaylorMutch
left a comment
Contributor
There was a problem hiding this comment.
Approved. The earlier feedback about including requested deletion targets in authorization-denial events is optional and non-blocking; this approval stands even if that suggestion is not adopted.
A gateway mutation record named the method and outcome of a delete but not what it deleted, and a delete of a resource that was already gone looked the same as one that removed it. Delete records now list the selected workspace and the requested resource by name, with the sandbox ID once a sandbox delete is accepted. A delete that found nothing to remove records status_detail no_op:already_absent, and an asynchronous sandbox delete records accepted. Rejected, cancelled, and handler-denied deletes still name the requested resource. Refs #2911 Signed-off-by: Kris Hicks <khicks@nvidia.com>
krishicks
force-pushed
the
feat/2911-name-deleted-resources/krishicks
branch
from
November 16, 2026 22:20
fb5b6f1 to
b32c304
Compare
TaylorMutch
approved these changes
Nov 16, 2026
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.
Summary
Gateway mutation records name the method and outcome of a delete, but not what it deleted, and a delete of a resource that was already gone looks the same as one that removed it. Delete records now name the workspace and the requested resource, and say when a delete found nothing to remove or is still in progress.
Stacked on #5606; review only the last commit until that merges.
Related Issue
Part of #2911
Changes
grpc/mutation_audit.rsaddsdeletion(), which records the selected workspace and the requested resource by name before the handler runs, so rejected and cancelled deletes still name their target.DeletionOutcome::AlreadyAbsentrecordsstatus_detail: no_op:already_absent, andAcceptedrecordsaccepted. An accepted sandbox delete also records the sandbox ID asuid.DeleteSandbox,DeleteSandboxTemplate,DeleteService,DeleteProvider,DeleteProviderProfile,DeleteProviderRefresh,DeleteWorkspace, andRemoveWorkspaceMember.auth/audit/test_support.rsaddsaudited_mutationandcancelled_mutation, which run a real handler inside the audit scope.status_detailcoversno_op:, andresourcesnames what the call acted on.Before / after
Real OCSF output from the gateway's delete handlers, called by the test user in workspace
default:DeleteSandbox agent-01,allow_missing, absentstatus_detail, no resourcesno_op:already_absent;workspace:default,sandbox:agent-01DeleteSandbox agent-02, deletion runs asynchronouslystatus_detail, no resourcesaccepted;workspace:default,sandbox:agent-02with its ID asuidDeleteProvider github, absentrejected:not_found, no resourcesworkspace:default,provider:githubTesting
no_op:already_absentfor an absent resource; rejected, cancelled, accepted, and completed deletesChecklist