How can a macOS app safely extend … | Apple Developer Forums
How can a macOS app safely extend and independently verify an existing Keychain item’s ACL and partition list? Privacy & Security General You’re now watching this thread. If you’ve opted in to email or web notifications, you’ll be notified when there’s activity. Click again to stop watching or visit your profile to manage watched threads and notifications. You’ve stopped watching this thread and will no longer receive emails or web notifications when there’s activity.
Click again to start watching. OrelusMedia OP Created 6d Replies 1 Boosts 0 Views 107 Participants 2 I’m investigating a macOS Keychain access-control question involving an existing generic-password item and a separately code-signed application. The requirement is to authorize the application to access the existing item while preserving all previously authorized applications, partition-list entries, and other security restrictions.
The item must remain in its existing Keychain. Recreating, replacing, or migrating it is not acceptable. My understanding is that legacy trusted-application ACLs and Keychain partition lists can impose separate restrictions, and that modifying one does not necessarily preserve or satisfy the other. I would appreciate clarification on four questions: Is there a supported macOS API for adding one trusted application to an existing generic-password item’s ACL while preserving all other ACL entries and restrictions?
Is there a supported API for modifying an existing item’s partition list without replacing or inadvertently broadening its existing authorization policy? After making these changes, is there a supported method to independently enumerate and verify the complete resulting ACL and partition-list policy, rather than relying solely on a successful access attempt? If complete independent verification is not supported, what approach does Apple recommend for safely extending access to an existing Keychain item without weakening its current protections?
The goal is a narrowly scoped, auditable authorization change, not a general relaxation of Keychain security. I’m particularly interested in the distinction between what macOS technically permits and what Apple officially supports for production applications. Thank you for any guidance or relevant documentation. Answered by DTS Engineer in 916363022 There’s no supported API for modifying a keychain item’s partition list [1].
There is a supported API to modify a keychain item’s ACL otherwise, but there are some significant caveats: Unless you plan in advance, modifying the ACL always triggers user interaction. For access to be granted, the requester must satisfy the ACL and be on the partition list. So, this technique is only helpful if you want to extend the ACL to other programs from the same team. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = "eskimo" + "1" + "@" + "apple.com" [1] You can do this from the command line, using the set-yxz-partition-list subcommands of the security tool, as described in its man page , but I don’t consider that to be an API.
The security tool is intended to be used by users and in shell scripts, not as an API. Replies 1 Boosts 0 Views 107 Participants 2 DTS Engineer OP Apple 6d Recommended There’s no supported API for modifying a keychain item’s partition list [1]. There is a supported API to modify a keychain item’s ACL otherwise, but there are some significant caveats: Unless you plan in advance, modifying the ACL always triggers user interaction.
For access to be granted, the requester must satisfy the ACL and be on the partition list. So, this technique is only helpful if you want to extend the ACL to other programs from the same team. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = "eskimo" + "1" + "@" + "apple.com" [1] You can do this from the command line, using the set-yxz-partition-list subcommands of the security tool, as described in its man page , but I don’t consider that to be an API.
The security tool is intended to be used by users and in shell scripts, not as an API. Add comment