Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't show macOS hosts as disk encryption verifying when they're also in the action-required group #24844

Merged
merged 2 commits into from
Dec 23, 2024

Conversation

iansltx
Copy link
Member

@iansltx iansltx commented Dec 17, 2024

This happens when the disk encryption profile has been sent successfully and verified by MDM, but we haven't been sent the (encrypted) key via Orbit yet because the end user needs to log out or restart their machine to finish key rotation.

For #24244.

Checklist for submitter

If some of the following don't apply, delete the relevant line.

  • Changes file added for user-visible changes in changes/, orbit/changes/ or ee/fleetd-chrome/changes.
    See Changes files for more information.
  • Input data is properly validated, SELECT * is avoided, SQL injection is prevented (using placeholders for values in statements)
  • Added/updated tests
  • Manual QA for all new/changed functionality

… in the action-required group

This happens when the disk encryption profile has been sent successfully and verified by MDM, but we haven't been sent the (encrypted) key via Orbit yet because the end user needs to log out or restart their machine to finish key rotation.

For #24244.
Copy link

codecov bot commented Dec 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.58%. Comparing base (57e82c1) to head (799fd9e).
Report is 66 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #24844      +/-   ##
==========================================
+ Coverage   63.57%   63.58%   +0.01%     
==========================================
  Files        1602     1607       +5     
  Lines      151819   152250     +431     
  Branches     3900     3900              
==========================================
+ Hits        96512    96811     +299     
- Misses      47622    47725     +103     
- Partials     7685     7714      +29     
Flag Coverage Δ
backend 64.38% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@iansltx iansltx marked this pull request as ready for review December 18, 2024 17:20
@iansltx iansltx requested a review from a team as a code owner December 18, 2024 17:20
listHostsCheckCount(t, ds, fleet.TeamFilter{User: test.UserAdmin}, fleet.HostListOptions{MacOSSettingsDiskEncryptionFilter: fleet.DiskEncryptionFailed}, 0)
listHostsCheckCount(t, ds, fleet.TeamFilter{User: test.UserAdmin}, fleet.HostListOptions{MacOSSettingsDiskEncryptionFilter: fleet.DiskEncryptionRemovingEnforcement}, 0)

// simulate orbit ping from host 0 with unverified key after key rotation; should switch host to verifying
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit, for macOS we ingest escrow key via osquery:

fl AS (SELECT line FROM file_lines WHERE path = '/var/db/FileVaultPRK.dat')

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I was looking at the right file and somehow got wires crossed that it was orbit rather than osquery. Updating.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be fair, it's via osquery with an orbit table :)

Copy link
Member

@lucasmrod lucasmrod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, left a question.

@iansltx iansltx merged commit 329c283 into main Dec 23, 2024
22 checks passed
@iansltx iansltx deleted the 24244-macos-encryption-verifying-query branch December 23, 2024 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants