Skip to content

implement OTA enrollment#21942

Merged
roperzh merged 7 commits intomainfrom
21019-ota
Sep 10, 2024
Merged

implement OTA enrollment#21942
roperzh merged 7 commits intomainfrom
21019-ota

Conversation

@roperzh
Copy link
Copy Markdown
Contributor

@roperzh roperzh commented Sep 10, 2024

for #21019

Checklist for submitter

If some of the following don't apply, delete the relevant line.

  • Changes file added for user-visible changes in changes/, orbit/changes/ or ee/fleetd-chrome/changes.
    See Changes files for more information.
  • Input data is properly validated, SELECT * is avoided, SQL injection is prevented (using placeholders for values in statements)
  • Added/updated tests
  • Manual QA for all new/changed functionality

@codecov
Copy link
Copy Markdown

codecov Bot commented Sep 10, 2024

Codecov Report

Attention: Patch coverage is 68.78613% with 108 lines in your changes missing coverage. Please review.

Project coverage is 64.95%. Comparing base (fbbd3fd) to head (969fcbe).
Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
pkg/mdm/mdmtest/apple.go 57.98% 32 Missing and 18 partials ⚠️
server/service/apple_mdm.go 67.70% 18 Missing and 13 partials ⚠️
server/datastore/mysql/apple_mdm.go 82.69% 9 Missing and 9 partials ⚠️
server/mdm/apple/deviceinfo.go 62.50% 8 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #21942      +/-   ##
==========================================
+ Coverage   64.94%   64.95%   +0.01%     
==========================================
  Files        1492     1492              
  Lines      116312   116554     +242     
  Branches     3414     3473      +59     
==========================================
+ Hits        75537    75710     +173     
- Misses      33762    33794      +32     
- Partials     7013     7050      +37     
Flag Coverage Δ
backend 66.18% <68.69%> (+0.01%) ⬆️
frontend 52.39% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@roperzh roperzh marked this pull request as ready for review September 10, 2024 15:13
@roperzh roperzh requested review from a team as code owners September 10, 2024 15:13
mna
mna previously approved these changes Sep 10, 2024
Copy link
Copy Markdown
Member

@mna mna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I'm not familiar with the details of the protocol but it all makes sense!

Comment thread pkg/mdm/mdmtest/apple.go
Comment thread pkg/mdm/mdmtest/apple.go
// believe this could be done with a little bit of reverse
// engineering/cleverness but for now, we're signing the request with
// our mock certs and setting this env var to skip the verification.
os.Setenv("FLEET_DEV_MDM_APPLE_DISABLE_DEVICE_INFO_CERT_VERIFY", "1")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to make sure, this will work for integration tests as the mocked devices and the server are in the same process, but this won't work for load tests /osquery_perf, right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you're right. For osquery_perf you'll need to add it in the terraform file that starts the fleet server. I just created a separate PR with the documentation here #21950 to alleviate the amount of codeowners

Comment thread server/mdm/apple/deviceinfo.go Outdated
Comment thread server/service/testing_client.go Outdated
roperzh added a commit that referenced this pull request Sep 10, 2024
thiw new env var is being added in
#21942
@roperzh roperzh requested a review from mna September 10, 2024 17:45
mna
mna previously approved these changes Sep 10, 2024
gillespi314
gillespi314 previously approved these changes Sep 10, 2024
@roperzh roperzh dismissed stale reviews from gillespi314 and mna via 969fcbe September 10, 2024 19:04
@roperzh roperzh merged commit 0581890 into main Sep 10, 2024
@roperzh roperzh deleted the 21019-ota branch September 10, 2024 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants