Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Add support for HTTPS. #23
Conversation
shasderias
commented
Aug 19, 2016
|
Tested this. Worked as expected. OOB experience was very positive. FWIW, prefer the position you have taken (i.e. HTTPS only, self-signed cert by default). HTTPS with a warning would still be preferable to bare HTTP. Let me know if you want any specific feedback. |
I really appreciate your testing this out, thank you!
If this was as far as we were going, I'd agree with you. The process of enabling HTTPS is too hard right now not to make it the default. However, @jospoortvliet, @oparoz and I met yesterday about this, and discussed it in terms of longer-term plans:
Also, the Nextcloud snap is already installed by plenty of people and they'll automatically get this update. We don't want them to all of a sudden start getting HTTPS warnings. What if they don't even have port 443 open in their firewall or router? All of a sudden this snap is useless to them without some manual work. All of these things lead to our wanting to change this PR slightly:
|
kyrofa
added this to the 9.0.53snap2 milestone
Aug 19, 2016
|
@oparoz @jospoortvliet alright, this works the way I think we want it to after our meeting. I've updated the PR description to reflect. Please review when you're able. |
oparoz
reviewed
Aug 21, 2016
| + nextcloud: | ||
| + plugin: copy | ||
| + source: https://github.com/kyrofa/nextcloud.git | ||
| + source-tag: 9.0.50 |
kyrofa
Aug 21, 2016
•
Member
|
Hi, I'd love to try this out, but I'm on a 32-bit system. If you still need people to test and are willing to make an i686 package then I'll have a go... |
kyrofa
changed the title from
Move to HTTPS-only.
to
Add support for HTTPS.
Aug 22, 2016
Thanks for chiming in @thomascobb. I've now uploaded a build of this PR to all architectures on the beta channel, so please give it a shot! |
kyrofa
merged commit 9ef63b8
into
nextcloud:develop
Aug 23, 2016
kyrofa
deleted the
kyrofa:feature/6/https
branch
Aug 23, 2016
|
Thanks, I'll give a go at the weekend |
|
Cool, I ran nextcloud.enable-https -t and I now have https working as expected. However, I get T (If trust issues are ignored: A) rather than A+ on SSL labs. Is that to be expected? |
Yes, this is expected. the T is due to the fact that your certificate is not signed by a trusted third party (it's signed by Let's Encrypt's staging server, since you used the |
kyrofa commentedAug 17, 2016
•
Edited 1 time
-
kyrofa
Aug 20, 2016
This PR resolves #6 by accomplishing the following:
enable-httpscommand for either generating a self-signed certificate or obtaining one from Let's Encrypt. If used, the command changes the snap to HTTPS-only.disable-httpscommand to revert back to HTTP-only.Please test this version of the snap with the following (amd64 only, please let me know if you need another arch):
The initial experience should be the same as it currently is: HTTP only. Now let's enable HTTPS.
$ /snap/bin/nextcloud.enable-https -h Usage: /snap/nextcloud/x1/bin/enable-https [-h -t -d -s] -t: Obtain a test certificate. This is a valid Let's Encrypt certificate, but is not signed by a recognized CA, so browsers won't accept it. -d: Dry run: don't actually obtain/install certificates from Let's Encrypt, but make sure it's possible. -s: Generate and use a self-signed certificate. This is easier to setup than Let's Encrypt certificates, but will cause warnings in browsers.Let's start with a self-signed certificate, since it requires no setup:
You should see that HTTP now redirects to HTTPS:
Also note that HSTS is not enabled (since the certificate is self-signed):
Alright, disable HTTPS:
Note that it's now HTTP-only:
Now let's obtain a certificate from Let's Encrypt:
HTTP should again be redirecting to HTTPS, and HSTS should be enabled:
As a result, this snap should now obtain an A+ rating on SSLLabs. Note that the certificate will automatically be updated for you.