-
Meet declarative device management
The future of device management is here: Learn how you can support mobile device management while allowing individual devices to be autonomous and proactive, bringing both increased performance and scalability. We'll show you how you can incorporate this declarative model in your MDM solution.
Resources
Related Videos
WWDC23
WWDC22
WWDC21
-
0:00
♪ Bass music playing ♪ ♪ Melissa Nierle: I'm Melissa Nierle, a software engineer on the Enterprise and Education Technologies team.
0:14
At Apple, we're always working to create the best device management features and functionality to equip our enterprise partners and education organizations with the tools they need to connect their team members and students.
0:27
0:31
The protocol is a well-established, heavily used solution provided directly within iOS, macOS, and tvOS and has become a standard across mobile device management.
0:42
And while we add features to it each year, we also continually evaluate the protocol against our device management goals and evolve it to meet the dynamic needs of MDM solution developers, admins, and users.
0:55
1:00
1:06
Then any performance challenge is compounded when you manage a large number of devices across an organization.
1:13
This is an example of where we want to ensure our protocol is as performant and scalable as possible.
1:19
1:26
The future of device management is declarative management; a transformative update to the protocol which brings policy management to the device.
1:36
Declarative management allows the device to be autonomous and proactive, freeing up the server to be lightweight, reactive, and subscribe to updates without constant polling.
1:47
An autonomous device reacts to its own state changes and then applies management logic to itself without prompting from the server.
1:55
A proactive device has a status channel asynchronously reporting to the server when important state changes occur, avoiding the need for servers to poll devices.
2:06
Enabling devices to be both autonomous and proactive is the foundation of declarative management and allows for increased performance and scalability.
2:16
2:21
We've built this new declarative functionality right into our existing MDM protocol, starting with iOS devices.
2:28
2:33
2:37
2:43
2:45
2:48
Declarations, which are payloads that the server defines and sends to devices; the status channel, which is a new channel of communication where the device proactively updates the server with new information about itself; and extensibility, so that, as Apple introduces new features to declarative management, your devices and servers handle it seamlessly.
3:09
Understanding these three pillars will prepare you to incorporate declarative management into your MDM solution.
3:16
3:19
Declarations represent the policy an organization wants to enforce on devices -- for example, accounts, settings, and restrictions.
3:28
Declarations can be created for policy that is common to all users, as well as policy that is specific to a single user or device.
3:36
3:38
The data representation for declarations is similar to profiles, where a declaration is also a dictionary with a set of keys and standard types for values.
3:47
Declarations, however, are serialized as JSON objects when sent over the network, instead of plists.
3:54
4:00
4:05
The Identifier key has a value that uniquely identifies the declaration within the set of all declarations sent to the device.
4:12
4:16
4:21
4:27
4:31
4:35
4:39
The payload is a data-specific piece of the declaration, containing the keys and values pertinent to the declaration type.
4:46
4:51
Values can be strings, numbers, booleans, arrays, or dictionaries and may be constrained in range -- like numbers one through ten -- or to a specific set of values like a string enumeration.
5:02
5:08
5:12
Configurations represent the policies to be applied to the device -- for example, accounts, settings, and restrictions.
5:20
5:25
5:32
The standard keys -- Type, Identifier, and ServerToken -- are present, as required for all declarations.
5:39
5:45
5:51
5:54
5:58
6:02
For large data items, the asset declaration contains a URL that the device uses to fetch the actual asset data from a server.
6:10
6:17
Serving assets from a separate content delivery network shifts the burden of supporting large network bandwidth to a service better suited for it.
6:26
Assets can also be used to represent data specific to a user, such as their name, email address, passwords for accounts, and certificates.
6:34
This takes the per-user customized data out of configurations and moves it into smaller, dedicated asset-type declarations.
6:41
6:45
For example, one credential asset can be referenced by several account configurations, avoiding the need to replicate the same user information in each account configuration.
6:55
7:01
All the configurations referencing that asset remain unchanged, and the device updates the policy accordingly.
7:08
The ability to do incremental updates like this, for many configurations at a time, will improve the overall responsiveness of the device management system.
7:17
7:19
Here is an example of an asset declaration that defines a user identity -- essentially the contact information for a user.
7:26
The three required standard keys are present, and the value of Type defines this as a user identity asset declaration.
7:34
7:38
7:41
7:46
This means all configurations in the set, along with any referenced assets, must be valid in order for all of them to be applied.
7:54
7:59
8:03
The three required declaration keys are present, and the payload contains the set of configurations to be atomically applied by the activation.
8:12
8:15
8:20
Activations can refer to multiple configurations, and a configuration can have multiple activations reference it.
8:29
This many-to-many relationship allows for complex business logic to be handled autonomously by the device.
8:36
Activations can include a predicate that determines when the activation state is active or inactive on a device.
8:44
The device will only process the configurations referenced by an activation if the predicate evaluates to true.
8:51
As an example, a predicate can declare that the particular activation is only active on a specific device type, such as an iPad.
9:00
9:06
This allows the server to send all the declarations for any device states and lets the device itself determine which ones to apply, making the device even more autonomous.
9:16
As the device state changes, the activation predicates are reevaluated without intervention from the server.
9:23
9:29
9:33
In the absence of a predicate, the device will always process the configurations referenced by the activation.
9:41
Here we have the activation example from before, but now there's a predicate present, indicating that this activation should only have its policy applied when the device is an iPad.
9:53
9:57
10:03
This includes a declaration describing details about the organization as well as a declaration that describes the capabilities of the server.
10:10
10:16
10:23
10:29
Given the way that declarations work, the declared state of the device may not match the actual state of the device at any point in time.
10:36
For instance, any declaration that requires user interaction will not apply until that action is taken.
10:44
A good example of this is a passcode policy, where the user has to take action to create a new policy-compliant passcode for the device.
10:53
10:59
11:04
The server can subscribe to specific status items, so it only receives updates for the changes it cares about.
11:12
11:17
Status items can be used as expressions in activation predicates, as shown in the earlier activation predicate example.
11:26
11:33
Upon receiving this configuration, the device will send an initial status report for the subscribed status items, and then send a report if a subscribed item changes.
11:44
11:49
The status of declarations -- whether they are applied or not -- is always reported to the server when changed, without the need for the server to subscribe.
11:58
12:04
This configuration subscribes to three status items representing the device's operating system version, type, and model.
12:12
When this configuration is activated on the device, it will send the initial status report for each of the newly subscribed status items.
12:20
Status items are represented as a JSON object, nested by the hierarchical components of that corresponding key-path.
12:29
12:33
When the user updates the software to the latest iOS version, the device will report the status change for the operating-system version item.
12:41
12:48
12:53
Given the long life cycle of Apple products, it is essential to maintain compatibility between different versions of your MDM solution with Apple devices, especially as software updates and new hardware models are released.
13:06
With declarative management, both the device and server now advertise supported capabilities to each other.
13:13
Each knows when it can start taking advantage of new features without having to hardcode software version or hardware dependencies.
13:21
The capabilities that the server and client both advertise includes a list of supported features representing both minor and major protocol updates.
13:31
The client also advertises supported payloads, which lists the full set of declarations and status items supported by the client.
13:40
13:45
When the server is upgraded, it synchronizes all new capabilities to the device just as it would any other type of declaration.
13:52
13:57
The client's capabilities are sent to the server as a specific status item any time capabilities change.
14:03
This way, the server can immediately start taking advantage of the device's new features and payloads.
14:10
Building extensibility into the declarative data model ensures that declarative management is built for the present and the future.
14:17
Now that you understand the data model, let's dig into how declarative management is seamlessly integrated within the MDM protocol.
14:24
14:29
Declarative management is integrated into the MDM protocol and utilizes it for managing the enrollment and unenrollment process and for handling the HTTP transport and device and user authentication.
14:42
Existing and mature MDM products can smoothly transition to declarative management without a disruptive change to adopt a new protocol or server infrastructure.
14:52
Declarations and the status channel coexist with your already in-use MDM commands and profiles in an extensible way.
15:01
This allows you to gradually adopt the different features of declarative management without having to update all of your MDM workflows at once.
15:08
For example, a server could choose to only implement status subscriptions, effectively adding a status channel to the MDM protocol without having to adopt all of declarative management.
15:20
When the device is unenrolled from MDM, all declarations are removed, and the device state is adjusted accordingly.
15:27
15:32
Actually, declarative management leverages existing MDM behaviors using an MDM command for activation and an MDM CheckIn request for synchronization and status reports.
15:44
15:47
15:51
15:54
15:58
16:02
16:08
Second, the command can include a payload containing synchronization tokens that will initiate a synchronization flow if needed.
16:16
There is also a new DeclarativeManagement CheckIn request type used by the device when synchronizing declarations and to send status reports to the server.
16:26
16:30
16:34
The endpoint key is set to a value indicating that the client is making a request to retrieve the declaration manifest data from the server.
16:43
16:51
When using the CheckIn request to synchronize declarations, there will be a response from the server.
16:57
There are two types of responses: a manifest, which lists the identifier and server token properties of all declarations that the server defines; and single declarations for the device to apply.
17:10
Now that you've learned how to activate declarative management and synchronize declarations with a CheckIn request, let's talk about how you can migrate your policies gradually from profiles to declarations.
17:22
17:28
This enables you to utilize the full suite of MDM profiles to immediately take advantage of declarative management by shifting profile-based policy logic to the device.
17:40
17:43
17:46
When this configuration is activated, the profile is fetched from the URL and installed on the device.
17:53
18:00
18:05
18:09
18:13
18:16
The device responds to the push in the usual way, by sending a ServerURL endpoint request with its status set to Idle.
18:23
18:27
18:32
After processing the DeclarativeManagement command, the device sends an Acknowledged status back to the server.
18:39
18:44
The device then starts its declarative management synchronization process; let's go through that next.
18:51
18:57
19:03
The device then compares the items in the manifest to the set of declarations it previously received from the server.
19:10
Through this comparison, the device can tell which declarations are new, which have changed, and which have been removed.
19:18
19:22
19:28
19:34
Once all declarations have been fetched from the server, the device starts applying the policy changes represented by this updated state of declarations.
19:44
Once the policy changes have been applied, the device will send a status report to the server, with the corresponding updated status items.
19:52
19:58
20:04
It's also only available when the MDM enrollment type is a user enrollment -- either the new onboarding flow introduced with iOS 15, or the flow from iOS 13.
20:14
For configurations, we have account and passcode configurations that cover the equivalent set of MDM account and passcode profile payloads.
20:22
We also support profile configurations enabling you to start installing the full suite of MDM-supported profiles to your devices declaratively.
20:30
Status subscription configurations are also available today and are used for the server to declare the specific status item updates it wants to receive.
20:40
20:43
This simple activation defines a list of configurations that must be applied atomically and may include an optional predicate.
20:52
For asset declarations, there are two types available: user identity assets, which represent a user's contact information; and user credential assets, which contain user IDs and passwords for user accounts.
21:05
For management declarations, we are supporting two types: organization details and server capabilities.
21:13
21:16
21:22
Also available are a set of status items that cover basic properties of the device, like details about a device's hardware model and its operating system.
21:31
For more detail on these declarations and status items, check out Apple's Device Management developer documentation.
21:38
Today we covered the new paradigm of declarative management and its functionality, discovering how declarative management empowers you to make devices more autonomous and proactive.
21:49
21:53
We went through an example showing how declarative management works and reviewed how declarative management is ready for you to start using today.
22:02
22:08
22:11
-