Repository navigation
feat(mdm): require BitLocker per Windows host on Fleet Free CU-17tkuw6a8db - #293
Conversation
… Free Upstream requires disk encryption per team and only on Premium. A team is a tenant here, and a tenant requires encryption for some of its organizations only, so in OpenFrame mode each Windows host has its own requirement. POST and DELETE /disk_encryption/hosts set and lift it, within the pinned tenant. The fleetd notification, the key escrow and the BitLocker status follow the host. A key is accepted after the requirement is lifted, archived keys are not looked up by serial, and fleetd's last error and the time the key was stored are kept in openframe_host_disk_encryption, without the key.
🦩 Flamingo Code Review✅ Tests and checks passed on this commit (3 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, 1 after reading more of the repository
🧪 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. The Go lane's own test command runs packages without MySQL; the MySQL-backed tests of this change were run separately with MYSQL_TEST=1 on a local MySQL 8.0.44: all 10 TestOpenframeDiskEncryption* tests, TestDiskEncryption, TestMDMWindows and TestMigrateOpenframeIdempotent pass. Go has no mutation tool configured; three hand-made mutants of the new lines (dropping the tenant comparison in the team-change lift, ignoring the tenant pin before the serial lookup, skipping the lift call in AddHostsToTeam) were each killed by TestOpenframeDiskEncryptionLiftedOnTeamChange or TestOpenframeDiskEncryptionArchivedKeyNotBySerial. TestHosts/DeleteHosts fails on main as well (host_software_windows_details), unrelated to this change. 2 gaps (not tested here):
Review again. New commits are not reviewed until you ask:
Or comment Updated 2026-12-02 12:12 UTC · reviewed from Andrii Koropets's machine |
🦩 Flamingo Code Review / security✅ No findings on the current head. Advisory: findings do not block the merge.
Review again. New commits are not reviewed until you ask:
Or comment Updated 2026-12-02 12:35 UTC · reviewed from Andrii Koropets's machine |
…on team change and never look up a pinned tenant's key by serial
Upstream requires disk encryption per team and only on Premium. A Fleet team is a tenant here, and a tenant requires BitLocker for some of its organizations only, so in OpenFrame mode each Windows host has its own requirement. Outside OpenFrame and shared mode everything stays upstream's.
Requirement
POST /api/_version_/fleet/disk_encryption/hostswith{"host_ids": [...]}requires the hosts to encrypt,DELETEwith the same body lifts that. Both can be repeated.openframe_host_disk_encryption(fork migration20261201000001, no data changes), with the tenant it was required in: it does not follow the host to another tenant.What follows it
host_disk_encryption_keysnever has to be captured. A repeated error changes nothing in the row.Callers and order
No caller yet. The Fleet image with this change and its migration goes first; the SDK methods with their README rows and the CDC connector change come after it.
Known limits
key_stored_atstays as it was until the next key.Tests
Two-tenant MySQL tests and service tests in
openframe_windows_disk_encryption_test.go.TestHosts/DeleteHostsfails onmain, too, onhost_software_windows_details.Details:
openframe/docs/windows-disk-encryption.md.Change-Set: windows-disk-encryption
Change set
flamingo-stack/windows-disk-encryption: this pull request is the only one in it so far. Another pull request joins by naming this one in aDepends-Online, or by carrying the sameChange-Setline.Linked work
Linked by the
Depends-On/Change-Setlines in these descriptions; this block is maintained by the hub.