Daily iOS
Security

Request signing

If you designed the protocol between your app and the server yourself, how would you let the server notice that the contents changed in transit? Assume you already use HTTPS.

How would an interviewer hear this answer? You'll see whether they'd move on, dig in, or say no, and which sentences would trip you up. Your score doesn't change.
See the short answer

Canonicalize the request body and the main headers, sign them with an HMAC (or a device private key), and send the signature in a header. The server recomputes it the same way and rejects a mismatch as tampering. HTTPS stops a man in the middle on the path but not the endpoints, a proxy or a modified app, and the signature covers that gap.

Share a question