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

UI - Only show 'follow instructions on My device' banner for encrypted and non-escrowed Linux hosts #24277

Merged
merged 5 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions changes/24248-host-details-encryption-banner
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down Expand Up @@ -110,16 +108,13 @@ const HostDetailsBanners = ({
</div>
);
}
// setting applies
if (
hostPlatform &&
platformSupportsDiskEncryption(hostPlatform, hostOsVersion) &&
isDiskEncryptionSupportedLinuxPlatform(hostPlatform, hostOsVersion ?? "") &&
diskEncryptionOSSetting?.status
) {
if (
!diskIsEncrypted &&
isDiskEncryptionSupportedLinuxPlatform(hostPlatform, hostOsVersion ?? "")
jacobshandling marked this conversation as resolved.
Show resolved Hide resolved
) {
// setting applies to a Linux host
if (!diskIsEncrypted) {
// linux host not in compliance with setting
return (
<div className={baseClass}>
Expand All @@ -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">
Expand Down
Loading