fleet icon indicating copy to clipboard operation
fleet copied to clipboard

Rotate FileVault (disk encryption) key w/o prompt

Open noahtalerman opened this issue 1 year ago • 8 comments

Goal

User story
As an IT admin,
I want to escrow my end users' recovery key when they logout or restart their computer
so I can force key escrow, via MDM command (force restart) if the end user hasn't escrowed their key yet w/o having to deploy EscrowBuddy myself.

Changes

  • [ ] End user doesn't see "Reset key" button and dialog if they need to reset their disk encryption key. Instead, the key is automatically reset the next time they log in to their Mac
    • Noah: I think we can use Escrow Buddy or imitate the approach it takes. Here's the Escrow Buddy project: https://github.com/macadmins/escrow-buddy

Product

  • [ ] UI changes: https://www.figma.com/file/KWbFM5no5HUZsGPXhX3X0b/%F0%9F%94%B2-%5BTEMPLATE%5D-Starter-file-(Copy)?type=design&node-id=2-130&mode=design
  • Why? Customers don't want end users to get password fatigue. All these tools prompting for passwords make it more likely for users to enter their passwords into something malicious. This also rhymes with breaches we've heard about recently where attackers sent bookoos of push notifications and people eventually started accepting them.

Engineering

  • [ ] REST API changes: TODO
  • [ ] Database schema migrations: TODO
  • [ ] Documentation changes complete

Product quality

  • [ ] QA complete
  • [ ] ...

ℹ️  Please read this issue carefully and understand it. Pay special attention to UI wireframes, especially "dev notes".

Context

  • Requestor(s): _________________________

QA

Risk assessment

  • Requires load testing: TODO
  • Risk level: Low / High TODO
  • Risk description: TODO

Manual testing steps

  1. Step 1
  2. Step 2
  3. Step 3

Testing notes

Confirmation

  1. [ ] Engineer (@____): Added comment to user story confirming succesful completion of QA.
  2. [ ] QA (@____): Added comment to user story confirming succesful completion of QA.

noahtalerman avatar Aug 04 '23 20:08 noahtalerman

Maybe Fleet can use escrow buddy for this. FYI escrow buddy doesn’t support grabbing the credentials on lock. Only works for login or restart.

Noah: This is ok

noahtalerman avatar Aug 04 '23 20:08 noahtalerman

Hey team! Please add your planning poker estimate with Zenhub @gillespi314 @mna @roperzh

georgekarrv avatar Aug 14 '23 16:08 georgekarrv

@zayhanlon heads up that this customer request didn't make it into the upcoming sprint. I added it to FF because I think we should bring it in to next sprint.

noahtalerman avatar Aug 14 '23 20:08 noahtalerman

took a quick look at escrow-buddy while I was waiting at the doctor today. Under the hood, they're using this plugin to hook into the authorization service and grab the user/password. It's really exciting that we can do this

  • if all we care about is delivering this feature ASAP, then downloading escrow-buddy like we do for Nudge and swiftDialog is our best bet
  • if we have more time and the capacity to think long term, it would be good to try to build a plugin of our own, so we can potentially build IdP integrations and other stuff using this system.

the challenge is that these are "low level" APIs and it's not super easy to interface with them using Go

roperzh avatar Aug 18 '23 19:08 roperzh

@roperzh just curious, if the customer deployed escrow-buddy themselves, what changes would we have to make to Fleet to make the FileVault recovery keys show up in the Fleet UI?

noahtalerman avatar Sep 05 '23 19:09 noahtalerman

Hey @zayhanlon heads up, this didn't make it into the current sprint. I'm going to bring it back to FF because I think we should weigh it for the next sprint.

noahtalerman avatar Sep 05 '23 22:09 noahtalerman

Hy @Patagonia121 and @zayhanlon it looks like I forgot to pull this one off feature fest board after the last feature fest.

I just pulled it off.

Please bring back to FF if you want to discuss it.

noahtalerman avatar Dec 14 '23 19:12 noahtalerman

@noahtalerman @marko-lisica Has this been implemented or something like it?

I am not sure I understand the user story. We are already escrowing the FV key on enroll, right?

What I would like to see is a way to automatically issue a new FV key if it is used or revealed in Fleet UI or if an admin clicks a button to issue a new FV key.

Thanks.

nonpunctual avatar May 03 '24 16:05 nonpunctual

Added customer-sarahwu label. See: customer-sarahwu "MDM requirements" doc.

nonpunctual avatar Jul 08 '24 21:07 nonpunctual

Hey @zayhanlon, @lukeheath, and @georgekarrv my understanding is that this story is blocking customer-rosner's migration so I think this story deserves a P2.

The plan it to bring this story to design review tomorrow. I expect it to be "Settled" but we won't have enough time to spec before estimation. Design review is right before estimation.

So, I think this means that we'll end up bringing this story through expedited drafting so that we can get it estimated before we kick off the next sprint.

What do y'all think?

noahtalerman avatar Jul 09 '24 18:07 noahtalerman

@noahtalerman yeah that makes sense. I didn't originally add the label because I thought the issue was going to be settled and pulled in through the normal process. Thank you

zayhanlon avatar Jul 09 '24 18:07 zayhanlon

@noahtalerman Makes sense to me. 👍

lukeheath avatar Jul 09 '24 21:07 lukeheath

Hey team! Please add your planning poker estimate with Zenhub @dantecatalfamo @ghernandez345 @gillespi314 @jahzielv

georgekarrv avatar Jul 11 '24 16:07 georgekarrv

From customer voice: Let's remember to put this one at the top of the next sprint so that we can try to get it out in 4.55.

cc @zayhanlon @georgekarrv

noahtalerman avatar Jul 12 '24 19:07 noahtalerman

P1.9 got it

georgekarrv avatar Jul 12 '24 19:07 georgekarrv

Escrow Buddy is an authorization plug-in. Authorization plugins must be:

  • Packaged as a bundle
  • Compiled as a dynamic library (e.g., -buildmode=c-shared in Go)
  • Installed at /Library/Security/SecurityAgentPlugins

Ideally we could build the functionality into Orbit, but given these requirements, we still need to compile, distribute, and install a separate package even if we build something ourselves.

I think our options are:

  1. Use Escrow Buddy via TUF
  2. Explore and develop a solution that uses a different approach under the hood and can be integrated into Orbit

roperzh avatar Jul 19 '24 16:07 roperzh

@roperzh I'm adding the release blocker label to this for 4.55 to make sure it makes sense. We'll hold the release if necessary, as this is becoming a blocker for multiple customers. Thanks for your hard work! Just let me know if you have concerns about getting it in.

lukeheath avatar Jul 26 '24 19:07 lukeheath

@lukeheath no concerns, thanks for the ping!

roperzh avatar Jul 26 '24 19:07 roperzh

QA Notes: Ran through two scenarios where the host would need to have their FV key rotated and escrowed and can confirm the new copy matches Figma, however I'm still getting prompted for a password on the host in order to reset the key.

Host details page copy change ✅ FV Host details page

Device copy change ✅ FV  device Copy change

Still seeing the Reset disk encryption key password prompt ❌ FVpassword prompt

Scenario A Device was already enrolled in fleet but not encrypted. Moved it to a team with FV enforced

Scenario B Device was encrypted on a team with FV enforced. Turned encryption off for that team, then back on again.

*key rotation and escrow still works as expected once the user password is entered

cc: @roperzh

PezHub avatar Jul 31 '24 23:07 PezHub

@PezHub sorry I didn't get to add proper QA steps yet. Sanity check: are you using fleetctl from a local TUF? needs to be a local build from main

roperzh avatar Jul 31 '24 23:07 roperzh

started from scratch and confirmed I'm on latest mainplus I rebuilt fleetd from my local TUF (I see the Agent 42 now) but still getting the prompt. In fact now it has created a loop asking me for my password even after I enter it in and it says "successfully reset key". We can take a look at logs tomorrow.

PezHub avatar Jul 31 '24 23:07 PezHub

Vincent on our team can help if needed as we implemented EscrowBuddy for all of our customers. Just in case!

martinpannier avatar Aug 01 '24 13:08 martinpannier

@martinpannier thank you! you folks are awesome 💚. This is already implemented and going out in the next release. Gabe just found a bug related to the old way we used to escrow keys.


@PezHub thank you! I have a PR going with the fix https://github.com/fleetdm/fleet/pull/20935 I will ping you when it's merged.

roperzh avatar Aug 01 '24 13:08 roperzh

@PezHub PR merged, moving this back to awaiting QA

roperzh avatar Aug 01 '24 17:08 roperzh

After the fix was applied I ran thru the same scenarios above and confirmed my FV key successfully rotated and was escrowed in Fleet without a prompt asking for user password. QA Approved!

PezHub avatar Aug 01 '24 22:08 PezHub

@noahtalerman just had a customer question on this, but will this feature work retroactively for users that are already enrolled?

Patagonia121 avatar Aug 02 '24 14:08 Patagonia121

just had a customer question on this, but will this feature work retroactively for users that are already enrolled?

@Patagonia121 my understanding is yes.

@roperzh please correct me if I'm wrong.

noahtalerman avatar Aug 06 '24 00:08 noahtalerman

Hey @zayhanlon, @Patagonia121, @pintomi1989 and @dherder heads up that this customer/prospect request was shipped in 4.55 🎉

noahtalerman avatar Aug 16 '24 20:08 noahtalerman

No nagging prompts, Keys rotate with seamless grace, Fleet's cloud city safe.

fleet-release avatar Aug 16 '24 20:08 fleet-release