Post

Replies

Boosts

Views

Activity

Launching a signed AppKit app from a Python supervisor while preserving instance ownership and bounded cleanup
I'm looking for a supported way to launch a signed AppKit application for user interaction from a local Python supervisor, while retaining reliable supervision of the exact launched instance. Environment Apple M3 MacBook Air, macOS 14.5, build 23F79. arm64 app built with Command Line Tools clang and the macOS 14.5 SDK, targeting macOS 14.0. AppKit/Foundation with embedded CPython 3.12. Apple Development signing, hardened runtime and strict signature checks passed. Current launch and activation sequence The supervisor directly launches the bundle executable with Popen: a fixed argument, empty environment, new process session, disconnected stdin, and an anonymous stdout pipe carrying fixed, nonsecret startup markers. There is no LaunchServices foreground handoff. On its main thread, the app initializes NSApplication, confirms Regular activation policy, calls finishLaunching and activateIgnoringOtherApps:YES, then waits for isActive. Event-retrieval waits are capped at 20 ms; event dispatch itself may take longer. Existing timeout supervision remains active. Our activation guard is two seconds from the readiness routine's start, subject to the remaining native timer. A separate overall test budget is 300 seconds from operator readiness, before preflight. Observed result The latest test exited with code 1 after approximately 2.57 seconds. The validated markers were: absence.begin → absence.absent → fields.begin → ui.begin → app.shared.begin → app.shared.ready → policy.before → policy.already_regular → policy.postcondition → launch.finish.begin → launch.finish.ready → activation.requested → activation.wait.begin → stop.activation.timeoutThe final recorded state was: main=1 app=1 active=0 policy=0 window=0 visible=-1 key=-1The app stopped before constructing the dialog. Adding event processing did not resolve activation. We have not established why activation failed or which events were delivered. The two-second deadline is our guard, not an asserted macOS activation guarantee. Questions What supported launch and activation approach should this supervisor use for a foreground, interactive AppKit app? Can this direct-executable design be corrected narrowly, or should launching move to LaunchServices with a different communication and supervision arrangement? With the recommended approach, how should the supervisor identify the exact launched instance, receive startup status, enforce bounded termination, and establish that the process has exited before cleanup? We reviewed a simple foreground-launch substitution, but it did not preserve our existing marker pipe and authoritative exit/reap evidence. That is a limitation of our proposed adaptation, not a claim that Apple's APIs cannot support these outcomes. The essential requirements are exact-instance identification, nonsecret status reporting, bounded termination and verified cleanup. An anonymous pipe and direct-child waiting are current implementation choices, not requirements in themselves.
6
0
157
5d
Verifying a stored file-based Keychain trusted-application requirement
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.
1
0
98
1w
Verifying a stored file-based Keychain trusted-application requirement
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.
1
0
94
1w
Launching a signed AppKit app from a Python supervisor while preserving instance ownership and bounded cleanup
I'm looking for a supported way to launch a signed AppKit application for user interaction from a local Python supervisor, while retaining reliable supervision of the exact launched instance. Environment Apple M3 MacBook Air, macOS 14.5, build 23F79. arm64 app built with Command Line Tools clang and the macOS 14.5 SDK, targeting macOS 14.0. AppKit/Foundation with embedded CPython 3.12. Apple Development signing, hardened runtime and strict signature checks passed. Current launch and activation sequence The supervisor directly launches the bundle executable with Popen: a fixed argument, empty environment, new process session, disconnected stdin, and an anonymous stdout pipe carrying fixed, nonsecret startup markers. There is no LaunchServices foreground handoff. On its main thread, the app initializes NSApplication, confirms Regular activation policy, calls finishLaunching and activateIgnoringOtherApps:YES, then waits for isActive. Event-retrieval waits are capped at 20 ms; event dispatch itself may take longer. Existing timeout supervision remains active. Our activation guard is two seconds from the readiness routine's start, subject to the remaining native timer. A separate overall test budget is 300 seconds from operator readiness, before preflight. Observed result The latest test exited with code 1 after approximately 2.57 seconds. The validated markers were: absence.begin → absence.absent → fields.begin → ui.begin → app.shared.begin → app.shared.ready → policy.before → policy.already_regular → policy.postcondition → launch.finish.begin → launch.finish.ready → activation.requested → activation.wait.begin → stop.activation.timeoutThe final recorded state was: main=1 app=1 active=0 policy=0 window=0 visible=-1 key=-1The app stopped before constructing the dialog. Adding event processing did not resolve activation. We have not established why activation failed or which events were delivered. The two-second deadline is our guard, not an asserted macOS activation guarantee. Questions What supported launch and activation approach should this supervisor use for a foreground, interactive AppKit app? Can this direct-executable design be corrected narrowly, or should launching move to LaunchServices with a different communication and supervision arrangement? With the recommended approach, how should the supervisor identify the exact launched instance, receive startup status, enforce bounded termination, and establish that the process has exited before cleanup? We reviewed a simple foreground-launch substitution, but it did not preserve our existing marker pipe and authoritative exit/reap evidence. That is a limitation of our proposed adaptation, not a claim that Apple's APIs cannot support these outcomes. The essential requirements are exact-instance identification, nonsecret status reporting, bounded termination and verified cleanup. An anonymous pipe and direct-child waiting are current implementation choices, not requirements in themselves.
Replies
6
Boosts
0
Views
157
Activity
5d
Verifying a stored file-based Keychain trusted-application requirement
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.
Replies
1
Boosts
0
Views
98
Activity
1w
Verifying a stored file-based Keychain trusted-application requirement
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.
Replies
1
Boosts
0
Views
94
Activity
1w