DMS services exposed to external users in server mode must be exposed over HTTPS and have SSL certificates installed. Because traffic is exposed over a single port by the DMS Gateway, only one certificate is required.
DMS currently requires and uses Certbot for certificate generation (this is a free and open source resource).
Follow these steps to install Certbot and setup your certificate:
<software>
on <system>
section, select the following:Input | Selection |
---|---|
Software | Set to None of the above |
System | From the drop-down, select the operating system your server is running |
In the example below we are using a VM running Ubuntu 20.04:
sudo
on your server (you are able to run operations or programs by assuming the security privileges as another user, e.g. as an administrator)When you run Certbot in standalone mode, you will be taken through a series of prompts before the certificate can be installed:
ubuntu@test-dms:~$ sudo certbot certonly --standaloneSaving debug log to /var/log/letsencrypt/letsencrypt.logPlugins selected: Authenticator standalone, Installer NoneEnter email address (used for urgent renewal and security notices)(Enter 'c' to cancel): firstname.lastname@oicr.on.ca
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Please read the Terms of Service athttps://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You mustagree in order to register with the ACME server. Do you agree?- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -(Y)es/(N)o: y
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Would you be willing, once your first certificate is successfully issued, toshare your email address with the Electronic Frontier Foundation, a foundingpartner of the Let's Encrypt project and the non-profit organization thatdevelops Certbot? We'd like to send you email about our work encrypting the web,EFF news, campaigns, and ways to support digital freedom.- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -(Y)es/(N)o: n
Account registered.Please enter in your domain name(s) (comma and/or space separated) (Enter 'c'to cancel): dms.test.cancercollaboratory.org
Requesting a certificate for dms.brandon.cancercollaboratory.orgPerforming the following challenges:http-01 challenge for dms.brandon.cancercollaboratory.orgWaiting for verification...Cleaning up challengesIMPORTANT NOTES:- Congratulations! Your certificate and chain have been saved at:/etc/letsencrypt/live/dms.test.cancercollaboratory.org/fullchain.pemYour key file has been saved at:/etc/letsencrypt/live/dms.test.cancercollaboratory.org/privkey.pemYour certificate will expire on 2021-06-16. To obtain a new ortweaked version of this certificate in the future, simply runcertbot again. To non-interactively renew *all* of yourcertificates, run "certbot renew"- If you like Certbot, please consider supporting our work by:Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donateDonating to EFF: https://eff.org/donate-le
In the example above:
certificate chain = /etc/letsencrypt/live/dms.test.cancercollaboratory.org/fullchain.pem
certificate keyfile = /etc/letsencrypt/live/dms.test.cancercollaboratory.org/privkey.pem
After generating and installing your certificate, you can optionally test Certbot's automatic certificate renewal. The Certbot pacakges come wiht a cron
job or systemd
timer that renews your certificate automatically before they expire. To test certificate renewal:
ubuntu@test-dms:~$ sudo certbot renew --dry-runSaving debug log to /var/log/letsencrypt/letsencrypt.log- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Processing /etc/letsencrypt/renewal/dms.test.cancercollaboratory.org.conf- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Cert not due for renewal, but simulating renewal for dry runPlugins selected: Authenticator standalone, Installer NoneSimulating renewal of an existing certificate for dms.brandon.cancercollaboratory.orgPerforming the following challenges:http-01 challenge for dms.brandon.cancercollaboratory.orgWaiting for verification...Cleaning up challenges- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -new certificate deployed without reload, fullchain is/etc/letsencrypt/live/dms.test.cancercollaboratory.org/fullchain.pem- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Congratulations, all simulated renewals succeeded:/etc/letsencrypt/live/dms.test.cancercollaboratory.org/fullchain.pem (success)- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If the dry run test is successful, the script will indicate so, per the example above.
For future reference, the command to renew certbot is installed in one of the following locations:
/etc/crontab/
/etc/cron.*/*
systemctl list-timers
NOTE: It is the DMS administrator's responsibility to ensure certificate renewal will trigger and at the desired interval. Although Certbot sets the renewal process up for your automatically, the administrator just still check and ensure it runs on time, and make any adjustments as required. Renewal should occur no later than every 90 days. If assistance is required, please reach out to Certbot support.