Post

Replies

Boosts

Views

Activity

macOS XPC: Authenticating the Exact Supervisor-Launched Child Process
I am developing a private, locally operated, single-user macOS application on Apple silicon. I need to establish a secure IPC boundary between a supervisor and a specific child process launched using posix_spawn. The requirement is to verify that a received XPC message originated from the exact child process instance launched by the supervisor, rather than another instance of the same signed executable. I have investigated the following public APIs: xpc_dictionary_get_remote_connection xpc_connection_get_pid xpc_connection_set_peer_code_signing_requirement xpc_peer_requirement_match_received_message SecCodeCreateWithXPCMessage Code-signing verification appears suitable for establishing executable identity. However, it does not necessarily distinguish two running instances of the same signed executable. PID comparison alone is also insufficient because of potential PID reuse and stale connection metadata. Additionally, the following interfaces were unavailable when compiling against my installed macOS SDK: xpc_connection_get_audit_token struct proc_uniqidentifierinfo PROC_PIDUNIQIDENTIFIERINFO My questions are: Is there a supported public macOS API for obtaining a kernel-authenticated, instance-specific identity for the sender of an actual XPC message? Can the supervisor independently obtain an equivalent trusted identity for its newly spawned child process and securely compare the two? Is there a documented process-lifetime guarantee or IPC architecture that can provide equivalent security without relying solely on PID matching, executable paths, or self-reported identifiers? If direct process-instance comparison is unsupported, what alternative architecture does Apple recommend? The objective is to authenticate both the signed executable identity and the specific authorized process instance responsible for the received message. I am specifically interested in documented public APIs and supported security guarantees, rather than private APIs or undocumented implementation behavior. Any guidance concerning the appropriate API sequence, required entitlements, or relevant documentation would be appreciated. Thank you.
0
0
72
3d
macOS XPC: Authenticating the Exact Supervisor-Launched Child Process
I am developing a private, locally operated, single-user macOS application on Apple silicon. I need to establish a secure IPC boundary between a supervisor and a specific child process launched using posix_spawn. The requirement is to verify that a received XPC message originated from the exact child process instance launched by the supervisor, rather than another instance of the same signed executable. I have investigated the following public APIs: xpc_dictionary_get_remote_connection xpc_connection_get_pid xpc_connection_set_peer_code_signing_requirement xpc_peer_requirement_match_received_message SecCodeCreateWithXPCMessage Code-signing verification appears suitable for establishing executable identity. However, it does not necessarily distinguish two running instances of the same signed executable. PID comparison alone is also insufficient because of potential PID reuse and stale connection metadata. Additionally, the following interfaces were unavailable when compiling against my installed macOS SDK: xpc_connection_get_audit_token struct proc_uniqidentifierinfo PROC_PIDUNIQIDENTIFIERINFO My questions are: Is there a supported public macOS API for obtaining a kernel-authenticated, instance-specific identity for the sender of an actual XPC message? Can the supervisor independently obtain an equivalent trusted identity for its newly spawned child process and securely compare the two? Is there a documented process-lifetime guarantee or IPC architecture that can provide equivalent security without relying solely on PID matching, executable paths, or self-reported identifiers? If direct process-instance comparison is unsupported, what alternative architecture does Apple recommend? The objective is to authenticate both the signed executable identity and the specific authorized process instance responsible for the received message. I am specifically interested in documented public APIs and supported security guarantees, rather than private APIs or undocumented implementation behavior. Any guidance concerning the appropriate API sequence, required entitlements, or relevant documentation would be appreciated. Thank you.
Replies
0
Boosts
0
Views
72
Activity
3d