mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 01:18:42 +00:00
UI - Only show 'follow instructions on My device' banner for encrypted and non-escrowed Linux hosts (#24277)
## #24248 For hosts with encrypted disks that Fleet does not have a key escrowed for: **Banner shown for Linux:** <img width="1464" alt="Screenshot 2024-12-02 at 10 52 08 AM" src="https://github.com/user-attachments/assets/91dd3b64-b9da-430b-9eb0-0ae30af751d8"> **but not for Windows:** <img width="1464" alt="Screenshot 2024-12-02 at 10 49 54 AM" src="https://github.com/user-attachments/assets/0345db0d-74f5-4608-af7b-58efae14dfea"> - [x] Changes file added for user-visible changes in `changes/` - [x] Manual QA --------- Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
This commit is contained in:
parent
2cdead2dce
commit
ed8c3a3b98
2 changed files with 8 additions and 10 deletions
2
changes/24248-host-details-encryption-banner
Normal file
2
changes/24248-host-details-encryption-banner
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
* Only show the "follow instructions on My device" banner for Linux hosts whose disks are encrypted
|
||||
but for which Fleet hasn't escrowed a valid key.
|
||||
|
|
@ -8,13 +8,11 @@ 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";
|
||||
|
||||
|
|
@ -110,16 +108,13 @@ const HostDetailsBanners = ({
|
|||
</div>
|
||||
);
|
||||
}
|
||||
// setting applies
|
||||
if (
|
||||
hostPlatform &&
|
||||
platformSupportsDiskEncryption(hostPlatform, hostOsVersion) &&
|
||||
isDiskEncryptionSupportedLinuxPlatform(hostPlatform, hostOsVersion ?? "") &&
|
||||
diskEncryptionOSSetting?.status
|
||||
) {
|
||||
if (
|
||||
!diskIsEncrypted &&
|
||||
isDiskEncryptionSupportedLinuxPlatform(hostPlatform, hostOsVersion ?? "")
|
||||
) {
|
||||
// setting applies to a Linux host
|
||||
if (!diskIsEncrypted) {
|
||||
// linux host not in compliance with setting
|
||||
return (
|
||||
<div className={baseClass}>
|
||||
|
|
@ -143,8 +138,9 @@ const HostDetailsBanners = ({
|
|||
);
|
||||
}
|
||||
if (!diskEncryptionKeyAvailable) {
|
||||
// disk is encrypted, but Fleet doesn't yet have a disk
|
||||
// encryption key escrowed (possible for Linux hosts)
|
||||
// linux host's disk is encrypted, but Fleet doesn't yet have a disk
|
||||
// encryption key escrowed (note that this state is also possible for Windows hosts, which we
|
||||
// don't show this banner for currently)
|
||||
return (
|
||||
<div className={baseClass}>
|
||||
<InfoBanner color="yellow">
|
||||
|
|
|
|||
Loading…
Reference in a new issue