You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added dconf_read table and documentation to enable fleet desktop on Fedora and Debian (#27684)
For #20675 and #25977.
- [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] A detailed QA plan exists on the associated ticket (if it isn't
there, work with the product group's QA engineer to add it)
- [X] Manual QA for all new/changed functionality
- For Orbit and Fleet Desktop changes:
- [X] Make sure fleetd is compatible with the latest released version of
Fleet (see [Must
rule](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/fleetd-development-and-release-strategy.md)).
- [X] Orbit runs on macOS, Linux and Windows. Check if the orbit
feature/bugfix should only apply to one platform (`runtime.GOOS`).
- [X] Manual QA must be performed in the three main OSs, macOS, Windows
and Linux.
- [x] Auto-update manual QA, from released version of component to new
version (see [tools/tuf/test](../tools/tuf/test/README.md)).
[Fleet Desktop](https://fleetdm.com/guides/fleet-desktop) is a menu bar icon available on macOS, Windows, and Linux that gives your end users visibility into the security posture of their machine.
4
+
5
+
Fedora and Debian do not support tray icons by default and rely on the [appindicator-support](https://extensions.gnome.org/extension/615/appindicator-support/) GNOME extension for enabling tray icons. GNOME extensions prompt the end user to accept the installation.
6
+
7
+
This article aims to explain how admins can enable Fleet Desktop on such Linux distributions by using policy queries paired with script execution.
8
+
9
+
## Policy and script execution
10
+
11
+
The [fedora-debian-check-fleet-desktop.yml](../it-and-security/lib/linux/policies/fedora-debian-check-fleet-desktop.yml) policy (used in our Dogfood environment) can be used to check if the extension needed for Fleet Desktop is installed and enabled on Fedora and Debian hosts.
12
+
> NOTE: fleetd 1.41.0 is required (the policy query relies on a table added to that version).
13
+
14
+
Starting in version v4.58.0, Fleet supports running scripts to remediate failing policies (see the [Automatically run scripts](./policy-automation-run-script.md) article for more information). Admins can therefore configure Fleet to run [fedora-debian-enable-fleet-desktop.sh](../it-and-security/lib/linux/scripts/fedora-debian-enable-fleet-desktop.sh) on devices where the policy detects the extension is missing.
15
+
16
+
[Here](../it-and-security/lib/linux/policies/fedora-debian-check-fleet-desktop.yml)'s the full example (policy + script) we use in our GitOps configuration for our Dogfood environment.
17
+
18
+
### End-user experience
19
+
20
+
Following are screenshots of the end-user experience when Fleet runs the script to install the extension (GNOME requires a prompt for installation of extensions for security purposes).
> If the end-user hits `Cancel` instead of `Install` then the extension won't be installed and the policy will continue to fail on the host. Fleet only deploys the script on the first failure of the policy, so the end-user won't be prompted again and again, just once. Admins can still run the script on such hosts manually.
28
+
29
+
### Tray icon
30
+
31
+
After the extension is installed your users will see the Fleet icon on their menu bar:
-- Policy succeeds on Linux distributions that are not Fedora or Debian.
16
+
SELECT 1 FROM os_version WHERE name = 'Fedora Linux' OR platform = 'debian'
17
+
) OR NOT EXISTS (
18
+
-- Policy succeeds on Linux hosts that do not have Fleet Desktop enabled or
19
+
-- Fleet Desktop is not running (e.g. logged out from GUI).
20
+
SELECT 1 FROM processes WHERE name = 'fleet-desktop' LIMIT 1
21
+
) OR EXISTS (
22
+
WITH fleet_desktop AS (SELECT TRIM(cwd, '/home/') AS username, cwd AS home FROM processes WHERE name = 'fleet-desktop' LIMIT 1)
23
+
SELECT 1 WHERE EXISTS (
24
+
-- Check if the extension is installed (an extension can be enabled but not installed, and viceversa).
25
+
SELECT 1 FROM file WHERE path = CONCAT((SELECT home FROM fleet_desktop), '/.local/share/gnome-shell/extensions/[email protected]') AND type = 'directory'
26
+
) AND EXISTS (
27
+
-- Check if the extension is enabled (an extension can be enabled but not installed, and viceversa).
28
+
SELECT 1 FROM dconf_read WHERE username = (SELECT fleet_desktop.username FROM fleet_desktop) AND key = '/org/gnome/shell/enabled-extensions' AND value like '%[email protected]%'
"Fleet Desktop" 0 \"\""Fleet Desktop""Install a GNOME extension to enable Fleet Desktop. This lets you see what your organization is doing on your computer.""[]"'{"urgency": <2>}' 0
"description": "Returns GNOME configuration using the \"dconf read\" command.",
6020
+
"columns": [
6021
+
{
6022
+
"name": "username",
6023
+
"type": "text",
6024
+
"required": true,
6025
+
"description": "End user's username."
6026
+
},
6027
+
{
6028
+
"name": "key",
6029
+
"type": "text",
6030
+
"required": true,
6031
+
"description": "Name of the configuration key to read."
6032
+
},
6033
+
{
6034
+
"name": "value",
6035
+
"type": "text",
6036
+
"required": false,
6037
+
"description": "Value of the provided key."
6038
+
}
6039
+
],
6040
+
"notes": "This table is not a core osquery table. It is included as part of Fleet's agent ([fleetd](https://fleetdm.com/docs/get-started/anatomy#fleetd)).",
description: Returns GNOME configuration using the "dconf read" command.
5
+
columns:
6
+
- name: username
7
+
type: text
8
+
required: true
9
+
description: End user's username.
10
+
- name: key
11
+
type: text
12
+
required: true
13
+
description: Name of the configuration key to read.
14
+
- name: value
15
+
type: text
16
+
required: false
17
+
description: Value of the provided key.
18
+
notes: This table is not a core osquery table. It is included as part of Fleet's agent ([fleetd](https://fleetdm.com/docs/get-started/anatomy#fleetd)).
0 commit comments