The incident: nothing was deployed, but overnight every request from the mobile app started failing. The website works. The API works from curl. Only the app is broken, for every user, and the backend team sees no errors because the requests never arrive.
Then someone remembers the app pins the server's certificate, and the certificate renewed last night.
Pinning means the app accepts only specific keys for your server, on top of normal certificate validation. It protects against a mis-issued or locally installed certificate. It also means any change to those keys on the server breaks every installed copy of the app until users update. Here's how to pin without that risk, or decide not to pin.
What's actually pinned
There are three common choices, and they fail differently:
The leaf certificate (the whole cert): breaks at every renewal. Avoid.
The leaf's public key (SPKI hash) : survives renewal only if the new certificate reuses the same key.…