-
Notifications
You must be signed in to change notification settings - Fork 392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fetch installed apps from iPhone/iPad devices. #20733
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #20733 +/- ##
===========================================
- Coverage 55.24% 37.30% -17.94%
===========================================
Files 1423 1423
Lines 133632 134363 +731
Branches 3218 3216 -2
===========================================
- Hits 73823 50123 -23700
- Misses 53794 79713 +25919
+ Partials 6015 4527 -1488
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
8cb58a5
to
ee6e77a
Compare
fb9e1d3
to
308627b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, very exciting feature!
a few minor things that are just personal opinion, feel free to merge.
strings map[string]string | ||
} | ||
|
||
// stats, model, *serverURL, *mdmSCEPChallenge, *mdmCheckInInterval |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leftover?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I'll clean up in the next PR.
software = append(software, fleet.Software{ | ||
Name: truncateString(app["Name"], fleet.SoftwareNameMaxLength), | ||
Version: truncateString(app["ShortVersion"], fleet.SoftwareVersionMaxLength), | ||
BundleIdentifier: truncateString(app["Identifier"], fleet.SoftwareBundleIdentifierMaxLength), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
at some point we should crate structs for the info we fetch from ipad/ios
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. I'll do that next time. Was following the pattern that was already there.
@@ -1683,7 +1685,8 @@ AND COALESCE(s.bundle_identifier, '') = ''; | |||
updateSoftwareWithIdentifierStmt := ` | |||
UPDATE software s | |||
JOIN software_titles st | |||
ON s.bundle_identifier = st.bundle_identifier | |||
ON s.bundle_identifier = st.bundle_identifier AND | |||
IF(s.source IN ('ios_apps', 'ipados_apps'), s.source = st.source, 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very nice solve
@@ -500,6 +500,26 @@ func (c *TestAppleMDMClient) AcknowledgeDeviceInformation(udid, cmdUUID, deviceN | |||
return c.sendAndDecodeCommandResponse(payload) | |||
} | |||
|
|||
func (c *TestAppleMDMClient) AcknowledgeInstalledApplicationList(udid, cmdUUID string, software []fleet.Software) (*mdm.Command, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my personal preference would be to keep the methods of the mdmtest
client reduced to only the protocol operations, it's a bit more verbose for the caller, so I understand the motivation for this.
Part 2 of #19447
Note: TestIntegrationsMDM/TestVPPApps fails when run as part of the suite, but passes standalone. I'd like to proceed with merging this PR, and figure out the issue next week.
Checklist for submitter
changes/
,orbit/changes/
oree/fleetd-chrome/changes
.See Changes files for more information.
cmd/osquery-perf
for new osquery data ingestion features.