Skip to content

feat: delete a machine from admission, and delete machines that stop reporting - #890

Merged
retr0h merged 3 commits into
mainfrom
feat/revoke-stale
Nov 19, 2026
Merged

retr0h merged 3 commits into
mainfrom
feat/revoke-stale

Conversation

@retr0h

@retr0h retr0h commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #889.

Specs: osapi-io/specs#376

Rebased onto main after #887 merged.

What changes

  • Delete: DELETE /api/admission/{machine_id} (osapi client admission delete) removes a machine's key and each record of it, and keeps none. A machine that asks again is new. It is for a machine that goes away on purpose, such as a VM that is rebuilt. Revoke stays for a machine that is not trusted. It has an SDK Delete, a UI Delete button with a second-click confirm, and the admission.delete span.
  • controller.pki.delete_after: deletes an admitted machine that has not reported for that long, by its last report or, when it never reported, by its admission time. An online machine is never deleted. When the registry or the last reports do not read, nothing is deleted. Empty, the default, is never.

Checks

  • internal/controller/admission, internal/controller/endpoints/admission, internal/controller and the SDK admission files are at 100%. cmd passes.
  • The golden API contract is updated.
  • golangci-lint: 0 issues. just react-test passes.

🤖 Generated with Claude Code

retr0h and others added 3 commits November 18, 2026 22:03
…reporting

DELETE /api/admission/{machine_id} (osapi client admission delete) removes a
machine's key and each record of it, and keeps none: a machine that asks
again is new. It is for a machine that goes away on purpose, such as a VM
that is rebuilt. Revoke stays for a machine that is not trusted.

controller.pki.delete_after deletes an admitted machine that has not reported
for that long, by its last report or, when it never reported, its admission.
An online machine is never deleted, and when the registry or the last reports
do not read, nothing is deleted. Empty is never.

Closes #889

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Nov 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #890   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          556       557    +1     
  Lines        30523     30594   +71     
=========================================
+ Hits         30523     30594   +71     
Files with missing lines Coverage Δ
internal/cli/trace.go 100.00% <ø> (ø)
internal/config/keys.go 100.00% <ø> (ø)
internal/controller/admission/delete.go 100.00% <100.00%> (ø)
internal/controller/endpoints/admission/methods.go 100.00% <100.00%> (ø)
internal/controller/enrollment.go 100.00% <100.00%> (ø)
pkg/sdk/client/admission.go 100.00% <100.00%> (ø)

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b09fa6f...35ef17a. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@retr0h
retr0h merged commit 568de07 into main Nov 19, 2026
33 checks passed
@retr0h
retr0h deleted the feat/revoke-stale branch November 19, 2026 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Admitted machines that are gone keep their keys until an operator revokes them

1 participant