Secure token

On this page 7

A secure token is a cryptographic attribute of a macOS user account that links the account password to the key encryption key of an APFS volume, so that the user can unlock FileVault, enable or disable encryption and grant tokens to other accounts. In macOS administration, it is one of the least visible but most consequential account properties, because an account without a secure token cannot unlock an encrypted startup disk, even when it is a full administrator.

Apple introduced secure tokens with APFS in macOS High Sierra. On Macs with Apple silicon, token holders are also volume owners, which gives the attribute a role in software updates and startup security policy as well.

How a secure token protects the APFS volume

A secure token works by wrapping the volume encryption key with a key derived from the user’s password. APFS encrypts data with a volume encryption key, which is itself protected by a key encryption key. Each token holder receives a wrapped copy of that key, stored with the volume’s crypto users, so any one of them can unlock it at startup.

Because the wrapping depends on the password, only an existing token holder can authorize a new one: the system needs one valid unwrapped key to create another wrapped copy. This is why a token cannot simply be assigned by a script running as root. Changing a token holder’s password rewraps the key automatically, while a password reset that bypasses the old password can leave the token out of sync.

The table below lists the components involved and what each one does.

ComponentRoleWhere it lives
Volume encryption keyEncrypts the data on the volumeProtected by the Secure Enclave or T2 chip
Key encryption keyProtects the volume encryption keyWrapped per authorized user
Secure tokenPassword-wrapped copy of the keyAPFS crypto user list
Recovery keyAlternative unlock pathUser record or MDM escrow
Cryptographic components behind a secure token

Which accounts receive a secure token

Whether an account receives a token depends mainly on how and by whom it was created. The first account created in Setup Assistant receives a token automatically, and accounts that a token-holding administrator creates in Users & Groups usually receive one too. Accounts created silently by scripts, by directory services or by MDM often do not.

Creation pathToken by defaultNotes
Setup Assistant first userYesBecomes the initial token holder
Users & Groups by a token holderYesAdmin authentication supplies the key
sysadminctl without token credentialsUsually noNeeds a token holder to authorize
Mobile account at first loginOnly with a bootstrap tokenMDM must hold the escrowed token
Hidden admin from MDM enrollmentOften noDepends on macOS version and workflow
Account creation paths and typical token outcome

Since macOS Catalina, the bootstrap token has changed this picture. When it is escrowed to an MDM server, macOS can use it to grant a secure token to network and mobile accounts at their first login, removing the most common reason for token-less users in managed fleets.

A secure token is not the same as admin rights, a bootstrap token or FileVault itself. Confusing these concepts is the root of many enrollment and encryption problems, so the comparison below separates their purposes.

ConceptWhat it grantsHeld by
Secure tokenUnlocking and managing encrypted APFS volumesIndividual user accounts
Administrator rightsSystem configuration and software installationMembers of the admin group
Volume ownerUpdates and startup security changes on Apple siliconToken-holding users
Bootstrap tokenGranting tokens and authorizing updates for MDMMDM server via escrow
FileVaultFull-disk encryption of the startup volumeThe volume itself
Secure token and neighboring concepts

On Apple silicon, the overlap with volume ownership matters: installing certain software updates, approving a kernel extension under Reduced Security and erasing the Mac all require a volume owner or the bootstrap token. An administrator without a token is therefore blocked from these operations.

Checking and granting tokens from the command line

Administrators manage tokens mainly with sysadminctl, fdesetup and diskutil. Reading token status is safe and requires no credentials beyond administrator access, while granting a token always requires the password of an existing token holder.

TaskCommandResult
Check one usersysadminctl -secureTokenStatus usernameReports ENABLED or DISABLED
List FileVault usersfdesetup listUsers able to decrypt the disk
List crypto usersdiskutil apfs listCryptoUsers /All key holders on the volume
Grant a tokensysadminctl -secureTokenOnNeeds a token holder’s credentials
Check bootstrap escrowprofiles status -type bootstraptokenShows support and escrow state
Common commands for secure token management

Scripts that pass passwords on the command line expose them in process listings and shell history, so interactive authentication or MDM-driven granting is the safer practice in production.

Common pitfalls in managed fleets

Most token problems appear when automation creates accounts before a human token holder exists, or when the last token holder is removed. The consequences range from an inability to enable FileVault to a Mac that cannot install updates without an erase.

  • Deleting the only token holder leaves no account able to grant new tokens; recovery may require the bootstrap token or an erase.
  • Resetting a password from Recovery without the old password can desynchronize the token from the login password.
  • Assuming admin equals token leads to failed FileVault enablement and blocked updates on Apple silicon.
  • Skipping bootstrap token escrow during Automated Device Enrollment removes the safety net for later token grants.
  • Granting tokens to service accounts widens the set of credentials that can decrypt the disk.

Stripped to the essentials

A secure token is a personal key to the encrypted disk. When a Mac encrypts its drive, it locks the data with a master key, and every user with a secure token holds their own copy of that key, protected by their password.

Only someone who already has a copy can make a new one for another user. Being an administrator is not enough: an admin without a token cannot open the encrypted disk or approve some system changes.

Where it is applied

A school district deploys 600 MacBook Air laptops through Automated Device Enrollment. Its MDM creates a hidden local admin account for IT support, and teachers sign in later with network accounts tied to the district directory.

During the pilot, technicians find that FileVault fails to enable for several teachers. Running sysadminctl -secureTokenStatus shows that the teacher accounts have no token, because no token holder existed when they first logged in. The team changes the workflow so that the bootstrap token is escrowed to the MDM server during enrollment, which lets macOS grant tokens to directory accounts at first login.

After the change, every teacher becomes a token holder automatically, FileVault turns on without manual steps and recovery keys are escrowed to the MDM, so IT can still unlock a laptop if a password is forgotten.