fleet icon indicating copy to clipboard operation
fleet copied to clipboard

Support all Apple declaration (DDM) profiles and assets

Open marko-lisica opened this issue 10 months ago • 17 comments

  • @noahtalerman: After we ship this improvement, before we close this story, let's let folks know in this Mac Admins thread: https://macadmins.slack.com/archives/C0214NELAE7/p1783714431274959

  • UPDATE: @noahtalerman: Currently, the Safari extensions profile is the most sought after. antonella and numa want it.

  • customer-fairbank: Gong snippet

Goal

User story
As an IT admin,
I want to be able to deploy all available Apple declaration (DDM) profiles and assets (for device & user channel)
so that I can test new Apple features and fully leverage the DDM protocol.

Original requests

Changes

Product

  • [x] UI changes: Figma
  • [x] CLI (fleetctl) usage changes: No changes
  • [x] YAML changes: https://github.com/fleetdm/fleet/pull/48134
  • [x] REST API changes: https://github.com/fleetdm/fleet/pull/48134
  • [x] Fleet's agent (fleetd) changes: No changes
  • [x] Fleet server configuration changes: No changes
  • [x] Exposed, public API endpoint changes: No changes
  • [x] fleetdm.com changes: No changes
  • [x] GitOps mode UI changes: Read-only in GitOps mode:
    • Add profile modal options
    • Add asset buttons
  • [x] GitOps generation changes: See subtasks for work, YAML changes for gitops spec
  • [x] Activity changes:
    • New types:
      • “Added Apple asset declaration”
      • “Deleted Apple asset declaration”
      • “GitOps: edited Apple asset declaration”
    • https://github.com/fleetdm/fleet/pull/49035
  • [x] Permissions changes: Follow same permissions as configuration profiles
  • [x] Changes to paid features or tiers: Assets will be Premium since they are fleet-scoped
  • [x] My device and fleetdm.com/better changes: No changes
  • [x] Usage statistics: No changes
  • [x] Other reference documentation changes: TODO
    • https://github.com/fleetdm/fleet/pull/48131
    • UPDATE: @noahtalerman: More "coming soon" to remove: https://github.com/fleetdm/fleet/pull/47217/changes
    • https://github.com/fleetdm/fleet/pull/48133
  • [x] First draft of test plan added
  • [ ] Once shipped, requester has been notified
  • [ ] Once shipped, dogfooding issue has been filed https://github.com/fleetdm/fleet/issues/50988

Engineering

  • [x] Test plan is finalized
  • [x] Contributor API changes: No changes
  • [x] Feature guide changes: https://github.com/fleetdm/fleet/pull/48131
    • TODO: @JordanMontgomery can you help me document how to use the certificate for MDM communication to authenticate requests to S3 or a custom server so plists don’t have to be publicly hosted in this guide?
  • [x] Database schema migrations: See subtasks
  • [x] Load testing: See subtasks
  • [x] Pre-QA load test: See subtasks
  • [x] Load testing/osquery-perf improvements: See subtasks
  • [x] This is a premium only feature: Yes

ℹ️  Please read this issue carefully and understand it. Pay special attention to UI wireframes, especially "dev notes".

Risk assessment

  • Requires testing in a hosted environment: Yes
  • Requires load testing: Yes
  • Risk level: High
  • Risk description: The user channel and the introduction of assets both introduce the possibility of a lot more requests to our DDM endpoints among other things.

Test plan

Make sure to go through the list and consider all events that might be related to this story, so we catch edge cases earlier.

Core flow

Asset Declarations

  • [ ] Upload a valid DDM asset .json (e.g., com.apple.asset.*) via UI. Verify profile accepted
  • [ ] Try to upload a DDM asset json as a config profile, verify it's blocked
  • [ ] Host requests declaration/asset/{id} verify asset JSON returned (not 404)
  • [ ] Host declaration-items response includes Assets array alongside Configurations and Activations
  • [ ] Remove asset and any referencing configurations from Fleet — host removes it on next sync
  • [ ] Asset-referencing configuration status transitions: Pending → Verifying → Verified via DDM StatusReport
  • [ ] Verify that after uploading an asset and a System or User scoped declaration referencing it, the asset cannot be deleted until the declaration is deleted
  • [ ] Verify that the same set of assets and referencing declarations can be uploaded on multiple teams
  • [ ] Verify that duplicate copies of a given asset, even with a different name(but same identifier) cannot be uploaded on a single team

User-Scoped DDM Declarations on macOS

  • [ ] Verify that configuration declarations uploaded without any scoping still default to system scoped and are sent to the user channel
  • [ ] Upload a user-scoped DDM declaration — accepted, scoped to user channel
  • [ ] ADE-enrolled host receives user-scoped DDM profile — applied to setup user
  • [ ] Manually enrolled host receives user-scoped DDM profile — applied to enrolling user
  • [ ] User-channel DDM profiles can reference assets
  • [ ] User channel DDM transitions Pending->Verifying->Verified similar to device channel
  • [ ] User-channel declarativemanagement command properly handles NotNow responses(doesn't mark profiles failed, etc)
  • [ ] Verify user-channel DDM can be held back up to 2 hours during enrollment. In other words, they shouldn't be immediately marked failed because the user-channel is not available
  • [ ] Verify that a host with no user channel or user channel deleted(e.g. via deleting the nano_enrollment row) results in user channel declarations marked as failed(2 hours after enrollment - see above test)
  • [ ] Verify that user-channel declarations can properly be targeted using all 6 label classes(no labels, include-any, include-all, exclude-any, include-any+exclude-any, include-all+exclude-any)
  • [ ] Verify that user-channel declarations can include all variables allowed by system-scoped declarations and that when IdP variables change the declarations are resent
  • [ ] Verify that user-channel declarations are removed from hosts when deleted from Fleet
  • [ ] Verify that a single asset can be referenced with user and system scoped configurations
  • [ ] Specifically test this use case: https://developer.apple.com/documentation/devicemanagement/appsettings

Gitops

  • [ ] Verify user and device scoped declarations can be configured via Gitops
  • [ ] Verify asset declarations can be uploaded via Gitops for user and device scoped declarations
  • [ ] Verify when user or device scoped declarations are edited they are resynced appropriately
  • [ ] Verify that when an asset referenced by a user or device scoped declaration is edited, those declarations and the asset are resynced appropriately
  • [ ] Verify premium gating(free can't upload assets via gitops)

Edge cases

  • TODO

Supplemental testing

Testing notes

Confirmation

  1. [x] Engineer: Added comment to user story confirming successful completion of test plan (include any special setup, test data, or configuration used during development/testing if applicable).
  2. [ ] QA: Added comment to user story confirming successful completion of test plan.
  3. [ ] QA: Determined whether this story needs Playwright automation.
    • Needs automation: Yes / No
    • If yes, filed a follow-up issue in the :help-qa project with status "Needs automation":

marko-lisica avatar Jan 29 '26 10:01 marko-lisica

This is a M that could become a L and would benefit a POC. especially things like assets, do we need to manage the storage of those like we do w/ software today? Apple might have some requirements like that we should discover before planning this one. Going to mark it L and then we can adjust if we do POC and learn it's less effort than that.

georgekarrv avatar Feb 10 '26 15:02 georgekarrv

  • [ ] Other reference documentation changes:
    • Update the "Device and user scope" section to remove "User-scoped declaration (DDM) profiles for macOS are coming soon"
    • UPDATE: @noahtalerman: More "coming soon" to remove: https://github.com/fleetdm/fleet/pull/47217/changes

FYI @melpike

noahtalerman avatar Jun 10 '26 21:06 noahtalerman

@noahtalerman DDM is not only all declarations needed - also assets and specific ACME / SCEP handling is essential to support

headmin avatar Jun 12 '26 13:06 headmin

@headmin That is the plan to uncover in the PoC https://github.com/fleetdm/fleet/issues/45626

ACME/SCEP credentials is just a slightly different asset no? So handling assets, would also work for those?

MagnusHJensen avatar Jun 12 '26 16:06 MagnusHJensen

@MagnusHJensen Yes right, I’ve referenced the ACME/SCEP credentials as specific asset examples. The context here: this becomes important to work along https://developer.apple.com/documentation/ManagedApp/ soon available in macOS 27, to allow leverage hardware bound identity within Apps (EDR, VPN, Browsers, etc.).

headmin avatar Jun 13 '26 06:06 headmin

@noahtalerman DDM is not only all declarations needed - also assets and specific ACME / SCEP handling is essential to support

FYI @melpike

noahtalerman avatar Jun 15 '26 14:06 noahtalerman

@noahtalerman the status channel is also relevant - see 47843

headmin avatar Jun 18 '26 16:06 headmin

Goal

User story
As an IT admin,
I want to be able to deploy all available Apple declaration (DDM) profiles (configuration and management), assets, and predicates (for device & user channel)
so that I can test new Apple features and fully leverage the DDM protocol.

FYI @melpike and @MagnusHJensen I tweaked the story and title to match the naming we landed on during design review:

Declaration (DDM) profile in Fleet = what Apple calls configurations and management declarations.

noahtalerman avatar Jun 18 '26 16:06 noahtalerman

@noahtalerman I'd say we should look into all of the extra information status subscriptions, aiming to get full dynamic device state. Not sure how this best fits, eg. as a DDM based host vital representation. Anyhow the list status channel provides, is growing, it includes account.list, passcode (is-compliant/is-present), management.declarations, one device state for softwareupdate, etc.. Also when DDM w/ predicates is started to be used more, I recon DDM status channel is the desired command-result mechanism.

headmin avatar Jun 18 '26 17:06 headmin

@noahtalerman Just saw the top update, what is stopping them from using the SafariExtensionsSettings configuration today? It does not require assets, nor is it blocked from being uploaded.

MagnusHJensen avatar Jul 09 '26 11:07 MagnusHJensen

what is stopping them from using the SafariExtensionsSettings configuration today?

@MagnusHJensen my understanding is that this Safari configuration requires user channel support. And today Fleet doesn't support the user channel for DDM profiles (that's part of this story).

cc @melpike

noahtalerman avatar Jul 09 '26 23:07 noahtalerman

@noahtalerman Of course, completely forgot that part.

MagnusHJensen avatar Jul 10 '26 07:07 MagnusHJensen

Dev QA: ✅

MagnusHJensen avatar Jul 10 '26 15:07 MagnusHJensen

Asset declarations

  • Valid com.apple.asset.* upload accepted; asset JSON blocked as a config profile
  • Asset can't be deleted while referenced; deletes after the referencing configuration is removed
  • Duplicate identifier (even under a different name) blocked on a team; same asset + declarations upload across multiple teams
  • Add/Delete asset activities; permissions match configuration profiles; Premium-gated

User-scoped DDM declarations (macOS)

  • Accepted and delivered on the user channel; Verified on ADE (setup user) and manually-enrolled (enrolling user) hosts
  • Pending → Verifying → Verified on the user channel; NotNow leaves declarations pending, not failed
  • Held back during enrollment; marked failed only after the window when no user channel exists; iOS/iPadOS report the expected error
  • All 6 label classes respected; Fleet variables accepted/expanded, unsupported variables rejected

GitOps

  • Device- and user-scoped declarations apply and re-sync on edit

Bug

  • Assets via GitOps fail https://github.com/fleetdm/fleet/issues/49979

chrstphr84 avatar Jul 27 '26 14:07 chrstphr84

  • @noahtalerman: After we ship this improvement, before we close this story, let's let folks know in this Mac Admins thread: https://macadmins.slack.com/archives/C0214NELAE7/p1783714431274959

FYI @MagnusHJensen @melpike

noahtalerman avatar Jul 28 '26 20:07 noahtalerman

Note: Notified customer-numa. Closing

pintomi1989 avatar Aug 20 '26 17:08 pintomi1989

Admins reach higher peaks all Apple tools now at hand clouds grow more complete

fleet-release avatar Aug 20 '26 17:08 fleet-release