Skip to content

Collect MDM data from macOS#26796

Merged
codingllama merged 2 commits intomasterfrom
codingllama/dt-newcdc
May 25, 2023
Merged

Collect MDM data from macOS#26796
codingllama merged 2 commits intomasterfrom
codingllama/dt-newcdc

Conversation

@codingllama
Copy link
Copy Markdown
Contributor

Collect additional MDM fields like device model, OS version/build, Jamf version, etc.

Some information can be acquired from macOS APIs, others from "system" commands like /usr/bin/sw_vers and /usr/bin/profiles, some have to be acquired from 3rd party commands.

A major theme is trying to avoid string parsing, as I don't know when (and how) macOS might decide to internationalize strings (and break our parsers in the process).

Example:

$ go build ./tool/tsh && ./tsh device collect -d
> DeviceCollectedData {
>   "collect_time":  "2023-05-23T18:55:47.192327Z",
>   "os_type":  "OS_TYPE_MACOS",
>   "serial_number":  "XXXXXXXXXXXX",
>   "model_identifier":  "MacBookPro16,1",
>   "os_version":  "13.4.0",
>   "os_build":  "22F66",
>   "os_username":  "llama",
>   "jamf_binary_version":  "10.46.1-t1683911857",
>   "macos_enrollment_profiles":  "Enrolled via DEP: No\nMDM enrollment: Yes (User Approved)\nMDM server: ...",
>   "system_serial_number":  "XXXXXXXXXXXX"
> }

https://github.com/gravitational/teleport.e/issues/826

@codingllama codingllama requested a review from strideynet May 23, 2023 19:03
@github-actions github-actions Bot requested review from Joerger and probakowski May 23, 2023 19:04
Comment thread lib/devicetrust/native/device_darwin.go
Comment thread lib/devicetrust/native/device_darwin.h
@codingllama codingllama force-pushed the codingllama/dt-newcdc branch from 162db94 to a3afb79 Compare May 24, 2023 13:54
@public-teleport-github-review-bot public-teleport-github-review-bot Bot removed the request for review from Joerger May 25, 2023 10:04
@codingllama codingllama added this pull request to the merge queue May 25, 2023
Merged via the queue into master with commit 5031d95 May 25, 2023
@codingllama codingllama deleted the codingllama/dt-newcdc branch May 25, 2023 13:15
@public-teleport-github-review-bot
Copy link
Copy Markdown

@codingllama See the table below for backport results.

Branch Result
branch/v13 Create PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants