fleetdm / fleet

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

Add new configuration option to set default team for Apple Business Manager #8733

Closed lukeheath closed 1 year ago

lukeheath commented 1 year ago

Goal

As a Fleet admin, I want to be able to connect Fleet to my Apple Business Manager account so that I can automatically enroll new, macOS hosts to Fleet. This way, I can order a new MacBook that automatically appears in Fleet when it's unboxed.

Related

Requirements

Tasks

1

Example

apiVersion: v1
kind: config
spec:
  mdm:
    apple_bm_default_team: Workstations

2

3

4

mna commented 1 year ago

@noahtalerman the old spec mentioned:

Add new configuration option apple_bm_default_team. Can be set via config yaml fleetctl apply, command line flag, or environment variable.

Note that this is not a server config, but an app one, so it cannot be set by command-line flag nor environment variable. Presumably there will also be a frontend ticket to add a UI option to set it? Otherwise it would be just via fleetctl apply and a yaml file.

mna commented 1 year ago

@noahtalerman about this validation:

Verify that the team exists. Reject if the team does not with an error message.

It's fine to validate this when the default team is set, but nothing prevents the team from being deleted afterwards. It doesn't impact this ticket, but worth mentioning, as the ticket that will use this config option will also have to validate that the team still exists.

mna commented 1 year ago

Estimate: 2

noahtalerman commented 1 year ago

Note that this is not a server config, but an app one, so it cannot be set by command-line flag nor environment variable.

Right. I think "Can be set via config yaml fleetctl apply, command line flag, or environment variable" was a typo in the old spec.

Presumably there will also be a frontend ticket to add a UI option to set it?

@mna that's right. The UI is illustrated here in Figma. Screenshot is below: Screenshot 2022-11-28 at 2 27 40 PM

noahtalerman commented 1 year ago

It's fine to validate this when the default team is set, but nothing prevents the team from being deleted afterwards. It doesn't impact this ticket, but worth mentioning, as the ticket that will use this config option will also have to validate that the team still exists.

@mna I think this makes sense.

Verify that the team exists. Reject if the team does not with an error message.

What I meant by this^ is whenever the user runs fleetctl apply, Fleet should validate that the team specified in mdm.apple_bm_default_team exists. If it doesn't exist, the user sees an error.

mna commented 1 year ago

What I meant by this^ is whenever the user runs fleetctl apply, Fleet should validate that the team specified in mdm.apple_bm_default_team exists. If it doesn't exist, the user sees an error.

@noahtalerman yes, definitely, that's how I understood it too and I included this validation in the spec, just wanted to point out that the team could still be deleted later on so the code that applies that setting (not in the scope of this ticket) should also make that validation.

noahtalerman commented 1 year ago

just wanted to point out that the team could still be deleted later on so the code that applies that setting (not in the scope of this ticket) should also make that validation.

Ah, ok. Makes sense. Thanks.

fleet-release commented 1 year ago

Connect new hosts to Fleet Team enrolls them quickly and neat Safety and security