From 900764cb388a8709dff1f9c1d73c3fc96fcb43ec Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 12 Nov 2016 20:35:45 -0500 Subject: improve the comments for better docs --- config-mgmt-certbot.PKGBUILD | 81 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 66 insertions(+), 15 deletions(-) (limited to 'config-mgmt-certbot.PKGBUILD') diff --git a/config-mgmt-certbot.PKGBUILD b/config-mgmt-certbot.PKGBUILD index 7546242..4e06f72 100644 --- a/config-mgmt-certbot.PKGBUILD +++ b/config-mgmt-certbot.PKGBUILD @@ -3,6 +3,7 @@ pkgver=20161111.1 package() { preamble +# #### SSL # Use the [certbot][] ACME client to get certificates from # [Let's Encrypt][]. @@ -16,7 +17,29 @@ depends+=(certbot) # Alternative Names in a single certificate. This makes configuring # nginx easier. -# ## issuance, renewal, and installation +# ##### keys user and group + +# Files affected manually: +# +# * `/etc/passwd` +# * `/etc/shadow` +# * `/etc/group` +# * `/etc/gshadow` +# * `/etc/letsencrypt` +# * `/var/lib/letsencrypt` +# * `/var/log/letsencrypt` +# +# In order to run certbot as a non-root user, the keys user and group +# have been created: +# +# useradd --system --user-group --no-create-home --home-dir /etc/ssl --shell /usr/bin/nologin keys +# chown -R keys:keys /etc/letsencrypt /var/log/letsencrypt /var/lib/letsencrypt +# chmod 750 /etc/letsencrypt/archive /etc/letsencrypt/live +# +# The associated keys group allows users to read the (private) keys in +# /etc/letsencrypt/live. + +# ##### issuance, renewal, and installation # Unlike acmetool, certbot doesn't have an easy way of saying "please # add this domain as a Subject Alternative Name". You have to re-run @@ -98,10 +121,41 @@ UMask=0027 EOF add-unit etc/systemd/system/timers.target.wants/certbot-renew.timer -# Both `certbot-get` and `certbot-renew.serviceq prove ownership of +# Both `certbot-get` and `certbot-renew.service` prove ownership of # the domain via the `http-01` challenge. `/etc/nginx/nginx.conf` # includes `/etc/nginx/snippets/ssl.conf`, which has a `server{}` # block that handles ACME http-01 challenges. + +# Both `certbot-get` and `certbot-renew.service` have been written to +# run `sudo /etc/ssl/misc/certbot-hook` after certificates have been +# updated, and `sudo` has been configured to allow the keys user to do +# this without a password. Right now `certbot-hook` just runs +# `systemctl reload nginx.service`. +add-file -m755 etc/ssl/misc/certbot-hook <HTTPS redirector has had +# an exception added to it to have it respond to ACME http-01 +# challenges. +# +# [0]: https://mozilla.github.io/server-side-tls/ssl-config-generator/ add-file etc/nginx/snippets/ssl.conf <; EOF -# Both `certbot-get` and `certbot-renew.service` have been written to -# run `sudo /etc/ssl/misc/certbot-hook` after certificates have been -# updated, and `sudo` has been configured to allow the keys user to do -# this without a password. Right now `certbot-hook` just runs -# `systemctl reload nginx.service`. -add-file -m755 etc/ssl/misc/certbot-hook <