reference · ~12 min read

What actually happens when you press "Erase All Content and Settings"

Every relops-bootstrap reprovision starts with the same three words — Erase All Content and Settings — fired at a Mac mini over MDM. This page is the missing prequel to the deep dive: what the OS does between the button press and the moment the host is re-enrolled and ready for our SCEP profile. No fluff, no reinstall, and — spoiler — no multi-gigabyte download.

Companion to the architecture overview and the deep dive · scope ends the instant enrollment completes (the deep dive picks up there) · Apple Silicon focus, macOS 12→26
Where this sits in our flow

The orchestrator pipeline is quarantine → drain → EACS wipe → DEP re-enroll → SimpleMDM profiles + signed bootstrap PKG → SCEP cert → SecureToken + BST escrow → vault.yaml → puppet → re-registered in TC. This document zooms into just the two bold steps. Everything after "enrollment completes" is the deep dive's territory.

Contents

  1. The whole thing in three sentences
  2. The command, and the token that gates it
  3. The erase: one key, thrown away
  4. What survives, what dies
  5. Reboot → Setup Assistant → re-enroll
  6. The network traffic, in order
  7. The MDC1 allowlist
  8. Apple Silicon vs T2 Intel
  9. What changed, by macOS version
  10. What we couldn't nail down
  11. Sources

1The whole thing in three sentences

EACS is a cryptographic erase, not a reinstall. The MDM sends an EraseDevice command; the Mac asks the Secure Enclave to destroy the one key that unlocks the Data volume, creates a fresh empty Data volume, and reboots straight into Setup Assistant on the same macOS it was already running. It then does an ordinary Automated Device Enrollment handshake — activate, fetch its enrollment profile from Apple, install our MDM payload, get a client identity cert — and it's back.

The myth we keep having to bust

"The wipe takes under five minutes, so it can't be pulling an OS image." Correct — and that's the whole design. EACS never touches the installed OS. It throws away a key; that's an instant operation regardless of how full the disk was. If you ever see a reprovision that does sit there downloading gigabytes, something has gone wrong (a fallback to old-style obliteration, or a T2 box — see §8), and that's a signal, not normal behavior.

2The command, and the token that gates it

Pressing the button in SimpleMDM queues a standard MDM EraseDevice command (Apple's canonical schema lives in apple/device-management, device.erase.yaml). The key that decides the erase strategy is ObliterationBehavior (String, macOS 12.0+):

ValueWhat the device does
DefaultTry EACS; if preflight fails, fall back to obliteration (the macOS 11.x "wipe the whole disk" behavior).
DoNotObliterateTry EACS; if preflight fails, return an Error status and do not erase. Safest for "EACS or nothing."
ObliterateWithWarningTry EACS; fall back to obliteration, but surface a warning.
AlwaysSkip EACS entirely; force obliteration on T2+ devices.

On M-series and T2 Macs running macOS 12+, the default path is EACS. The key has no effect on pre-T2 Intel — those have no Secure Enclave, so there's no key to destroy, and they always take the slow reinstall/obliterate route.

The one gotcha that will ruin your afternoon

On macOS 12.0.1 and later, the MDM must be holding an escrowed Bootstrap Token to silently authorize the EACS command. No escrowed token → the command doesn't silently run. The token is auto-generated when a SecureToken-enabled user logs in for the first time (macOS 10.15.4+) and escrowed to the MDM if it supports it.

This is the load-bearing prerequisite for our whole reprovision loop, and it's why the orchestrator mints a SecureToken and escrows the BST as an explicit step. Watch the two classic failure modes: a token that was generated but never escrowed, and a token that landed on the wrong account (e.g. cltbld instead of the managed admin). Either one leaves the MDM unable to fire EACS, and the failure looks like "the button did nothing."

3The erase: one key, thrown away

This phase is pure local cryptography and generates essentially zero network traffic. Here's the mechanism, straight from Apple's Platform Security guide:

  1. On the internal SSD, the Data volume's file-system key is wrapped by an effaceable / media key that lives under the Secure Enclave's anti-replay protection.
  2. EACS tells the Enclave to destroy that key. That single act renders the entire Data volume "cryptographically inaccessible" — every file becomes undecryptable ciphertext instantly, with no overwrite of the flash. Anti-replay guarantees the old key can't be resurrected.
  3. A new random file-metadata key is generated — Apple's wording is that the metadata key is created "when the operating system is first installed or when the user completes Erase All Content and Settings."
  4. A fresh, empty Data volume is created (observed at roughly 300 MB afterward).

"…the best way to securely erase its entire contents is to destroy its encryption key … anti-replay techniques to ensure that previous keys can't be reused." Destroying the key "renders all files cryptographically inaccessible."

4What survives, what dies

✓ Survives, untouched

  • The Signed System Volume (SSV) — same macOS version, still sealed
  • Preboot
  • Recovery
  • The macOS installer bits already on disk (nothing is re-fetched)

✗ Gone (cryptographically)

  • The entire Data volume — all user data, accounts, secrets
  • The Data-volume encryption keys in the Secure Enclave
  • Any escrowed local state; the box comes up un-enrolled

Because the OS itself is never rebuilt or re-downloaded, the machine reboots directly into Setup Assistant on the pre-existing macOS. This is the reason there's no swscan / swcdn / InstallAssistant / mesu traffic, and the reason it's fast.

5Reboot → Setup Assistant → re-enroll

Now the network wakes up. Setup Assistant walks a fixed sequence: activate the hardware, ask Apple "who owns me and where do I enroll?", then enroll against our MDM. Supervised ADE Macs on macOS 11+ can Auto Advance through this with no human at the keyboard — which is exactly what a headless CI mini needs.

  1. Activation — the device authenticates itself to Apple and gets its activation record.
  2. ADE / DEP lookup — the device fetches its Activation Record, which names our MDM's enrollment URL and the ADE config (skip keys, supervision, non-removable enrollment).
  3. MDM enrollment — the device connects to our MDM URL and installs the enrollment profile, which minimally contains:
    • root + intermediate certs to establish SSL trust,
    • a client identity certificate — via an ACME payload (Apple's current recommendation), a SCEP payload, or a PKCS #12 container,
    • the MDM payload itself.
  4. The device becomes supervised, and enrollment is complete. (Our story continues in the deep dive from here: SimpleMDM pushes the SCEP profile, the cert lands in the keychain, and the bootstrap PKG fetches vault.yaml.)
For the curious

The "client identity certificate" in step 3 is generic Apple enrollment — it's the cert the MDM protocol itself uses. Don't confuse it with our step-ca SCEP cert, which SimpleMDM delivers after enrollment via a separate com.apple.security.scep profile and which is the one that actually unlocks the vault broker. Two different certs, two different CAs, two different jobs.

6The network traffic, in order

Everything Apple-side is HTTPS on TCP 443 except APNs. Here's the full wire sequence from reboot to enrolled:

#HostPortPurpose
Secure Enclave (local)nonekey destruction — no packets
1albert.apple.com
gs.apple.com
443device activation + glue services
2iprofiles.apple.com443fetch the Activation Record / enrollment profile
3mdmenrollment.apple.com
deviceenrollment.apple.com
443ADE lookup → returns our MDM URL
4gdmf.apple.com443software-update catalog lookup (not a payload download)
5SimpleMDM CheckIn / ServerURL443install the MDM enrollment profile
6our CA (via the SCEP/ACME payload)443issue the device identity cert
7*.push.apple.com5223 / 2197 / 443APNs channel (see below)

APNs is the one that trips up firewalls: devices connect out on TCP 5223 (with 443 as fallback), while the MDM server pushes on TCP 2197 (the legacy provider ports 2195/2196 were retired in Nov 2020). All of it lives inside Apple's 17.0.0.0/8 block.

7The MDC1 allowlist

For our locked-down datacenter network, the takeaway is refreshingly small:

Need it?Hosts / portsWhy
YES albert, gs, iprofiles, mdmenrollment, deviceenrollment, gdmf.apple.com — all :443 activation + ADE lookup + enrollment
YES SimpleMDM endpoints :443 install profile + ongoing management
YES *.push.apple.com — device :5223/:443 out, server :2197 APNs push channel
NO* swscan / swcdn / oscdn / mesu / InstallAssistant content servers — not touched by Apple-Silicon EACS. *Keep them open only if you also support T2 fallback or genuine reinstalls.
Use the /8, not a hand-picked subnet

Apple's official guidance is to allow outbound to the whole 17.0.0.0/8 on 5223 + 443 rather than chase narrower ranges. When researching this we specifically refuted a widely-copied "precise" list (17.248.128.0/17, various IPv6 blocks, etc.) — zero of three independent verifications could substantiate it against a primary source. Don't build a firewall rule on those subnets; they drift and they were never authoritative.

8Apple Silicon vs T2 Intel

Apple Silicon (M-series)T2 IntelPre-T2 Intel
EACS available?YesYesNo
MechanismSecure Enclave destroys the media keySecure Enclave (T2) destroys the media keyNo enclave — full obliterate/reinstall
SpeedSeconds–minutesSeconds–minutesSlow (reinstall)
Fallback pathObliteration can pull an installer → network-heavyObliteration can pull an installer → network-heavyAlways the slow path
ObliterationBehaviorHonoredHonoredNo effect

Our fleet is M-series, so the fast cryptographic-erase path is what we get every time. The T2 column matters only as context for why a stray "it's downloading forever" reprovision is worth investigating.

9What changed, by macOS version

VersionChange
macOS 12.0ObliterationBehavior introduced; EACS becomes the erase mechanism on M1/T2.
macOS 12.0.1An escrowed Bootstrap Token is now required to silently authorize the EACS command.
macOS 13 / iOS 16ACME enrollment payload added and made Apple's recommended identity-cert mechanism over SCEP (and required for Managed Device Attestation).
macOS 15 / 26No change to the fundamental sequence above — same cryptographic-erase + ADE model.

10What we couldn't nail down

In the spirit of the deep dive's honesty, here's what this page is not certain about:

Keep this page honest

Like the deep dive, this only stays useful if it gets corrected as macOS and our flow evolve. If you watch a real reprovision with a packet capture or log stream and learn something more precise than what's above, please fold it back in.

11Sources

Primary + corroborating, all confirmed via adversarial cross-check: