Repository navigation
feat(mdm): wipe Windows hosts on Fleet Free over Windows MDM CU-17tkuw6a584 - #287
Conversation
🦩 Flamingo Code Review✅ Tests and checks passed on this commit (2 lanes). ✅ No findings on the current head. Advisory: findings do not block the merge.
✅ What this change does well
1 possible problem checked and ruled out
🧪 Tests and mutationTests per lane
Checks
The test services of flamingo-stack/fleetmdm (server/mdm/nanodep/storage/mysql/docker-compose-test.yml) did not come up: the integration tests may fail for that reason. Go has no local toolchain on this machine; stage 2 ran the planned go vet and go test through golang:1.26.6 in Docker as a non-root user. The planned go test covers orbit/ only. Run separately in Docker on this commit's code and passed: server/datastore/mysql with MYSQL_TEST=1 (TestOpenframe Windows, TestMDMWindows) and the Windows tests of server/service. Not run with the race detector. Ten hand-made mutants of this round's change (the hook, its place, its filter, its guards and the query) were all caught by those tests. TestIntegrationsMDM (Wipe, Windows): 39 of 39 as upstream, and 39 of 39 in a temporary copy with the OpenFrame checks on and the fork migrations applied. What the surviving mutations leave unverified
1 gap (not tested here):
Review again. New commits are not reviewed until you ask:
Or comment Updated 2026-11-30 15:45 UTC · reviewed from Andrii Koropets's machine |
…indows wipe's result
…ts outcome is recorded
…t re-enrollment, cancel only an unanswered one
… ends only once the new one is stored
What
POST /hosts/{id}/wipewipes Windows hosts on Fleet Free, over Windows MDM, in OpenFrame mode or shared mode only. Before this Fleet answered 402 and OpenFrame'swipeWindowsDevice(openframe-oss-lib#3224) always failed.WipeHosthandles Windows next to Android with the same checks: permission to run MDM commands, MDM on for the host (422), no pending lock, unlock or wipe and not locked (422), not wiped already (409). Windows MDM off in the tenant's config: 400. Another tenant's host: 404. macOS, iOS, Linux and ChromeOS still answer 402, as does Windows outside OpenFrame mode. A RemoteWipe custom command still needs Premium and is refused in OpenFrame mode: a wipe goes only through the wipe action and its checks.<Exec>on./Device/Vendor/MSFT/RemoteWipe/<type>:doWipeProtectedby default, orwindows.wipe_typefrom the body. It is queued by upstream'sWipeHostViaWindowsMDM;wiped_hostis recorded when it is queued.failed_wipe; it never comes back on its own.completed_wipe: a new activity when the device accepts the wipe (2xx). Upstream records nothing then. It andfailed_wipename the host the wipe was requested for, carry the device's tenant (the CDC consumer drops activities without one) and are recorded even when the device has dropped the request.failed_wipe. Deleting a host cancels its queued wipe; nothing is recorded, as the host is gone.ee/.Known limits
doWipeProtectedcan leave some devices unable to boot (Microsoft's RemoteWipe CSP).completed_wipeagain; the consumer has to be idempotent. "Completed" means the device accepted the command, not that the reset finished.failed_wipewhen it enrolls again, and so is one whose answer arrives in the moment its enrollment is removed.completed_wipeandfailed_wipeyet (CU-17tkuw6a583).Tests
server/service: TestOpenframeWipeWindowsHostQueuesCommand, TestOpenframeWipeWindowsHostRefused, TestOpenframeWipeWindowsHostErrors, TestOpenframeWindowsWipeResultActivity, TestOpenframeWindowsWipesSent, TestOpenframeWindowsWipesLostWithEnrollment, TestOpenframeWindowsWipeCustomCommandRefused, TestOpenframeWipeCompletedActivity.server/datastore/mysql(MYSQL_TEST=1), two tenants, TestOpenframeWindowsWipe*: Lifecycle, NeedsOneDevice, Delivery (moved device, clone, second enrollment, relinked enrollment, transferred and deleted host), LostWithEnrollment, AfterHostDeletion, SurvivesReenroll, QueuedOnce (concurrent requests), ManyHosts, RequestedDuringReenroll, CancelAnswered, SingleTenant, Clones, ResultNamesItsHost, OutsideOpenframeModeAsUpstream.ClickUp: CU-17tkuw6a584
Change-Set: windows-wipe
Change set
flamingo-stack/windows-wipe: these pull requests are one change, reviewed together.Linked work
Linked by the
Depends-On/Change-Setlines in these descriptions; this block is maintained by the hub.