Hi, we have an iOS application that runs a NEAppProxyProvider network extension. The configuration for the extension is delivered by MDM and we've noticed that some MDMs are beginning to force end users to select certificate based authentication as the auth type for the per-app VPN payload. This itself causes no problems, but when a certificate to use for the authentication is also provided in the profile, our extension fails to start. Our application does not use the credentials from the profile, certificate based or otherwise, so we aren't doing anything unusual with them either.
We thought the problem might be caused because we lacked the com.apple.managed.vpn.shared entitlement that would be needed to access the certificate once it was on device (even though we never actually try to access it), but that did not fix the issue.
We have also confirmed that this happens regardless of MDM used to configure the profile.
Here are the relevant logs we are seeing that show the extension never starts:
neagent: NEAgentSession: failed to create the delegate
nesessionmanager:<application>[313]: Tearing down XPC connection due to setup error: Error Domain=NEAgentErrorDomain Code=2 "(null)"
<application>: Last disconnect error for <application> changed from "none" to "The VPN app used by the VPN configuration is not installed"
STEPS TO REPRODUCE
- Create an application that establishes a basic per-app VPN (just a loopback works) using the network extension
- Using an MDM, create and deploy a per-app VPN profile with certificate based authentication (include a certificate as well) that uses the test application as a plugin.
- Using the MDM, assign another application to the per-app VPN.
- Try to connect to the internet using the assigned application, it should fail to connect because the system can't start the extension.
For reference it appears that this issue is similar to ours: https://forums.developer.apple.com/forums/thread/746879
I've tried all the suggestions on that page, including adding a 'first-light' log and that is never seen. There are also no additional clues when adding the VPN debug profile to the device.
Thanks!