Android commands: Lock, wipe, & clear passcode
Goal
| User story |
|---|
| As an IT admin looking at an Android host on the Host details page, |
| I want to see buttons for lock, wipe, and clear passcode |
| so that I can run these commands. |
Video demo: https://www.youtube.com/watch?v=OK2K5EII0sA Unenroll/wipe Android on Fleet Free: https://www.youtube.com/watch?v=JvsD3WBcDgE
Changes
Product
- [x] UI changes: Figma
- [x] CLI (fleetctl) usage changes:
fleetctl mdm lock, andfleetctl mdm wipeshould support Android hosts (no new subcommands needed). Add a newfleetctl mdm clear-passcode --host $HOST.
- [x] YAML changes: No changes
- [x] REST API changes: #45516
- [x] Fleet's agent (fleetd) changes: No changes
- [x] Fleet server configuration changes: No changes
- [x] Exposed, public API endpoint changes: No changes
- [x] fleetdm.com changes: No changes
- [x] GitOps mode UI changes: No changes
- [x] GitOps generation changes: No changes
- [x] Activity changes:
- Confirm that wipe, lock, and clear passcode activities also show up for Android activities.
- [x] Permissions changes: No changes
- [x] Changes to paid features or tiers: No changes
- [x] My device and fleetdm.com/better changes: No changes
- [x] Usage statistics: No changes
- [x] Other reference documentation changes: No changes.
- [x] First draft of test plan added
- [x] Once shipped, requester has been notified
- [x] Once shipped, dogfooding issue has been filed https://github.com/fleetdm/fleet/issues/48097
Engineering
- [ ] Test plan is finalized
- [ ] Contributor API changes: No changes
- [ ] Feature guide changes: Update https://fleetdm.com/guides/lock-wipe-hosts
- [ ] Database schema migrations: Yes
- [ ] Load testing: Yes
- [ ] Pre-QA load test: TODO
- [ ] Load testing/osquery-perf improvements: TODO
- [ ] This is a premium only feature: Yes / No
ℹ️ Please read this issue carefully and understand it. Pay special attention to UI wireframes, especially "dev notes".
Risk assessment
- Requires testing in a hosted environment: TODO
- Requires load testing: TODO
- Risk level: Low / High TODO
- Risk description: TODO
Test plan
Make sure to go through the list and consider all events that might be related to this story, so we catch edge cases earlier.
Host details > Actions
- [ ] If "Lock", "Unenroll", "Wipe", or "Clear passcode" is pending, hide options in menu ("Lock", "Unenroll", "Wipe", or "Clear passcode" ).
- [ ] If BYO or company-owned/fully managed has MDM disabled, hide options from menu ("Lock", "Unenroll", "Wipe", or "Clear passcode" ).
For BYO Android hosts:
- [ ] Confirm options for "Clear passcode" and "Lock" appear in actions menu.
- [ ] Modal "Clear passcode" or "Lock" button is disabled until checkbox is clicked.
- [ ] Confirm "Clear passcode" removes current passcode on work profile.
- [ ] Confirm "Lock" locks the host screen and user's passcode can unlock host.
For company-owned/fully managed Android hosts:
- [ ] Confirm options for "Clear passcode", "Wipe", and "Lock" appear in actions menu.
- [ ] Modal "Clear passcode", "Wipe", or "Lock" button is disabled until checkbox is clicked.
- [ ] Confirm "Clear passcode" removes current passcode on host.
- [ ] Confirm "Wipe" removes everything (usually goes into a factory reset).
- [ ] Confirm "Lock" locks the host screen and user's passcode can unlock host.
Global activity
- [ ] Confirm new type:
Clear passcode - [ ] Confirm activities logged for: locked, wiped (for company-owned/fully managed), unenrolled (for BYOD), clear passcode.
Host activity
- [ ] Confirm activities logged for: locked, wiped (for company-owned/fully managed), unenrolled (for BYOD) clear passcode.
Testing notes
Confirmation
- [ ] Engineer: Added comment to user story confirming successful completion of test plan.
- [ ] QA: Added comment to user story confirming successful completion of test plan.
@melpike just chatted w/ Allen and Dale and they brought up a good point: we already do a good job handling wipe v. unenroll w/ iOS: BYO iOS is "Unenroll" and company-owned is "Wipe"
We think it makes sense to say the same for Android.
BYO iOS is "Unenroll" and company-owned is "Wipe"
@noahtalerman It looks like company-owned has both "Unenroll" and "Wipe"—do want that for android as well?
TODO @melpike update issue description/Figma to not include any iOS changes.
This went through drafting, and is ready to be implemented.
Host details
- [ ] If host is pending wipe, show "Wipe pending" badge next to host name until out of pending (like we do for iOS/iPadOS)
- [ ] If host wipe command is successful, show "Wiped" badge next to host name (like we do for iOS/iPadOS).
@getvictor and I decided to cut the badges. FYI @AndreyKizimenko @marko-lisica
Global activity
- [ ] Confirm new type:
Clear passcode- [ ] Confirm activities logged for: locked, wiped (for company-owned/fully managed), unenrolled (for BYOD), clear passcode.
Host activity
- [ ] Confirm activities logged for: locked, wiped (for company-owned/fully managed), unenrolled (for BYOD) clear passcode.
FYI @marko-lisica added the bit about "unenrolled"
Host details
- [ ] If host is pending wipe, show "Wipe pending" badge next to host name until out of pending (like we do for iOS/iPadOS)[ ] If host wipe command is successful, show "Wiped" badge next to host name (like we do for iOS/iPadOS).
@getvictor and I decided to cut the badges. FYI @AndreyKizimenko @marko-lisica
I'm reversing the "cut badges" decision and also modifying badges. Why? Because this is the standard way we show IT admin what's happening with the device (and why some device actions are not available).
Cut: Locked (because Android can't tell when device is unlocked)
Implement (matching other platforms): Lock pending, Wipe pending, Wiped
Add (only for Android): Unenroll pending (Wipe pending but for BYO devices), Clear passcode pending (because this blocks other menu actions)
FYI: @lukeheath
Another design change.
I'm changing the destructive red color of Lock modal options to the default black/green color to match the Lock modals of other platforms. Noting here since it is taking me too long to figure out how to do this change in Figma.
cc: @AndreyKizimenko @lukeheath
We are replacing Android corporate-own Unenroll with Wipe. However, Unenroll is Free tier, while Wipe is Premium. So, this is a regression for Free users. This is probably fine. Free users can still call the old unenroll using the API, just not via the UI.
cc: @marko-lisica @lukeheath
EDIT: Android Free users see "Unenroll" today, so removing "Unenroll" from Android BYOD dropdown is also inconsistent.
Other design changes.
Figma states this:
However, I will use the existing messages we use for other platforms, which are almost identical:
- Successfully sent request to clear passcode on this host.
- Couldn't send request to clear passcode on this host. Please try again.
I will add the Clear passcode confirm checkbox to other platforms, and not just Android.
@marko-lisica Please review design decisions made by Victor and team while you were out. Victor added comments with decisions.
@getvictor feedback on the changes above:
Add (only for Android): Unenroll pending (Wipe pending but for BYO devices), Clear passcode pending (because this blocks other menu actions)
I think we should do this the same way as on iOS. When the user selects "unenroll", Fleet sends a command and flips MDM status to "off" and disables relevant actions. The host might not receive the command, but as soon as it gets online, it will wipe the work profile.
I'm changing the destructive red color of Lock modal options to the default black/green color to match the Lock modals of other platforms. Noting here since it is taking me too long to figure out how to do this change in Figma.
Sounds good to me.
We are replacing Android corporate-own Unenroll with Wipe. However, Unenroll is Free tier, while Wipe is Premium. So, this is a regression for Free users. This is probably fine. Free users can still call the old unenroll using the API, just not via the UI.
Can we keep "unenroll" for Fleet free only?
The comment regarding the copy changes for flash messages
Sounds good to me.
@marko-lisica I have follow up questions, and we can discuss at standup. The iOS unenroll behavior sounds like a bug to me. unenroll=wipe for Android, so we need a matrix for unenroll/wipe vs BYOD/COBO vs what it actually does under the hood vs Free/Premium.
From standup:
Marko: While there are some difference under the hood between wipe/unenroll based on Android/iOS and corporated owned vs BYOD, we want to abstract away those differences from the user because we don't think it will matter to them. We'd rather have a simple and consistent UX across platforms and devices, even if that means given up some fidelity on exactly what's happening under the hood.
Luke: If we're going to abstract that away, we should document somewhere simple (like in the guide) that there are subtle differences just so it's documented somewhere.
Victor: Right now the badges we display are correct and match the commands, and it seems like worse UX to change them to be wrong.
Next steps:
- [ ] Remove "Unenroll pending" from the UI and API for Android BYOD so it is consistent with iOS BYOD.
@marko-lisica Please add a list with any additional changes that need to be made.
QA Pass
Host details > Actions
- [x] If "Lock", "Unenroll", "Wipe", or "Clear passcode" is pending, hide options in menu ("Lock", "Unenroll", "Wipe", or "Clear passcode" ).
- [x] If BYO or company-owned/fully managed has MDM disabled, hide options from menu ("Lock", "Unenroll", "Wipe", or "Clear passcode" ).
For BYO Android hosts:
- [x] Confirm options for "Clear passcode" and "Lock" appear in actions menu.
- [x] Modal "Clear passcode" or "Lock" button is disabled until checkbox is clicked.
- [x] Confirm "Clear passcode" removes current passcode on work profile.
- [x] Confirm "Lock" locks the host screen and user's passcode can unlock host.
For company-owned/fully managed Android hosts:
- [x] Confirm options for "Clear passcode", "Wipe", and "Lock" appear in actions menu.
- [x] Modal "Clear passcode", "Wipe", or "Lock" button is disabled until checkbox is clicked.
- [x] Confirm "Clear passcode" removes current passcode on host.
- [x] Confirm "Wipe" removes everything (usually goes into a factory reset).
- [x] Confirm "Lock" locks the host screen and user's passcode can unlock host.
Global activity
- [x] Confirm new type:
Clear passcode - [x] Confirm activities logged for: locked, wiped (for company-owned/fully managed), unenrolled (for BYOD), clear passcode.
Host activity
- [x] Confirm activities logged for: locked, wiped (for company-owned/fully managed), unenrolled (for BYOD) clear passcode.
Notified customer-rosner
notified customer-vesta
Admins touch three keys Android devices respond control finds its way