Background
I have an old Play Framework webapp that serves assets from two CDNs (siteassets
and courseassets
), which are implemented with AWS CloudFront. Pound runs on the same VM as the webapp, and merely acts as an SSL endpoint because the old version Play Framework used does not handle SSL. Pound binds to port 80 and 443. The Play webapp binds to port 9000.
Previously I used a Symantec SSL wildcard certificate for the CDN assets and the webapp. Now that Symantec SSL certs have only a few days left before they are no longer valid I have decided to use AWS Certificate Manager to provision single-domain SSL certificates for the CDNs, and to use Letsencrypt to provide a single-domain SSL certificate for the webapp. The Letsencrypt certificates only last 90 days, so they need to be automatically refreshed.
Pound wants SSL certificates in PEM format, but Letsencrypt does not seem to have an convenient way of providing a PEM format. Letsencrypt does not have any special provision for Play Framework in the way that it does for Apache httpd, Tomcat or other well-known frameworks.
I do not want to take the webapp offline in order to update the SSL certificate used by Pound.
Current Pound Configuration
Following is my current /etc/pound/pound.cfg
for Pound version 2.7f-0ubuntu1
. This configuration is a few years old and will probably need to be updated, and Pound should probably be updated too.
# Global options
User "root"
Group "root"
# Logging: (goes to syslog by default)
# 0 no logging
# 1 normal
# 2 extended
# 3 Apache-style (common log format)
# 4 (same as 3 but without the virtual host information)
# 5 (same as 4 but with information about the Service and BackEnd used)
LogLevel 5
# Check backend every X secs:
Alive 30
# Use hardware-accelleration card supported by openssl(1):
#SSLEngine "<hw>"
# poundctl control socket
Control "/var/run/poundctl.socket"
# Redirect all http requests on port 80 to https on port 443
# The Play Framework webapp never sees these redirected requests because Pound handles them
ListenHTTP
Address 0.0.0.0
Port 80
Err500 "/usr/local/etc/pound_error_500"
Err503 "/usr/local/etc/pound_error_500"
Service
Redirect 301 "https://www.scalacourses.com"
End
End
# Redirect all requests on port 443 to the Play Framework webapp on port 9443
ListenHTTPS
Address 0.0.0.0
Port 443
Err500 "/usr/local/etc/pound_error_500"
Err503 "/usr/local/etc/pound_error_500"
Cert "/var/work/training/cadenza/conf/ssl/scalacourses.com.pound.pem"
Disable SSLv3
Ciphers "EECDH+ECDSA+AESGCM:EECDH+ECDSA+SHA384:EECDH+ECDSA+SHA256:ECDH+AESGCM:ECDH+AES256:ECDH+AES128:ECDH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!eNULL:!LOW:!aNULL:!MD5:!DSS"
SSLAllowClientRenegotiation 0
SSLHonorCipherOrder 1
HeadRemove "X-Forwarded-Proto"
HeadRemove "x-forwarded-proto"
AddHeader "x-forwarded-proto: https"
Service
BackEnd
#HTTPS
Address 127.0.0.1
Port 9000
End
End
End
Questions
The certbot ACME client version 0.17.0 was installed via:
sudo apt install certbot
I see that certbot version 0.21.0 is available. Should I use this newer version instead of the default provided by Ubuntu 17.10?
- Is there a reasonable version of Pound available in a Debian PPA? Previously I had to build Pound myself, but I would prefer to use a prebuilt version. https://launchpad.net/ubuntu/+source/pound has version 2.7-1.3 ... is this the best stable version?
What changes are required to the Pound configuration in
/etc/pound/pound.cfg
? Clearly this line will need to be updated:Cert "/var/work/training/cadenza/conf/ssl/scalacourses.com.pound.pem"
This line may need to be updated when Pound is updated:
Ciphers "EECDH+ECDSA+AESGCM:EECDH+ECDSA+SHA384:EECDH+ECDSA+SHA256:ECDH+AESGCM:ECDH+AES256:ECDH+AES128:ECDH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!eNULL:!LOW:!aNULL:!MD5:!DSS"
What other lines might need to be added, deleted or modified? I know Pound should not run as
root
, but that can be dealt with separately.Need a script to initially provision the Letsencrypt SSL certificate for Pound. Seems that the certbot program used by Letsencrypt wants to bind to port 80, but Pound binds to this port, and I do not want to take the webapp down in order to upgrade the SSL certificate. Is there a way to run it on the same VM as Pound, or should I run it on another VM and copy over the generated certificate in PEM format when ready?
Need a script that can be invoked via cron every 45 days in order to refresh the SSL certificates.