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

Linux disk encryption: frontend changes, backend missing private key errors, remove disk encryption endpoints dependence on MDM being enabled #23714

Draft
wants to merge 43 commits into
base: 22074-linux-encryption
Choose a base branch
from

Conversation

jacobshandling
Copy link
Contributor

@jacobshandling jacobshandling commented Nov 12, 2024

Addresses #22702, #23713, #23756, #23747, and #23876

-Note that much of this code as is will render as expected only once integrated with the backend or if manipulated manually for testing purposes

Frontend:

  • Update banners on my device page, tests
  • Build new logic for calling endpoint to trigger linux key escrow on clicking Create key
  • Add CreateLinuxKeyModal to inform user of next steps after clicking Create key
  • Update banners on host details page, tests
  • Update the Controls > OS settings section with new logic related to linux disk encryption
  • Expect and include counts of Linux hosts in aggregate disk encryption stats UI
  • Add "Linux" column to the disk encryption table
  • Show disk encryption related UI for supported Linux platforms
    • TODO: confirm platform string matching functionality in manual e2e testing
  • Expand capabilities of SectionHeader component, apply to new UI
  • Flash "missing private key" error, with clickable link, when trying to update disk encryption enabled while no server private key is present.
    • TODO: QA this once other endpoints on Controls > Disk encryption are enabled even when MDM not turned on
  • Update Disk encryption key modal copy

-Other TODO:

  • Confirm when integrated with API:
    • Aggregate disk encryption counts
    • Disk encryption table Linux column
    • Show disk encryption key action on host details page when expected
    • Opens Disk encryption key modal, displays key as expected

Backend:

  • For "No team" and teams, error when trying to update disk encryption enabled while no server private key is present.

  • Remove requiring mdm to be enabled from 3 endpoint operations

  • Changes file added for user-visible changes in changes/

  • Added/updated tests

  • Manual QA for all new/changed functionality

    • Full e2e testing to do when integrated with backend

Copy link

codecov bot commented Nov 12, 2024

Codecov Report

Attention: Patch coverage is 50.39370% with 63 lines in your changes missing coverage. Please review.

Project coverage is 63.16%. Comparing base (e27e916) to head (f1ee144).

Files with missing lines Patch % Lines
...ngsModal/OSSettingsTable/OSSettingsTableConfig.tsx 6.66% 14 Missing ⚠️
frontend/services/entities/disk_encryption.ts 6.66% 14 Missing ⚠️
...es/hosts/details/DeviceUserPage/DeviceUserPage.tsx 33.33% 10 Missing ⚠️
...es/hosts/details/cards/HostSummary/HostSummary.tsx 65.38% 9 Missing ⚠️
frontend/pages/hosts/details/helpers.ts 40.00% 6 Missing ⚠️
...erPage/CreateLinuxKeyModal/CreateLinuxKeyModal.tsx 33.33% 4 Missing ⚠️
frontend/interfaces/mdm.ts 33.33% 2 Missing ⚠️
frontend/utilities/endpoints.ts 0.00% 2 Missing ⚠️
frontend/interfaces/platform.ts 94.11% 1 Missing ⚠️
...components/DeviceUserBanners/DeviceUserBanners.tsx 92.85% 1 Missing ⚠️
Additional details and impacted files
@@                    Coverage Diff                     @@
##           22074-linux-encryption   #23714      +/-   ##
==========================================================
- Coverage                   63.17%   63.16%   -0.02%     
==========================================================
  Files                        1559     1561       +2     
  Lines                      148227   148305      +78     
  Branches                     3722     3754      +32     
==========================================================
+ Hits                        93642    93676      +34     
- Misses                      47188    47232      +44     
  Partials                     7397     7397              
Flag Coverage Δ
frontend 52.61% <50.39%> (-0.02%) ⬇️

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.

@jacobshandling jacobshandling changed the base branch from main to 22074-linux-encryption November 12, 2024 19:09
- Allows rendering of Disk Encryption section even when MDM is not enabled
@jacobshandling jacobshandling changed the title UI – Linux disk encryption Linux disk encryption: frontend changes, backend error on update DE setting with missing private key Nov 13, 2024
jahzielv and others added 4 commits November 14, 2024 18:31
…23757)

> Related issue: #23200

# Checklist for submitter

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

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/Committing-Changes.md#changes-files)
for more information.
- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality
@jacobshandling jacobshandling changed the base branch from 22074-linux-encryption to main November 15, 2024 00:11
@jacobshandling jacobshandling dismissed RachelElysia’s stale review November 15, 2024 00:11

The base branch was changed.

@jacobshandling jacobshandling changed the base branch from main to 22074-linux-encryption November 15, 2024 00:11
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.

8 participants