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

Add enable_release_device_manually setting to team and no-team #17698

Merged
merged 14 commits into from Mar 19, 2024

Conversation

mna
Copy link
Member

@mna mna commented Mar 18, 2024

#17401

Checklist for submitter

  • Changes file added for user-visible changes in changes/ or orbit/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

Copy link

codecov bot commented Mar 18, 2024

Codecov Report

Attention: Patch coverage is 90.90909% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 65.62%. Comparing base (aef64e3) to head (be407ac).

Files Patch % Lines
ee/server/service/mdm.go 50.00% 4 Missing and 1 partial ⚠️
Additional details and impacted files
@@                      Coverage Diff                      @@
##           feat-prefill-account-name   #17698      +/-   ##
=============================================================
- Coverage                      65.67%   65.62%   -0.06%     
=============================================================
  Files                           1193     1193              
  Lines                         108026   108077      +51     
  Branches                        2574     2574              
=============================================================
- Hits                           70947    70926      -21     
- Misses                         31709    31768      +59     
- Partials                        5370     5383      +13     
Flag Coverage Δ
backend 66.63% <90.90%> (-0.06%) ⬇️

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.

Copy link
Member Author

@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.

This implements setting the new enable_release_device_manually config option and validating that await_device_configured cannot be provided in a macOS setup assistant. It doesn't implement sending the MDM command to release the device, this will be in a subsequent PR. This PR should unblock finishing wiring up the UI (@ghernandez345 FYI), the rest of the work should be backend only.

@@ -933,6 +943,7 @@ func (svc *Service) getOrCreatePreassignTeam(ctx context.Context, groups []strin
// instead by CopyDefaultMDMAppleBootstrapPackage below
// BootstrapPackage: ac.MDM.MacOSSetup.BootstrapPackage,
EnableEndUserAuthentication: ac.MDM.MacOSSetup.EnableEndUserAuthentication,
// TODO(mna): should we copy the EnableReleaseDeviceManually setting from the global config?
Copy link
Member Author

@mna mna Mar 19, 2024

Choose a reason for hiding this comment

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

@noahtalerman @roperzh This is the settings used when creating a new team from a Puppet run (the preassignment step), it already copies the MacOS Setup Assistant and End-user authentication settings from the no-team (global) config. Should it also copy the new EnableReleaseDeviceManually global setting?

Note that ModifyTeam (called next) only supports the end-user authentication update, not the macos_setup_assistant, so I don't think this really copies that path information unless I'm missing something. It would need to call "Apply Team Specs" to do so.

Copy link
Member

Choose a reason for hiding this comment

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

For the usage the customer is doing I think it should mirror it as well 👍 . They want to:

  1. Define the ABM settings in the "default ABM team"
  2. Make sure that hosts still have those settings, even after the Puppet module reassigns the host to a different team.

Copy link
Member Author

Choose a reason for hiding this comment

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

Gotcha, thanks! I think this will require switching from ModifyTeam to ApplyTeamSpecs so that the whole range of settings can be updated.

Copy link
Member

Choose a reason for hiding this comment

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

damn, sorry about that! I remember we do special handling for the bootstrap package, maybe for this same reason.

Copy link
Member Author

Choose a reason for hiding this comment

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

Quite possibly. Yeah this is very error-prone, the fact that ModifyTeam only handles few if any configs (it was none at first I think, but disk encryption was moved and was added there).

Copy link
Member Author

Choose a reason for hiding this comment

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

So as mentioned in standup, if you don't mind I'll address that change in a future PR, so we can land this in the feature branch and Gabe can integrate the UI with the API changes.

Copy link
Member

Choose a reason for hiding this comment

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

absolutely! makes sense!

@mna mna marked this pull request as ready for review March 19, 2024 13:38
@mna mna requested a review from a team as a code owner March 19, 2024 13:38
@mna mna merged commit b0ab7bb into feat-prefill-account-name Mar 19, 2024
17 checks passed
@mna mna deleted the mna-17401-prefill-lock-oobe-macos branch March 19, 2024 17:21
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.

None yet

2 participants