Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Android Telemetry DigiCert Certificate Pinning #3888

Closed
bleege opened this issue Feb 10, 2016 · 4 comments
Closed

Android Telemetry DigiCert Certificate Pinning #3888

bleege opened this issue Feb 10, 2016 · 4 comments
Assignees
Labels
Android Mapbox Maps SDK for Android telemetry Integration with Mapbox Telemetry libraries

Comments

@bleege
Copy link
Contributor

bleege commented Feb 10, 2016

The initial Android Telemetry build out was able to integrate Certificate Pinning for Staging and Production as they both use Geotrust. However to provide for certificate revocation and fallback it also needs to add support for Prod's Digicert certificate.

Implementing this will require coordination with @ianshward. Will look to schedule ASAP.

/cc @camilleanne @mick

@bleege bleege added Android Mapbox Maps SDK for Android telemetry Integration with Mapbox Telemetry libraries labels Feb 10, 2016
@bleege bleege self-assigned this Feb 10, 2016
@bleege bleege added this to the android-v4.0.0 milestone Feb 10, 2016
@bleege
Copy link
Contributor Author

bleege commented Feb 25, 2016

OkHttp is in the process of moving it's pinning support from SHA1 to SHA256. The current version 3.1.2, which Mapbox is using, makes use of SHA1, while the next version 3.2.0 will support both SHA1 and SHA256. It seems wise to generate both SHA1 and SHA256 pins when the DigiCert certificate is setup though to provide flexibility in the future.

In the interim, I used the latest 3.2.0-SNAPSHOT to generate SHA256 pins for Staging and Prod for Geotrust certificates and put them in the development branch. Sadly, when I reverted to 3.1.2 the new SHA256 pins are not supported though. 😐

02-25 17:37:46.588 26861-27052/com.mapbox.mapboxsdk.testapp E/MapboxEventManager: FlushTheEventsTask borked: java.lang.IllegalArgumentException: pins must start with 'sha1/': sha256/kR9ysyN/lzBl/ecearDERV7qO7xqSN4jt6XuQjIVL0I=

@bleege
Copy link
Contributor Author

bleege commented Feb 26, 2016

Successfully generated and tested SHA1 and SHA256 pins for the DigiCert with @ianshward tonight. The next step will be to organize these in the dev branch so that they include the SHA1 for Staging, Geotrust, and Digicert. This will enable all 3 options for submitting Telemetry to Mapbox. Will comment out the SHA256 values as they won't be needed until the project upgrades to OkHttp 3.2.0 at the earliest.

@bleege
Copy link
Contributor Author

bleege commented Feb 26, 2016

I organized the pins to only use SHA1 for Staging, Prod Geotrust, and Prod Digicert for now as Mapbox is using OkHttp 3.1.2. I retested to make sure that Staging and Prod still worked (Geotrust) and they did.

I put the SHA256 pins into comments in the source code so that the project can switch to those when OkHttp 3.2.0 is released as SHA256 is the new preference for OkHttp going forward.

bleege added a commit that referenced this issue Feb 26, 2016
@bleege
Copy link
Contributor Author

bleege commented Feb 26, 2016

Rebased, Squashed, and Merged. ☑️

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android telemetry Integration with Mapbox Telemetry libraries
Projects
None yet
Development

No branches or pull requests

3 participants