Add a custom_settings key under the macos_settings top level key in the config YAML file.
custom_settings accepts an array of paths to profiles (.mobileconfig file). Path is relative to directory that the YAML file is in.
For Fleet Free, this updates profiles on all hosts. For Fleet Premium users this updates profiles on all hosts with no team.
If the user applies a profile with the same identifier (PayloadIdentifier) as a profile that already exists, the profile is edited.
Identifier is unique at the team (or no team) level. If a profile with the same identifier is applied at the team level, this profile is edited. If a profile with the identifier doesn't exist at the team level, a new profile is created.
Empty
If the user applies a config file with an empty custom_settings the profiles are deleted from all hosts (for Premium: hosts on no team). Matches the behavior of agent_options.
Errors
Error if the file does not exist. Error message matches the current behavior of fleetctl apply: Error: open does/not/exist: no such file or directory
Error if Fleet is not connected to Apple (MDM is not turned on in Fleet)
Error if the user tries to add more than 1 profile with the same name (PayloadDisplayName). Display this error message: Couldn’t edit custom_settings. More than one configuration profile have the same name (PayloadDisplayName).
Name is unique at the team (or no team) level.
Error if the user tries to add more than 1 profile with the same identifier (PayloadIdentifier). Display this error message: Couldn’t edit custom_settings. More than one configuration profile have the same name (PayloadIdentifier).
Error if the user tries to add a profile with FileVault related payloads. Display this error message: Couldn’t edit custom_settings. The configuration profiles can’t include FileVault settings. To control these settings, use the macos_settings.disk_encryption option.
User added profiles in UI
If user added profiles in the UI, the custom_settings array doesn't include these configuration profiles when the user gets the config YAML.
When applying the config file, the configuration files specified in custom_settings overrides the configuration files added in the UI. For example, if the user added configuration profile A in the UI and they apply configuration profile B and C using config YAML. Fleet deletes A and adds B and C.
User story
As an IT admin, I want to be able to add/remove configuration profiles to my macOS hosts so that I can enforce settings for my end users.
Requirements
Design
UI
https://www.figma.com/file/hdALBDsrti77QuDNSzLdkx/%F0%9F%9A%A7-Fleet-EE-(dev-ready%2C-scratchpad)?node-id=10517%3A316027
CLI
Update
config
YAML fileExample
config
YAML file:custom_settings
key under themacos_settings
top level key in theconfig
YAML file.custom_settings
accepts an array of paths to profiles (.mobileconfig file). Path is relative to directory that the YAML file is in.PayloadIdentifier
) as a profile that already exists, the profile is edited.Empty
config
file with an emptycustom_settings
the profiles are deleted from all hosts (for Premium: hosts on no team). Matches the behavior ofagent_options
.Errors
fleetctl apply
:Error: open does/not/exist: no such file or directory
PayloadDisplayName
). Display this error message:Couldn’t edit custom_settings. More than one configuration profile have the same name (PayloadDisplayName).
PayloadIdentifier
). Display this error message:Couldn’t edit custom_settings. More than one configuration profile have the same name (PayloadIdentifier).
Couldn’t edit custom_settings. The configuration profiles can’t include FileVault settings. To control these settings, use the macos_settings.disk_encryption option.
User added profiles in UI
custom_settings
array doesn't include these configuration profiles when the user gets theconfig
YAML.config
file, the configuration files specified incustom_settings
overrides the configuration files added in the UI. For example, if the user added configuration profile A in the UI and they apply configuration profile B and C usingconfig
YAML. Fleet deletes A and adds B and C.Update
config
YAML fileExample
team
YAML file:custom_settings
key under themacos_settings
top level key in theteam
YAML file.custom_settings
accepts an array of paths to profiles (.mobileconfig file). Path is relative to directory that the YAML file is in.config
file above (above).config
YAML file (above).config
YAML file (above).API
TODO
Docs
Add a new macOS updates section to the Controls doc page
URL for section: fleetdm.com/docs/using-fleet/controls#macos-settings
Copy:
How to create a custom configuration profile:
Update the permissions documentation