Skip to content

Deployment

Fysikmotorn edited this page Dec 26, 2024 · 3 revisions

Mail

In order to send mail, a token must be generated by the following steps.

  1. Acquire the file gmail_secret.json by either method:
    • Go to Google Drive $\to$ F.dev: Bittan - Känsligt $\to$ Mail $\to$ gmail_secret.json and download this file. If this file is not available or is not working, a new one should be made and uploaded here.
    • Go to Google Cloud console. Login according to the details in Google Drive $\to$ F.dev: Bittan - Känsligt $\to$ Mail $\to$ biljettmail-uppgifter.txt. Open the project bittan. Go to APIs and Services $\to$ Credentials. Download a Client Secret and rename the file to gmail_secret.json.
  2. This step probably needs to be done in a local copy of the bittan repo. Place gmail_secret.json in /backend/bittan/. Navigate to /backend/bittan/scripts/ and run manual_create_token.py. This generates a file gmail_token.json in /backend/bittan/.
  3. Upload the file gmail_token.json to the production container at /backend/bittan/gmail_token.json.

Certificates

You have to (using your webserver of choice, e.g nginx) check the client certificates of all requests going to <base_url>/swish/callback. Unverified requests must not reach this endpoint since requests that reach the django application are assumed to be verified and are not checked in the django app.

Clone this wiki locally