Accessing iCloud keychain using /usr/bin/security

Is it possible to access the iCloud keychain using /usr/bin/security on macOS ?


for the default keychain this utiltiy seems to work perfectly. But i cannot seem toa ccess the iCloud keychain.


there is a `list-keychains` command which lists the system level and user leve keychain, however whn using the "Keychain Access" GUI application there is also an iCloud keychain listed.


Is it simply a case of specifying the location of the iCloud keychain as part of the args to `security` ?


Some context to my question .... im trying to programatically access the iCloud keychain for website passwords from annother application, and shelling out to the `security` util seemed a simple way to achieve this.


Any help here would be amazing.


Regards


Chris

im trying to programatically access the iCloud keychain for website passwords from annother application, and shelling out to the

security
util seemed a simple way to achieve this.

That’s not going to work. The security model of the iCloud keychain is very different from the security model of the original file-based keychain, and the new model is very specifically designed to prevent exactly what you’re trying to do.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"
Accessing iCloud keychain using /usr/bin/security
 
 
Q