fleet
fleet copied to clipboard
Fleet UI: Bulk transfer/delete hosts can transfer/delete more hosts than shown
Fleet version: <!-- Copy this from the "My account" page in the Fleet UI, or run fleetctl --version
-->
Web browser and operating system:
💥 Actual behavior
Related to: https://github.com/fleetdm/fleet/pull/17241
- The host transfer by
select all matching hosts
useshosts/transfer/filter
endpoint which doesn't include all filtering options on the manage host page - The host delete by
select all matching hosts
useshosts/delete
endpoint which doesn't include all filtering options on the manage hosts page
🧑💻 Steps to reproduce
- Go to transfer/delete more than 50 hosts that has a specific filter (low disk space, failing a policy, etc)
- Notice it transfers/deletes hosts that don't use that filter either (not low disk space, passing that policy)
🕯️ More info (optional)
N/A
Spreadsheets of everything that needs to be added and tested So many filters = so much testing
- Testing with integration test might be the best way to go about testing since 22 filters is a lot. >.<
I started working on a solution, but there's a ton of filters... ~22 filters. They would need to be all added to the transfer and delete APIs and tested. So essentially ~44 things to test.
@noahtalerman @rachaelshaw Should we consider this a critical bug? Especially since users can delete hosts that they didn't intend to?
@RachelElysia I think we should mark this one as critical. This bug could cause data loss.
I assigned the P1
label as per the high priority bugs process here in the handbook: https://fleetdm.com/handbook/company/product-groups#high-priority-user-stories-and-bugs
cc @lukeheath and @sharon-fdm
Thanks @noahtalerman We will handle it as such.
@RachelElysia Thanks for raising the alarm.
@noahtalerman @sharon-fdm I agree this is a P1. I'm leaving the assignments as-is. Removing :incoming
since we've triaged it.
@sharon-fdm My bad, I'm putting :incoming
back on because per our process, we don't officially triage P1
until the next standup.
Update:
- Frontend is done on #17263, need to remove backend parts and then get reviewed
- Backend and backend unit/integration tests will be a separate PR from @mostlikelee and then get reviewed
- Need @xpkoala to do some sanity manual test after merges
Supporting all filters on these endpoints increases regression risk as detected by #17459. Instead we're using a low-risk approach by removing the bulk options on unsupported filters in the UI.
We will create (and link here) 2 new initiatives to:
- Support more/all filters for these bulk operations (if product desires)
- Add safety mechanisms to transfer and delete API endpoints to prevent unexpected bulk actions
Perform bulk host operations based on any filter criteria - https://github.com/fleetdm/fleet/issues/17468 Prevent Unexpected Bulk Host Actions - https://github.com/fleetdm/fleet/issues/17469
I couldn't think of a haiku this time. (See fleetdm.com logs for more information.)