Hi Dan, all,
In the end, setting up SSL was quite straight forward. I just put the certificates in /etc/nginx/ssl, added the snippet below to /etc/nginx/sites-available/atom and reloaded the nginx config.
listen 443 ssl;
ssl_certificate /etc/nginx/ssl/atom.york.ac.uk.chained.crt;
ssl_certificate_key /etc/nginx/ssl/atom.york.ac.uk.pem;
However, I've noticed an oddity with the SSL/Login redirection functionality that I can reproduce on both our soon-to-be-live server (with proper certificate) and our test server (with self-signed certificate).
Expected behaviour
2/ Log in via the pop-up menu at the right-hand side.
3/ Because 'Require SSL...' is enabled, I am redirected to the full page https form to re-input my email address and password.
4/ I enter this and click the Log in button.
5/ I am redirected to the referring URL from step 1. The UI shows signs that I am logged in i.e. button at top-right shows my user name.
Actual behaviour
2/ Log in via the pop-up menu at the right-hand side.
3/ Because 'Require SSL...' is enabled, I am redirected to the full page https form to re-input my email address and password.
4/ I enter this and click the Log in button.
5/ I am redirected to the referring URL from step 1. The UI shows signs that I am NOT logged in i.e. button at top-right still says 'Log in'.
Interestingly, if at step one I visit
https://atom.york.ac.uk instead of the plain http URL, the problem goes away i.e. I am logged in.
I have also noticed the referring URL is stored in the login submission form as a hidden input field value. If I change this value to begin with https or simply remove the protocol + the colon (so it's "protocol-less") in browser devtools before submitting the form, then submit the form, I am correctly logged in.
Here's the relevant HTML element:
I wonder if this is a bug and the value ought to be, in the above example, "//
atomedge.york.ac.uk/" , so that it takes the same protocol as the form page? Is anyone else using SSL and if so have they observed this behaviour? Of course, if we turned off plain http then the problem would go away, but I'm unsure if there might be issues with this (until now, we've used solely http)
thanks,
Jim