all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Chris Marusich <cmmarusich@gmail.com>
To: Julien Lepiller <julien@lepiller.eu>
Cc: guix-devel@gnu.org
Subject: Re: Renewing certificates with certbot
Date: Fri, 22 Mar 2019 01:00:18 -0700	[thread overview]
Message-ID: <87k1gr5ofh.fsf@gmail.com> (raw)
In-Reply-To: <d017a05fe71682cae352ca96feb51a53@lepiller.eu> (Julien Lepiller's message of "Fri, 22 Feb 2019 14:49:52 +0100")

[-- Attachment #1: Type: text/plain, Size: 1662 bytes --]

Hi Julien,

Sorry for the late reply.

Julien Lepiller <julien@lepiller.eu> writes:

> I use certificates from let's encrypt for my website and mail servers,
> and found that there was an issue with certificates generated by the
> certbot service in Guix: the generated private keys are world-readable
> (in a directory that cannot be accessed by anyone but root, so it's OK
> I guess). OpenSMTPD is not happy with that though, so I have to chmod
> the files every time. I came up with a variant of the deploy-hook
> that's presented in the manual, and I'd like to update the example
> with it. Here it is:
>
> ;; Find running nginx and reload its configuration (for certificates)
> (define %my-deploy-hook
>   (program-file
>    "my-deploy-hook"
>    #~(let* ((pid (call-with-input-file "/var/run/nginx/pid" read))
>             (cert-dir (getenv "RENEWED_LINEAGE"))
>             (privkey (string-append cert-dir "/privkey.pem")))
>        ;; certbot private keys are world-readable by default, and
> smtpd complains
>        ;; about that, refusing to start otherwise
>        (chmod privkey #o600)
>        (kill pid SIGHUP))))
>
> What do you think?

I think it would be harmless to include as an example.  Since nobody has
said anything in a few weeks, I'd say commit it!

As for certbot's behavior, do you know why it creates the private keys
world-readable in the first place?  That seems strange.  Can certbot
itself be fixed so it doesn't do that?  If not, can we update the
service definition to somehow do this automatically for people (e.g.,
provide an optional, included-by-default deploy hook)?

-- 
Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  parent reply	other threads:[~2019-03-22  8:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-22 13:49 Renewing certificates with certbot Julien Lepiller
2019-02-22 17:57 ` swedebugia
2019-03-06 13:42 ` Ludovic Courtès
2019-03-06 13:51   ` Julien Lepiller
2019-03-06 14:12     ` Giovanni Biscuolo
2019-03-06 14:19     ` ng0
2019-03-06 14:33       ` Julien Lepiller
2019-03-06 16:26         ` ng0
2019-03-22  8:00 ` Chris Marusich [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-03-22 10:55 Clément Lassieur
2019-03-23  1:08 ` Chris Marusich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k1gr5ofh.fsf@gmail.com \
    --to=cmmarusich@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=julien@lepiller.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.