optimizely / objective-c-sdk

Optimizely X Objective-C SDK for iOS and tvOS
Apache License 2.0
24 stars 24 forks source link

Certificate pinning implementation #424

Closed ghost closed 5 years ago

ghost commented 5 years ago

Summary

The "why", or other context. As part of our security policy we need to confirm the server trust for every network call that originates from our application to prevent man in the middle attacks or spying.

Test plan

Install a charles proxy on the same network on which you will be testing an app that uses the framework. Install a charles proxy root cert on the phone or simulator Begin the charles proxy Load up an app that is using the SDK and observe that the connections fail when Charles proxy is inspecting the traffic. Remove or disable the root proxy from the test phone and rerun. Observe that the traffic is encrypted and the connection passes.

Issues

As per the meeting between Earnin and Optimizely, we've agreed that instead of accepting our the incoming code changes, Optimizely will update OptimizelySDKCore.podspec with a bundle resources specification such as

s.resource_bundles = {
        'OptimizelySDKCoreiOS' => ['OptimizelySDKCore/Resources/*.cer']
      }

In addition Optimizely will add the added certificates to the Copy Bundle Phase of OptimizelySDKCoreiOS target in Xcode.

Thanks, Eli Hini