How to disable the "Do you want the application XY to accept incoming network connections?"

I am developing a piece of software with OpenMPI and every time I recompile the program, I am prompted to click Allow/Deny the connections in N pop-ups (where N is the number of spawned processors by MPI).

Is there any way to completely disable the pop-ups? When I allow or deny the access for one particular binary, the pop-ups do not show in successive runs. However, after recompiling a new one, the issue persists.

Turning off the firewall does not help, neither does allowing/blocking incoming connections in the Firewall settings (Settings -> Firewall -> Options).

I am open to any hacky solution or a workaround as this is really annoying and deteriorates my workflow.

Is there any way to completely disable the pop-ups?

Yes. Disable the firewall in System Settings > Network > Firewall. IMO the firewall doesn’t offer a lot of value because modern threats all centre around outgoing connections, not incoming ones (although I recognise that other folks disagree).

If you can’t do that then you need to change the way that you sign your code. The macOS firewall identifies a program via its designated requirement (DR). This is a code signing construct that allows the system to know that version N+1 of the program is the ‘same code’ as version N. You can learn more about it in TN3127 Inside Code Signing: Requirements.

It sounds like you’re currently not signing your code, or signing it ad hoc. That doesn’t create a stable DR, so the firewall thinks that each build of your code is a completely new thing. To fix this, sign your code with your Apple Development signing identity. Once you do that, the approval to accept incoming connections will stick.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

How to disable the "Do you want the application XY to accept incoming network connections?"
 
 
Q