Hello,
I am working on a DLP (Data Leak Prevention) agent which must programmatically install our custom Root CA certificate into the System Keychain with the "Always Trust" policy. This is required for our network inspection module.
The installation process is currently handled by a LaunchDaemon. I am using the following command:
security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain <path to certificate>
The certificate is successfully added to the System Keychain, but the "Always Trust" policy is completely ignored. The certificate remains untrusted until the user manually opens System Settings and explicitly changes the trust settings.
Our DLP agent is specifically designed for environment where MDM is not present and we can not rely on MDM to push profiles.
Is it officially possible to set "Always Trust" for certificate programmatically from a LaunchDaemon?
Thank you in advance!
Is it officially possible to set "Always Trust" for certificate programmatically from a LaunchDaemon?
No.
Furthermore, it’s not possible to programmatically install a trusted anchor without user interaction. This isn’t a bug, but the result of a security hardened effort a few years back.
Our DLP agent is specifically designed for environment where MDM is not present …
MDM is the standard way around this. If you can’t rely on MDM then you’ll have to ask the user to approve the anchor.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"