Note: This failure occurs even when running on the same machine that performed the build, signing, and notarization steps.
We are developing a command-line Endpoint Security (ES) client for macOS, distributed to customers as part of an enterprise security suite. We have a valid Apple Developer Team ID (redacted for privacy) and have requested and received the Endpoint Security entitlement for our account.
What We’ve Done
- Built a universal (x86_64/arm64) CLI ES client using Xcode on macOS Sonoma.
- Signed with a Developer ID Application certificate (matching our Team ID).
- Applied the entitlement: com.apple.developer.endpoint-security.client.
- Notarized the binary via notarytool after receiving Apple’s confirmation that the entitlement was “assigned to our account.”
- Distributed and unzipped the notarized ZIP (with com.apple.quarantine xattr intact).
What Happens:
When we run the binary (as root, via sudo) on any test Mac—including the original build/notarization machine—the process is killed immediately at launch. Kernel log (log stream --predicate 'eventMessage CONTAINS "AMFI"' --info) shows:
AMFI: code signature validation failed.
AMFI: bailing out because of restricted entitlements.
AMFI: When validating /path/to/fidelisevents:
Code has restricted entitlements, but the validation of its code signature failed.
Unsatisfied Entitlements:
What We’ve Verified:
- codesign -dvvv --entitlements 😶 ./fidelisevents shows the correct entitlement, team identifier, and certificate.
- xattr ./fidelisevents shows both com.apple.provenance and com.apple.quarantine.
- spctl -a -vv ./fidelisevents returns:
rejected (the code is valid but does not seem to be an app)
origin=Developer ID Application: [REDACTED]
The process is killed even if run on the same Mac where build/sign/notarization occurred.
Other Details The entitlement approval email from Apple simply says it is “assigned to your account” and does not mention “production” or “distribution.”
We have rebuilt, re-signed, and re-notarized after receiving the email.
This occurs on both Apple Silicon and Intel Macs, with recent macOS versions (Sonoma, Ventura).
Question
- Is it possible that Apple only assigned the development Endpoint Security entitlement, and not the production entitlement required for distributing/running notarized ES clients outside of development?
- Is there any way to verify the level of entitlement (dev vs. production) associated with our Team ID?
- What additional steps, if any, are needed to enable the production entitlement so that our binaries can run on customer endpoints without being killed by AMFI?
Any advice, experience, or official documentation about production ES entitlement rollout, approval, or troubleshooting would be greatly appreciated!
Thanks in advance!
I have sent you a PM on the DTS support request with a link to download the file
Got it. Thanks!
The issue here is a Developer ID certificate mismatch. Recall from TN3125 Inside Code Signing: Provisioning Profiles that your provisioning profile ties together the who, what, where, when, and how your code can run. Everything in your profile looks fine except the who. It seems your account has two Developer ID Application certificates, and your ‘app’ is signed with one but your profile authorises the other.
Contrast this:
% codesign -d --extract-certificates YourApp.app
…
% openssl x509 -inform der -in codesign0 -text
Certificate:
Data:
Version: 3 (0x2)
Serial Number: 6277427490450603824 (0x571de70b17947f30)
…
with this:
% security cms -D -i YourApp.app/Contents/embedded.provisionprofile -o profile.plist
% plutil -extract DeveloperCertificates.0 raw -o - profile.plist | base64 -D > profile.cer
% openssl x509 -inform der -in profile.cer -text
Certificate:
Data:
Version: 3 (0x2)
Serial Number:
20:5f:6c:c2:6f:97:0d:10:5e:22:f9:d1:54:20:28:71
…
In X.509, different serial numbers means different certificates.
A while back I filed a bug (r. 136954554) about the inability of syspolicy_check to diagnose this issue. By an astonishing coincidence, an engineer working on syspolicy_check pinged me about reproducing that problem just last week. I’m gonna use this thread to illustrate how this is not just theoretical.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"