I'm evaluating a macOS file-based Keychain ACL that should authorize one application identity, defined by an intended code-signing requirement. The application is a shared Python interpreter; I understand that trusting it does not restrict access to an individual script.
I read the related Apple Developer Forums discussion, which explains that complete ACL introspection is not supported and that the stored trusted-application code-signing requirement is accessible through SPI rather than public API.
My narrower question is whether there is a supported verification operation that does not require exposing that requirement:
Given a SecTrustedApplicationRef obtained through SecACLCopyContents, can a public API establish that its stored caller-matching requirement is no broader than the intended application requirement?
Confirming that the intended application is accepted would establish only that it matches, not that additional application identities are excluded. I also don't want to assume that CFEqual against a newly created reference, matching paths, or matching SecTrustedApplicationCopyData results proves equivalent authorization. Apple's documentation describes the CopyData result as opaque.
If this comparison is unsupported, what documented provisioning or operating-system enforcement guarantees should an application rely on instead? Is controlled provisioning the intended boundary, or is a different supported Keychain design appropriate?
Most importantly, if verifying the exact trusted-application restriction isn't supported, what is Apple's recommended secure approach for allowing a local Python trading application to retrieve Keychain credentials without granting access to every script using the same Python interpreter?
A fake-only example using a disposable test Keychain and synthetic generic-password item has been prepared but has not been built or run because full Xcode was unavailable. This is an API-contract question; no runtime failure or ACL attack is claimed, and no assumption is made that published source exactly matches the installed framework.
Let’s focus this discussion on your other thread.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"