Nico
b40fa26e2e
Follow-up changes to observer live query bypass (#41146)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #36093
This is a follow-up of https://github.com/fleetdm/fleet/pull/40717
# Checklist for submitter
- [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/guides/committing-changes.md#changes-files)
for more information.
## Testing
- [x] Added/updated automated tests
- [x] QA'd all new/changed functionality manually
Verified that the manual test cases I described in
https://github.com/fleetdm/fleet/pull/40717 still pass.
Used the following setup:
- 1 host on Servers.
- 1 host on Servers (canary).
- 9999 hosts on Unassigned.
<img width="1292" height="448" alt="Screenshot 2026-03-10 at 9 41 33 PM"
src="https://github.com/user-attachments/assets/37ba2ad9-aa7b-4d40-b134-56a943e2635c"
/>
Users:
- Team user with these assignments for test cases 1 and 2.
<img width="570" height="269" alt="Screenshot 2026-03-10 at 9 42 41 PM"
src="https://github.com/user-attachments/assets/f4bcf180-b7cc-4d80-a727-26ce887cbe84"
/>
- Global observer user for test cases 3 to 5.
### Test case 1
Report on Workstations (canary) with observers_can_run=true
<img width="470" height="538" alt="Screenshot 2026-03-10 at 9 42 30 PM"
src="https://github.com/user-attachments/assets/11c02ee9-c6eb-463a-9d4b-168a6155feed"
/>
Tested that I'm only able to target that host using "All hosts", "macOS"
and other labels. Also, searching for specific hosts under "Target
specific hosts" only retrieves that host.
https://github.com/user-attachments/assets/150d986a-b4f2-49ab-86d9-0308685873eb
### Test case 2
Confirmed that I'm not able to target `perf-host-1` from `Servers
(canary)` using a manual label with the same report above.
For this, I created a manual label and assigned only to `perf-host-1`:
<img width="603" height="349" alt="Screenshot 2026-03-10 at 9 50 52 PM"
src="https://github.com/user-attachments/assets/98b4a27a-4e46-466e-a377-622d36903feb"
/>
Note that 0 hosts are targeted and **Run** is disabled:
<img width="950" height="814" alt="Screenshot 2026-03-10 at 9 52 26 PM"
src="https://github.com/user-attachments/assets/3b42c0e9-3005-40cc-8733-85b9b729ce89"
/>
### Test case 3
Accessed same report in `Workstations (canary)` above with a Global
Observer user.
Confirmed that no hosts can be targeted in any way:
<img width="977" height="649" alt="Screenshot 2026-03-11 at 8 29 26 AM"
src="https://github.com/user-attachments/assets/ac87ac7e-3097-4228-a724-1d9324dec504"
/>
<img width="986" height="746" alt="Screenshot 2026-03-11 at 8 30 06 AM"
src="https://github.com/user-attachments/assets/5ca592d2-be8c-43c0-8a27-d18fdee35442"
/>
<img width="1017" height="812" alt="Screenshot 2026-03-11 at 8 30 12 AM"
src="https://github.com/user-attachments/assets/fb92940d-3ab2-4136-9e04-825f2c5eb3fe"
/>
<img width="998" height="809" alt="Screenshot 2026-03-11 at 8 30 17 AM"
src="https://github.com/user-attachments/assets/67cc9c0a-e1aa-49df-ad68-1988d6471d32"
/>
<img width="1444" height="311" alt="Screenshot 2026-03-11 at 8 30 35 AM"
src="https://github.com/user-attachments/assets/4b725bf1-0d6d-4458-840e-a96666a34903"
/>
<img width="1444" height="303" alt="Screenshot 2026-03-11 at 8 30 42 AM"
src="https://github.com/user-attachments/assets/54a9cd65-90f5-4454-a713-334e23118295"
/>
### Test case 4
As a global observer, accessing a global report with
observers_can_run=true, I can target all the hosts across all teams.
<img width="951" height="640" alt="Screenshot 2026-03-11 at 8 34 58 AM"
src="https://github.com/user-attachments/assets/3c235b3d-acd5-4801-834f-6fe6cd67d3dd"
/>
<img width="1448" height="527" alt="Screenshot 2026-03-11 at 8 35 06 AM"
src="https://github.com/user-attachments/assets/0f5f663d-8597-4320-aceb-ee6f168ec552"
/>
<img width="1474" height="179" alt="Screenshot 2026-03-11 at 8 35 14 AM"
src="https://github.com/user-attachments/assets/042eda04-e7f6-4c21-9503-878a23435fcd"
/>
### Test case 5
With the same report from test case 4, but observers_can_run=false, I
can't target any hosts.
<img width="971" height="804" alt="Screenshot 2026-03-11 at 8 36 49 AM"
src="https://github.com/user-attachments/assets/3a3a9fe3-a159-4ef9-8b08-4c987b9c0828"
/>
<img width="967" height="813" alt="Screenshot 2026-03-11 at 8 37 00 AM"
src="https://github.com/user-attachments/assets/aba5588d-dd96-4b88-9911-ebdd743bfa65"
/>
2026-03-11 13:42:33 -03:00
..
2026-02-25 15:35:29 -06:00
2026-02-23 09:42:36 -07:00
2026-02-24 12:15:59 -03:00
2026-03-06 12:30:20 -07:00
2026-03-10 14:03:39 -05:00
2026-02-24 14:00:32 -05:00
2026-02-24 14:00:32 -05:00
2026-02-27 12:21:45 -05:00
2026-03-02 09:18:30 -07:00
2026-03-09 16:54:53 -04:00
2026-02-26 07:43:24 -04:00
2026-02-23 08:48:53 -05:00
2026-02-20 08:34:22 -08:00
2026-02-16 13:59:40 -06:00
2026-02-18 12:52:06 -05:00
2026-02-16 12:11:40 -08:00
2026-02-27 14:30:05 -06:00
2026-02-24 15:35:02 -06:00
2026-03-02 12:16:31 -05:00
2026-03-05 15:12:04 -03:00
2026-03-11 13:42:33 -03:00
2026-03-09 09:54:14 -03:00
2026-02-27 14:57:43 -04:00
2026-02-19 13:05:04 -03:00
2026-02-26 12:47:52 -05:00
2026-03-03 14:29:28 -05:00
2026-02-18 12:53:24 -06:00
2026-03-03 12:33:31 -05:00
2026-02-27 16:07:33 -05:00
2026-03-02 15:25:46 -05:00
2026-02-25 14:11:03 -06:00
2026-03-06 10:23:15 -05:00
2026-03-04 11:53:59 -05:00
2026-03-04 13:22:44 -05:00
2026-02-19 09:26:22 -06:00
2026-02-25 09:43:08 -04:00
2026-02-18 12:52:21 -04:00
2026-02-18 18:16:56 -03:00
2026-02-18 10:13:47 -04:00
2026-03-06 12:11:37 -05:00
2026-02-17 14:04:07 -04:00
2026-03-03 14:14:29 -05:00
2026-02-17 07:10:52 -06:00
2026-02-27 14:05:15 -05:00
2026-02-18 08:11:33 -06:00
2026-02-27 10:34:46 -05:00
2026-02-26 11:42:00 -05:00
2026-02-17 15:19:33 -06:00
2026-02-19 13:53:32 -06:00
2026-02-26 11:42:00 -05:00
2026-02-17 13:20:24 -04:00
2026-02-17 19:54:36 -06:00
2026-02-16 15:31:20 -08:00
2026-02-20 17:09:41 -05:00
2026-02-18 12:02:19 -05:00
2026-02-19 16:05:29 -03:00
2026-02-25 15:52:09 -06:00
2026-03-02 15:14:19 -05:00
2026-02-19 16:06:00 -06:00
2026-03-10 14:03:59 -05:00
2026-02-23 09:26:58 -06:00
2026-03-03 14:14:58 -05:00
2026-02-20 17:22:50 -06:00
2026-02-20 12:21:55 -06:00
2026-03-02 16:25:48 -08:00
2026-03-06 14:02:51 -03:00
2026-03-02 22:18:36 -06:00
2026-03-09 09:05:36 -04:00
2026-03-05 17:05:03 -05:00
2026-02-26 07:47:12 -06:00
2026-02-25 18:01:47 -03:00
2026-03-05 18:08:54 -06:00
2026-03-07 17:32:59 -06:00
2026-03-06 16:16:17 -06:00
2026-02-26 12:49:52 -06:00
2026-02-26 14:12:22 -03:00
2026-03-10 15:11:27 -05:00
2026-03-06 14:02:51 -03:00
2026-02-27 08:37:07 -06:00
2026-02-27 16:15:34 -06:00
2026-03-04 11:39:04 -03:00
2026-03-10 13:20:43 -03:00
2026-03-02 16:38:52 -03:00
2026-03-02 16:38:52 -03:00
2026-03-09 13:49:07 -04:00
2026-03-03 17:44:49 -06:00
2026-03-04 09:58:27 -06:00
2026-03-06 17:41:31 -03:00
2026-03-03 17:16:10 -06:00
2026-03-04 14:03:34 -05:00
2026-03-09 15:39:13 -05:00
2026-03-09 08:56:05 -05:00
2026-03-06 17:41:28 -06:00
2026-03-11 11:38:07 -05:00
2026-03-09 17:23:44 -03:00
2026-03-10 14:03:25 -05:00
2026-03-09 16:43:50 -05:00
2026-03-10 10:15:01 -03:00
2026-03-10 11:18:32 -03:00
2026-03-10 13:44:10 -05:00
2026-03-04 12:25:20 -06:00
2026-02-27 17:09:54 -03:00
2026-02-25 18:01:47 -03:00
2026-02-23 09:14:07 -03:00
2026-02-24 11:25:00 -03:00
2026-02-19 16:36:47 -05:00
2026-02-26 17:05:13 +00:00
2026-03-05 17:02:21 +00:00
2026-02-18 12:00:17 +00:00
2026-03-04 13:12:33 +00:00
2026-02-19 13:19:52 +00:00
2026-02-27 17:03:52 +00:00
2026-02-27 17:04:14 +00:00
2026-03-10 17:15:09 +00:00
2026-02-24 12:51:48 -06:00
2026-02-18 08:15:29 -06:00
2026-02-20 10:33:27 -06:00