#892 Simple command for importing certificates

Reporter MattJ
Owner Zash
Created
Updated
Stars ★★ (3)
Tags
  • Priority-Medium
  • Status-Fixed
  • Milestone-0.10
  • Type-Enhancement
  1. MattJ on

    With CAs such as LetsEncrypt beginning to support automated certificate issuance, it would be very helpful if Prosody provided a simple way to import a set of certificates in an automatic fashion. Best security practice dictates that certificates and keys have minimal permissions, and on many systems this means that they are readable only by root. In particular many LetsEncrypt clients for example will make certificates and keys readable by root only. This is a problem for Prosody, as also due to security considerations, we never run as root. A typical solution to this issue is to copy the certificates/keys somewhere that Prosody can access, and ensure they are readable by (only) Prosody. Although this solution is not too hard to script, it would be much simpler for users if we provided a command out of the box for importing certificates from some location (e.g. /etc/letsencrypt/live) and putting them somewhere (e.g. /etc/prosody/certs) in a secure way, and such that Prosody will automatically pick them up with no configuration changes required. As a bonus, the command should reload Prosody and Prosody should re-read the certificates. Finally, we need to document this command as the now recommended way to feed certificates to Prosody, and drop the old 'ssl' option from the default configuration file.

  2. Zash on

    Changes
    • owner Zash
    • tags Status-Started
  3. Zash on

    Done in https://hg.prosody.im/0.10/rev/3cbb311f8468 May need some additional polish but it should do the job.

    Changes
    • tags Status-Fixed Milestone-0.10
  4. Zash on

    And the docs need to say `prosodyctl --root cert import example.com /etc/letsencrypt/live` somewhere.

New comment

Not published. Used for spam prevention and optional update notifications.