From ea9b5ba776c97d21eeb285d44620b7c0005cd1a8 Mon Sep 17 00:00:00 2001 From: jacobshandling <61553566+jacobshandling@users.noreply.github.com> Date: Tue, 26 Nov 2024 11:29:50 -0800 Subject: [PATCH] =?UTF-8?q?UI=20=E2=80=93=2011/26=20Disk=20encryption=20sp?= =?UTF-8?q?ec=20updates=20(#24175)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## #24173 Screenshot 2024-11-26 at 11 08 25 AM Screenshot 2024-11-26 at 10 45 11 AM - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Jacob Shandling --- .../cards/DiskEncryption/DiskEncryption.tsx | 23 +++++++++- .../HostDetailsBanners/HostDetailsBanners.tsx | 42 ++++++++++++++++--- 2 files changed, 58 insertions(+), 7 deletions(-) diff --git a/frontend/pages/ManageControlsPage/OSSettings/cards/DiskEncryption/DiskEncryption.tsx b/frontend/pages/ManageControlsPage/OSSettings/cards/DiskEncryption/DiskEncryption.tsx index 16e773809d..fd4fe03310 100644 --- a/frontend/pages/ManageControlsPage/OSSettings/cards/DiskEncryption/DiskEncryption.tsx +++ b/frontend/pages/ManageControlsPage/OSSettings/cards/DiskEncryption/DiskEncryption.tsx @@ -124,7 +124,24 @@ const DiskEncryption = ({ setIsLoadingTeam(false); } - const getTipContent = (platform: "windows" | "macOS") => { + const getTipContent = (platform: "windows" | "macOS" | "linux") => { + if (platform === "linux") { + return ( + <> + For Ubuntu and Fedora Linux. +
+ Currently, full disk encryption must be turned on{" "} + + during OS +
+ setup +
+ . If disk encryption is off, the end user must re-install +
+ their operating system. + + ); + } const [AppleOrWindows, DEMethod] = platform === "windows" ? ["Windows", "BitLocker"] @@ -149,7 +166,9 @@ const DiskEncryption = ({ Windows - , Ubuntu Linux, and Fedora Linux hosts. + , and{" "} + Linux{" "} + hosts. ); diff --git a/frontend/pages/hosts/details/HostDetailsPage/components/HostDetailsBanners/HostDetailsBanners.tsx b/frontend/pages/hosts/details/HostDetailsPage/components/HostDetailsBanners/HostDetailsBanners.tsx index 188282bab1..0e4eb8b851 100644 --- a/frontend/pages/hosts/details/HostDetailsPage/components/HostDetailsBanners/HostDetailsBanners.tsx +++ b/frontend/pages/hosts/details/HostDetailsPage/components/HostDetailsBanners/HostDetailsBanners.tsx @@ -1,15 +1,21 @@ import React, { useContext } from "react"; import { AppContext } from "context/app"; -import { DiskEncryptionStatus, MdmEnrollmentStatus } from "interfaces/mdm"; import { hasLicenseExpired } from "utilities/helpers"; -import InfoBanner from "components/InfoBanner"; + +import { DiskEncryptionStatus, MdmEnrollmentStatus } from "interfaces/mdm"; import { IOSSettings } from "interfaces/host"; import { HostPlatform, + isDiskEncryptionSupportedLinuxPlatform, platformSupportsDiskEncryption, } from "interfaces/platform"; +import InfoBanner from "components/InfoBanner"; +import CustomLink from "components/CustomLink"; +import { LEARN_MORE_ABOUT_BASE_LINK } from "utilities/constants"; +import { isDiskEncryptionProfile } from "pages/hosts/details/OSSettingsModal/OSSettingsTable/OSSettingStatusCell/helpers"; + const baseClass = "host-details-banners"; export interface IHostBannersBaseProps { @@ -110,9 +116,35 @@ const HostDetailsBanners = ({ platformSupportsDiskEncryption(hostPlatform, hostOsVersion) && diskEncryptionOSSetting?.status ) { - // host either not in compliance with setting, or is but Fleet doesn't yet have a disk - // encryption key escrowed for the host (possible for Linux hosts) - if (!diskIsEncrypted || !diskEncryptionKeyAvailable) { + if ( + !diskIsEncrypted && + isDiskEncryptionSupportedLinuxPlatform(hostPlatform, hostOsVersion ?? "") + ) { + // linux host not in compliance with setting + return ( +
+ + } + > + Disk encryption: Disk encryption is off. Currently, to turn on{" "} + full disk encryption, the end user has to re-install their + operating system. + +
+ ); + } + if (!diskEncryptionKeyAvailable) { + // disk is encrypted, but Fleet doesn't yet have a disk + // encryption key escrowed (possible for Linux hosts) return (