fleetdm / fleet

Open-source platform for IT, security, and infrastructure teams. (Linux, macOS, Chrome, Windows, cloud, data center)
https://fleetdm.com
Other
3.15k stars 431 forks source link

One action for turning off MDM, removing fleetd, and deleting a host in Fleet #19548

Open nonpunctual opened 5 months ago

nonpunctual commented 5 months ago

Scenario:

A previously enrolled device must be reissued to a new user or used for testing (i.e. repurposed)

Feature Parity:

macOS

Windows

Problem

Customer-preston is concerned about:

given that there is not as much control or predictability as they would like to have over unenrollment behavior & would like to have an easier-to-use, complete workflow to unenroll a device handled by Fleet automatically even though workflows for unenrollment that can be cobbled together with current features.

Potential solutions

  1. Include a button in the Fleet UI & an API endpoint that 1) Completely uninstalls the fleetd agent client-side 2) completely removes the Host device record permanently server-side. This feature should be designed to work on 1 Host or on multiple Hosts simultaneously in a single action / call.
noahtalerman commented 5 months ago

A previously enrolled device must be reissued to a new user or used for testing (i.e. repurposed)

@nonpunctual the current best practice for repurposing a device is to wipe it via UI, API, or CLI.

Do you know why this doesn't work for the customer?

nonpunctual commented 5 months ago
  1. @noahtalerman I beleve the ask here is clear & atomic:
  1. Further context:

For an MSP (or often even for admins if they are managing remote workers) there is no hands-on device access & there is often little or no contact with an end user.

There are features of Fleet that attempt to make repurposing a device easy that are not clear or documented well &, in my opinion, don't follow the best practices an admin managing devices would expect.

If a device record is removed server-side, there should be no way for a device to be recognized as a device that was ever enrolled before. A new, unencumbered record should be associated with a net new device. In Fleet a new record for enrollment is created if a device is re-enrolled, but, for Windows (& in some cases even for Mac) the enrollment state can be ambiguous.

If the agent is removed server-side, there should be no way other than a net new enrollment that the device from which the agent was removed could be recognized as previously enrolled.

Features that recognize previous enrollments would be ok / nice-to-have if all cases & behaviors were documented. Some of the enrollment behavior in Fleet is unpredictable which is why there have been numerous FR & bug reports around it.

I will search & collect the FR & bugs related to enrollment in a comment in this issue for reference.

To guarantee that an unenrollment is successful customer-preston believes Fleet should handle all aspects of the unenrollment workflow, i.e.,

What is not working for the customer is the current prescribed methods in practice. They would not be asking for a more reliable workflow if the current methods achieved their desired result.

valentinpezon-primo commented 5 months ago

Hi @noahtalerman @nonpunctual ,

Disenrolling a windows computer, in the case where you do not want to Wipe it, is a huge pain. Especially if you want to do this for a lot of devices.

To disenroll a Windows device for end users, at scale, using API only, we have to do 3 steps, in a synchronous manner :

1 - Run a script that turn off MDM on the host

2 - Run a script that remove the fleetD agent

3 - Then you proceed to delete the host from Fleet, assuming the previous script went well (this is already very hard to implement programatically already)

Now, imagine a scenario where you do all of the above, programatically, for 2 separates hosts, and then this happens :

Here we are stuck in a loop because, what if theses 2 devices comes back to fleet, how are you able to know if :

Imagine you have to do this for lets say 100 devices.. :(

noahtalerman commented 5 months ago

This one contributes to Jamf parity.

nonpunctual commented 5 months ago

@noahtalerman thanks for locating the dupe!

nonpunctual commented 4 months ago
Screenshot 2024-07-01 at 11 50 28 AM

The comments above are related to app installs but also to how Fleet handles un-enrollment. If devices were cleanly un-enrolled this type of record keeping would not conflict with actual device state.

zayhanlon commented 2 months ago

@ddribeiro @pintomi1989 i'm taking this off as we selected a few other key priority asks for this customer. please bring this back to the next prioritization call

nonpunctual commented 1 month ago

related: https://github.com/fleetdm/fleet/issues/22820