Skip to content
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

Update Apple config/DDM profiles if secret variables changed #24995

Merged
merged 18 commits into from
Dec 30, 2024

Conversation

getvictor
Copy link
Member

@getvictor getvictor commented Dec 23, 2024

#24900

This PR includes and depends on PR #25012, which should be reviewed/merged before this one.

Windows profiles are not included in this PR due to issue #25030

This PR adds the following functionality: Apple config/DDM profile is resent to the device when the profile contains secret variables, and the values of those variables have changed. For example.

  • Upload secret variables
  • Upload profile
  • Device gets profile
  • Upload the same profile
  • Nothing happens
  • Upload a different secret variable value
  • Upload the same profile
  • Device gets updated profile

Checklist for submitter

  • Changes file added for user-visible changes in changes/, orbit/changes/ or ee/fleetd-chrome/changes.
    See Changes files for more information.
  • Added/updated tests
  • If database migrations are included, checked table schema to confirm autoupdate
  • For database migrations:
    • Checked schema for all modified table for columns that will auto-update timestamps during migration.
  • Manual QA for all new/changed functionality

Copy link

codecov bot commented Dec 27, 2024

Codecov Report

Attention: Patch coverage is 86.48649% with 30 lines in your changes missing coverage. Please review.

Project coverage is 63.83%. Comparing base (5f4400b) to head (b2bc9d0).
Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
server/datastore/mysql/secret_variables.go 78.57% 10 Missing and 5 partials ⚠️
...tions/tables/20241230000000_AddSecretsUpdatedAt.go 62.16% 10 Missing and 4 partials ⚠️
server/service/apple_mdm.go 91.66% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #24995   +/-   ##
=======================================
  Coverage   63.82%   63.83%           
=======================================
  Files        1613     1614    +1     
  Lines      153431   153516   +85     
  Branches     3985     4036   +51     
=======================================
+ Hits        97922    97991   +69     
- Misses      47716    47727   +11     
- Partials     7793     7798    +5     
Flag Coverage Δ
backend 64.70% <86.48%> (+<0.01%) ⬆️

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.

@getvictor getvictor changed the title Initial implementation for Apple config profiles. Update Apple config/DDM profiles if secret variables changed Dec 27, 2024
@getvictor getvictor marked this pull request as ready for review December 27, 2024 22:25
@getvictor getvictor requested a review from a team as a code owner December 27, 2024 22:25
@getvictor getvictor force-pushed the victor/24900-update-profiles-on-secret-change branch from 979806b to e944daa Compare December 30, 2024 16:51
…rofiles-on-secret-change

# Conflicts:
#	server/service/apple_mdm.go
#	server/service/integration_mdm_profiles_test.go
Copy link
Member

@iansltx iansltx left a comment

Choose a reason for hiding this comment

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

This looks reasonable. This is code I haven't touched before so my signoff is caveated with "this needs an airtight QA plan" but the new functionality and tweaks to existing (e.g. pushing checksums to the DB) make sense.

@getvictor getvictor merged commit bd51e85 into main Dec 30, 2024
21 checks passed
@getvictor getvictor deleted the victor/24900-update-profiles-on-secret-change branch December 30, 2024 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants