fleetdm / fleet

Open-source platform for IT, security, and infrastructure teams. (Linux, macOS, Chrome, Windows, cloud, data center)
https://fleetdm.com
Other
5.09k stars 590 forks source link

GitOps fails when there are unaccepted Apple Business Manager terms & conditions #28350

Open noahtalerman opened 2 months ago

noahtalerman commented 2 months ago

customer-numa: would be nice to have an error during dry run june 2025 update from @zayhanlon

Image

GET[ https://customer.fleetdm.com/api/latest/fleet/mdm/bootstrap/7/metadata?for_update=true](https://customer.fleetdm.com/api/latest/fleet/mdm/bootstrap/7/metadata?for_update=true) 404 Not Found (78ms)
{
  "message": "Validation Failed",
  "errors": [
    {
      "name": "team_id",
      "reason": "bootstrap package for this team does not exist"
    }
  ]
}
POST[ https://customer.fleetdm.com/api/latest/fleet/enrollment_profiles/automatic](https://customer.fleetdm.com/api/latest/fleet/enrollment_profiles/automatic)
{"team_id":7,"name":"../profiles/mac/_default-enrollment.dep.json","enrollment_profile":{"profile_name":"Customer default macOS enrollment profile","region":"US","language":"en","org_magic":"1","allow_pairing":true,"is_supervised":true,"is_mdm_removable":false,"skip_setup_items":["AppleID","AppStore","Diagnostics","iCloudDiagnostics","iCloudStorage","Intelligence","Location","Payment","Privacy","Restore","ScreenTime","Siri","TermsOfAddress","TOS","UnlockWithWatch","Welcome"]}}
POST[ https://customer.fleetdm.com/api/latest/fleet/enrollment_profiles/automatic](https://customer.fleetdm.com/api/latest/fleet/enrollment_profiles/automatic) 422 Unprocessable Entity (147ms)
{
  "message": "Validation Failed",
  "errors": [
    {
      "name": "profile",
      "reason": "sending profile to Apple failed: Post \"https://mdmenrollment.apple.com/profile\": DEP auth error: 403 Forbidden: T_C_NOT_SIGNED"
    }
  ],
  "uuid": "9d8bb01e-b110-44f4-8637-1acff9d26b16"
}
Error: uploading macOS setup assistant for team "Endpoints (canary)": POST /api/latest/fleet/enrollment_profiles/automatic received status 422 Validation Failed: sending profile to Apple failed: Post "https://mdmenrollment.apple.com/profile": DEP auth error: 403 Forbidden: T_C_NOT_SIGNED
Running into errors on GitOps run

noahtalerman commented 2 months ago

FYI @ddribeiro

noahtalerman commented 1 month ago

Here's another request:

70 organizations Couldn’t do GitOps deployments without accepting T&C => Dale: Apple updated their ABM terms and conditions. Hard problem for deebradel because new terms get rolled at a rolling basis meaning some customers can accept new terms before others => Dale: GitOps failed meaning no updates happened => Noah: What’s the error message?

deebradel: Is there any way to avoid or should we check this before the run every time?

Potential solutions:

Kathy: numa ran into the same issue:

GET[ https://customer.fleetdm.com/api/latest/fleet/mdm/bootstrap/7/metadata?for_update=true](https://customer.fleetdm.com/api/latest/fleet/mdm/bootstrap/7/metadata?for_update=true) 404 Not Found (78ms)
{
  "message": "Validation Failed",
  "errors": [
    {
      "name": "team_id",
      "reason": "bootstrap package for this team does not exist"
    }
  ]
}
POST[ https://customer.fleetdm.com/api/latest/fleet/enrollment_profiles/automatic](https://customer.fleetdm.com/api/latest/fleet/enrollment_profiles/automatic)
{"team_id":7,"name":"../profiles/mac/_default-enrollment.dep.json","enrollment_profile":{"profile_name":"Customer default macOS enrollment profile","region":"US","language":"en","org_magic":"1","allow_pairing":true,"is_supervised":true,"is_mdm_removable":false,"skip_setup_items":["AppleID","AppStore","Diagnostics","iCloudDiagnostics","iCloudStorage","Intelligence","Location","Payment","Privacy","Restore","ScreenTime","Siri","TermsOfAddress","TOS","UnlockWithWatch","Welcome"]}}
POST[ https://customer.fleetdm.com/api/latest/fleet/enrollment_profiles/automatic](https://customer.fleetdm.com/api/latest/fleet/enrollment_profiles/automatic) 422 Unprocessable Entity (147ms)
{
  "message": "Validation Failed",
  "errors": [
    {
      "name": "profile",
      "reason": "sending profile to Apple failed: Post \"https://mdmenrollment.apple.com/profile\": DEP auth error: 403 Forbidden: T_C_NOT_SIGNED"
    }
  ],
  "uuid": "9d8bb01e-b110-44f4-8637-1acff9d26b16"
}
Error: uploading macOS setup assistant for team "Endpoints (canary)": POST /api/latest/fleet/enrollment_profiles/automatic received status 422 Validation Failed: sending profile to Apple failed: Post "https://mdmenrollment.apple.com/profile": DEP auth error: 403 Forbidden: T_C_NOT_SIGNED
Running into errors on GitOps run