Skip to content

[v13] Collect MDM data from macOS#26897

Merged
codingllama merged 2 commits intobranch/v13from
bot/backport-26796-branch/v13
May 25, 2023
Merged

[v13] Collect MDM data from macOS#26897
codingllama merged 2 commits intobranch/v13from
bot/backport-26796-branch/v13

Conversation

@codingllama
Copy link
Copy Markdown
Contributor

Backport #26796 to branch/v13

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

@public-teleport-github-review-bot public-teleport-github-review-bot Bot removed the request for review from probakowski May 25, 2023 14:55
@codingllama codingllama added this pull request to the merge queue May 25, 2023
Merged via the queue into branch/v13 with commit 10dba18 May 25, 2023
@codingllama codingllama deleted the bot/backport-26796-branch/v13 branch May 25, 2023 17:03
@r0mant r0mant mentioned this pull request Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants