fleet icon indicating copy to clipboard operation
fleet copied to clipboard

iOS/iPadOS: More host vitals

Open noahtalerman opened this issue 9 months ago • 7 comments

Goal

User story
As an IT admin,
I want Fleet to collect battery health, UDID, model (i.e. iPhone 14 Pro Max), model number, Bluetooth low energy capability, public IP address, iCloud backup (enabled), last iCloud backup, logged in to the App Store, and everything else available from Apple.

Changes

Product

  • [x] UI changes: Figma wireframes
  • [ ] CLI (fleetctl) usage changes: No changes
  • [ ] YAML changes: No changes
  • [x] REST API changes: https://github.com/fleetdm/fleet/pull/48303
  • [ ] Fleet's agent (fleetd) changes: No changes
  • [ ] Fleet server configuration changes: No changes
  • [ ] Exposed, public API endpoint changes: No changes
  • [ ] fleetdm.com changes: No changes
  • [ ] GitOps mode UI changes: No changes
  • [ ] GitOps generation changes: No changes
  • [ ] Activity changes: No changes
  • [ ] Permissions changes: No changes
  • [ ] Changes to paid features or tiers: No changes
  • [ ] My device and fleetdm.com/better changes: No changes
  • [ ] Usage statistics: No changes
  • [ ] Other reference documentation changes: No changes
  • [ ] First draft of test plan added
  • [ ] Once shipped, requester has been notified
  • [x] Once shipped, dogfooding issue has been filed

Engineering

  • [x] Test plan is finalized
  • [x] Contributor API changes: REST API doc PR #48303 (merged 2026-07-11) already covers all 29 new fields — no further API doc changes needed. "Not supported" per enrollment method is determined entirely in the frontend (a static lookup table, populated from sub-issue #49987's manual QA), not via any additional API field. (*)
  • [x] Feature guide changes: Add a link to Apple's DeviceInformationCommand queries dictionary.
  • [x] Database schema migrations: Yes — new host_mdm_apple_device_vitals side table (keyed by host_uuid, scalar + JSON columns) and a host_mdm_apple_service_subscriptions child table, both registered in additionalHostRefsByUUID (sub-issue #49984).
  • [x] Load testing: No — this expands parsing of an ack payload for a command already sent every refetch cycle; no change to command cadence, only payload size. (**)
  • [x] Pre-QA load test: Not required, per above.
  • [x] Load testing/osquery-perf improvements: N/A for QA gating (see above), but osquery-perf was updated anyway per review feedback on #50046 so synthetic hosts report representative vitals data — sub-issue #50521, PR: #50520.
  • [x] This is a premium only feature: No (assumed — core MDM vitals, not called out as premium anywhere in this issue; please flag if that assumption is wrong before sub-issue #49985 ships).

(*) @nulmete: didn't notice any unsupported field on local testing, and also we're limiting the new vitals to only be shown for non-BYOD enrollments (because of a bunch of PII-like data being returned).

Image

(**) @nulmete: might need load testing on the new tables at scale (e.g. 100k hosts) -- the device_attestation field is pretty large (~3-4KB/row) and recurring per-host writes on each refetch cycle could add meaningful DB load.

ℹ️  Please read this issue carefully and understand it. Pay special attention to UI wireframes, especially "dev notes".

QA

Risk assessment

  • Requires testing in a hosted environment: Yes — real iOS/iPadOS devices enrolled via all three methods (manual, ADE/automatic, personal/BYOD) are needed to validate per-enrollment field availability; this can't be fully simulated.
  • Requires load testing: No.
  • Risk level: Low

Test plan

Make sure to go through the list and consider all events that might be related to this story, so we catch edge cases earlier.

  • The new properties ONLY apply to iOS and iPadOS. Omit the new host vital values from the API and UI if the host OS is not iOS/iPadOS (don't surface them at all, even with empty strings/null as value).
  • The following properties have different API and UI representations: is_mdm_lost_mode_enabled (API) <-> Lost mode (UI), is_do_not_disturb_in_effect (API) <-> Do not disturb (UI), is_device_locator_service_enabled (API) <-> Device locator service enabled (UI), is_cloud_backup_enabled (API) <-> Cloud backup enabled (UI), app_analytics_enabled (API) <-> App analytics (UI).
  • Personal (BYOD) enrolled iOS/iPadOS hosts must not surface any of the new device vitals fields in the API or UI -- this is an intentional privacy exclusion (some of these fields can carry PII, e.g. service subscription phone numbers, push token, accessibility settings), not a per-field "not supported" gap like the other enrollment-method differences above. Verify a BYOD-enrolled host shows none of the new fields, and that a host switching from company-owned to BYOD has its previously-collected vitals cleared rather than continuing to display stale data from the prior enrollment.
  • Some properties will only be available for certain enrollment methods. Please try all three enrollment methods (manual, company-owned, BYOD) and message @Leanngove which properties are included for which enrollment method and which aren’t. This will allow us to write more detailed tooltips
  • If property is not available for a certain enrollment method, we can display this as "Not supported" with a tooltip on the UI. TBD on the API implementation (empty string vs. null?).

Testing notes

Confirmation

  1. [x] Engineer: Added comment to user story confirming successful completion of test plan.
  2. [x] QA: Added comment to user story confirming successful completion of test plan.

noahtalerman avatar Feb 03 '26 22:02 noahtalerman

@lucasmrod, I'm setting to S assuming MDM has this info. (or most of it) I'm not 100% sure though so feel free to change.

sharon-fdm avatar Mar 11 '26 18:03 sharon-fdm

We currently use the DeviceInformation command to retrieve vitals for iOS/iPadOS. Information on it can be found at https://developer.apple.com/documentation/devicemanagement/deviceinformationresponse and specifically under QueryResponses

Also note that Personal enrollments can't get as much information as manual enrollments or ADE enrollments

JordanMontgomery avatar Jun 17 '26 19:06 JordanMontgomery

We should include the Apple docs (https://developer.apple.com/documentation/devicemanagement/deviceinformationcommand/command-data.dictionary/queries-data.dictionary) in the user guide as well!

Leanngove avatar Jun 26 '26 21:06 Leanngove

Hey @lucasmrod, one question here:

If property is not available for a certain enrollment method, we can display this as "Not supported" with a tooltip on the UI. TBD on the API implementation (empty string vs. null?).

What do we do currently for other properties that are not supported? We want to be consistent here.

Otherwise, this is ready to spec.

CC @rachaelshaw

Leanngove avatar Jul 02 '26 18:07 Leanngove

Test plan completed (Note: Re: If property is not available for a certain enrollment method haven't noticed differences between ADE and manual enrollment(non-BYOD) -- BYOD should not show any of these new vitals.)

nulmete avatar Aug 19 '26 20:08 nulmete

Branch: rc-minor-fleet-v4.91.0 (server/fleetctl 4.91.0-rc.2608241519, rev 8d2f021ec7). Implementing PR #50496 on-branch/in-build; related "Not supported" behavior PR #49301 also on-branch/in-build. Not premium. Validated live across all three enrollment methods and both platforms using real devices (iPhone iOS 26.0 manual, iPad iPadOS 26.0 ADE) plus simulated hosts and DB verification.

Verdict: ✅ PASS — new iOS/iPadOS device vitals are collected, stored, and surfaced in the API and Host details UI. iOS/iPadOS-only gating, the BYOD/personal privacy exclusion, vitals-clearing-on-transition, and the API↔UI name mappings all verified. No open gaps.

Test plan coverage (live)

Item Result
Vitals — manual enrollment (real iPhone, iOS) ✅ real device reported the new fields populated (model_number, battery_level, wifi/bluetooth_mac, modem_firmware_version, cellular_technology, service_subscriptions incl. IMEI, all 5 API booleans, etc.)
Vitals — ADE/automatic enrollment (real iPad, iPadOS) ✅ real ADE-enrolled iPad (status "On (automatic)") reported 18 populated fields (battery, accessibility_settings, all 5 API booleans, is_network_tethered, etc.)
Vitals — company-owned (simulated iOS) ✅ osquery-perf host returned 21/23 sampled fields incl. accessibility_settings + organization_info objects
iOS/iPadOS only — omit for non-Apple-mobile ✅ macOS host returns none of the new fields (omitted, not null)
API↔UI name mappings (5 booleans) ✅ API names present; UI shows Lost mode / Do not disturb / Device locator service enabled / Cloud backup enabled / App analytics
BYOD/personal surfaces no new fields (privacy) ✅ host flipped to personal → all new fields omitted from API while DB row retained (read-time exclusion); reverted
Vitals cleared on company-owned → BYOD switch ✅ code-verified: deleteHostMDMAppleDeviceVitalsDB runs if transitioningToPersonal on re-enroll
UI (Host details → Vitals → View all) ✅ modal renders new vitals with grouped Accessibility settings and mapped labels
Per-enrollment-method field differences ✅ manual iPhone and ADE iPad both return the full non-BYOD set; observed differences (iPad lacks modem_firmware_version / personal_hotspot_enabled / service_subscriptions) are device-capability (Wi-Fi-only iPad, cellular_technology: None), not method gaps

Notes

  • PII: real-device identifiers (IMEI, MACs, UDID, serial, model number) intentionally omitted from this report; the UI rendering was captured on a simulated host to avoid exposing them.

xpkoala avatar Aug 26 '26 15:08 xpkoala

Admins see deeper now battery health and device details come to light

fleet-release avatar Sep 23 '26 19:09 fleet-release