Repository navigation
feat: Block deleting in-service Devices with an opt-in admission policy - #177
Merged
Merged
Conversation
Add an opt-in component with a ValidatingAdmissionPolicy that denies Device deletes unless the Device is Retired, its namespace is being deleted, or the caller is a configured cleanup identity. No root in this repository includes it; deploying repositories opt in. Document the rule and the cleanup identity in the physical inventory guide, including that Milo should mark namespaces for deletion before purging their contents. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Extend the overlay isolation validator to require the exact fail-closed policy when the component renders alone, and to reject any root that renders a Device deletion policy. Add weakened-policy fixtures. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Run the component in a disposable API server and evaluate its expression offline. Cover each delete path, the cleanup identity and the fail-closed missing ConfigMap case. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kevwilliams
approved these changes
Nov 24, 2026
kevwilliams
left a comment
Contributor
There was a problem hiding this comment.
Verified at a 1.37 API server that direct, collection and impersonated deletes of non-Retired Devices are denied, and breaking the CEL turns three tests red.
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.
Related to #90, which this lands a piece of. #90 keeps a copy of the same component until it is rebuilt from main.
Adds an opt-in admission policy that stops an in-service Device from being deleted, so its serial and system UUID stay visible to duplicate-hardware checks. A Device can be deleted once it is Retired, when its namespace is being deleted, or by a configured cleanup identity, which is off as shipped. No root in this repository includes the policy, so merging deploys nothing. The operations guide covers the rules and how to turn on the cleanup identity.
Test plan
🤖 Generated with Claude Code