Certificate-based authentication when using MobileIron MDM on iOS

Recently I was to implement certificate-based authentication for enterprise app. When I read documentation for integrating AppConnect SDK (MobileIron’s mobile SDK for wrapping an app), there was mentioned that you do not have to do anything to adopt certificate based authentication to your enterprise services. AppConnect SDK swizzles URLSession class and intercepts all requests from the app.

So when I’ve done nothing, nothing worked �🏻‍♂️ I was struggling for couple of days to no avail. There is almost nothing on the internet on this topic, so when I succeeded to do this, I decided to write this small article about this.

The solution is very simple. You really should not do anything, but that only applies to the code.

So there is the solution:

  1. Create AppConnect.plist file inside your project and add following content (if you do not have it):

2. Ask your MobileIron Core admin to add these two key-value pairs to your app APPCONFIG setting type:

MI_AC_CLIENT_CERT_#N: certificate to use when authentication challenge is present

MI_AC_CLIENT_CERT_#N_RULE: pattern for urls that must be intercepted (for example * for all requests)

#N — number of your choice. It is used to match rule and corresponding certificate.

That is all! The next challenge for me started when I realised that it is still does not work. You can read about this in my article:

https://medium.com/@isaaliev12/do-not-lose-your-cookies-ios-6dfb34082e6f

Hope I helped someone!

iOS-Developer from Russia

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store