This document outlines security procedures and best practices for the TeachLink mobile application.
The TeachLink mobile app uses SSL pinning to ensure that it only communicates with trusted servers. This helps to prevent man-in-the-middle attacks.
To maintain a high level of security, the SSL pins should be rotated periodically. The following steps outline the process for rotating the certificate pins:
-
Generate a new key and certificate signing request (CSR).
openssl req -new -newkey rsa:2048 -nodes -keyout new.key -out new.csr
-
Get the new certificate signed by the Certificate Authority (CA).
-
Extract the SPKI hash from the new certificate.
openssl x509 -in new.crt -pubkey -noout | openssl pkey -pubin -outform der | openssl dgst -sha256 -binary | openssl enc -base64
-
Update
app.jsonwith the new pins.- The new pin will become the
primaryPin. - The old
primaryPinwill become thebackupPin.
- The new pin will become the
-
Deploy the new certificate to the server.
-
Deploy the updated app to the app stores.
- Primary Pin:
ro9iqKFUc1QlFywktB2QYqziDuEeV8NSFiHZhy75qi4= - Backup Pin:
C5+lpZ7tcV/weqBHvLr2K8k2y2cnq6/s3tT4G/cM9dY=