GithubHelp home page GithubHelp logo

wikisuite / app-lets-encrypt Goto Github PK

View Code? Open in Web Editor NEW
7.0 9.0 2.0 60 KB

Let's Encrypt app for ClearOS (Free SSL certificates). Repo moved to https://gitlab.com/clearos/vendors/wikisuite/app-lets-encrypt/

Home Page: http://wikisuite.org/How-to-install-Let-s-Encrypt-SSL-certificates-on-ClearOS

PHP 95.21% Shell 1.14% JavaScript 3.65%
letsencrypt clearos

app-lets-encrypt's People

Contributors

benoitg avatar pcbaldwin avatar polynamaude avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

benoitg mhwh-dev

app-lets-encrypt's Issues

Feature Request: add option to select the log retention

By default, certbot keeps 1000 log files. At one a day this is nearly 3 years of daily logs. In certbot there is a configurable option, --max-log-backups, which can be used to specify how many logs to keep. Can this be exposed in the app-lets-encrypt interface, or as a halfway house, have a file like /etc/sysconfig/certbot and have a commented out OPTIONS="" line which can be hand edited with the options required (e.g. "max-log-backups 200") and have this file read as part of the cron job//usr/clearos/apps/lets_encrypt/deploy/renew where you could add:

if [ -f /etc/sysconfig/certbot ];then
. /etc/sysconfig/certbot
fi

and change the line:

RESULT=certbot renew --preferred-challenges http-01 --renew-hook "/sbin/trigger lets_encrypt" >/var/clearos/lets_encrypt/renew.log 2>&1

to

RESULT=certbot renew --preferred-challenges http-01 $OPTIONS --renew-hook "/sbin/trigger lets_encrypt" >/var/clearos/lets_encrypt/renew.log 2>&1

in the style of the old init functions

Improve user experience when in standalone mode

Let's Encrypt needs to connect back to the ClearOS machine on port 80 in order to run the verification process. On a ClearOS machine running as a gateway or on the public Internet, that's not a problem. However, many ClearOS systems are deployed as a standalone server on a local network. Let's Encrypt will not work without a port forwarding rule enabled. Gotcha: the same port forwarding rule needs to be enabled on renewals!

Before attempting to create a new Let's Encrypt certificate, check for standalone mode and/or connectivity problems.

Add firewall hooks for provisioning

Certbot will fail to provision a new certificate if HTTPS/port 443 is blocked. The provisioning process should temporarily open (and then close) this port if required.

Can't install on a new (latest) version of clearOS

Hi there!

I'm trying to install a couple of WikiSuite components including the lets-encrypt one but I keep having the following error:

Error: Package: 1:app-certificate-manager-2.4.20-1.v7.noarch (clearos-verified)
           Requires: app-certificate-manager-core = 1:2.4.20-1.v7
           Installed: 1:app-certificate-manager-core-2.4.21-1.v7.noarch (@clearos-updates)
               app-certificate-manager-core = 1:2.4.21-1.v7
           Available: 1:app-certificate-manager-core-2.4.5-1.v7.noarch (clearos)
               app-certificate-manager-core = 1:2.4.5-1.v7
           Available: 1:app-certificate-manager-core-2.4.20-1.v7.noarch (clearos-verified)
               app-certificate-manager-core = 1:2.4.20-1.v7

Seems there's a compatibility issue?

Remove dependency on Apache

The current implementation of the ClearOS Let's Encrypt app makes use of the Apache web server. That's the primary use case for the Let's Encrypt today, but there are other use cases where this dependency is not needed:

  • Webconfig only
  • Openfire
  • SMTP/IMAP (SSL integration is on the roadmap)

Note: only the Web Server API is pulled in as a dependency (i.e. app-web-server-core), not the full Web Server UI in webconfig. Regardless, there's no need to pull in all the extra Apache overhead if it's not needed.

Requesting certificate takes for ever

Adding a certificate through the app (ver. 1.0.7-1 on ClearOS 7.4) does not seem to work. It gives this message: Requesting certificate... and keep spinning for ever!

There is a note in the installation page says:

If it doesn't take effect right away,
just use another browser (ex.: Firefox instead of Chrome)

I switched to Firefox and still the same problem, no certificate was generated.

Thank you.

Can’t do anything after deleting a let’s encrypt certificate

On a ClearOs 7 Let’s encrypt was installed and running.

I un-assigned a certificate from a domain and deleted the certificate.
Since I locked in error loop when I try to access Let’s Encrypt certificate but also when I’m trying to access Web Server => Web Site => any individual.

I got a screen with:

Ooops!
Certificate not found.

Nothing else I can do.

I un-install, restarted and flushed any let’s encrypt file I could found and get access back.
As soon as I install back Let’s Encrypt App and create one certificate (no matter the domain) the error is back.

Let's Encrypt app fails when creating certificate for multiple domains on one certificate

If you try to create a certificate, say for a Primary Domain imap.my_domain.com and put smtp.my_domain.com in the Other Domains box, the Webconfig fails throwing a warning:

Warning
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Starting new HTTPS connection (1): acme-v01.api.letsencrypt.org
Obtaining a new certificate
Performing the following challenges:
tls-sni-01 challenge for imap.howitts.co.uk
Client with the currently selected authenticator does not support any combination of challenges that will satisfy the CA.
Client with the currently selected authenticator does not support any combination of challenges that will satisfy the CA.

Creating the certificate without any "Other Domains" works.

This looks like it is fallout from the TLS-SNI-01 challenge for Let's Encrypt being shut down for the moment because of security concerns. An updated version of certbot is being developed to mitigate the issue: https://community.letsencrypt.org/t/help-test-certbot-apache-and-nginx-fixes-for-tls-sni-01-outage/50207/32 but I think the issue should be tracked until the new certbot package becomes available in ClearOS.

Add a "certificate renewed" event

External applications (e.g. Openfire) might need to know when a Let's Encrypt certificate has been renewed. The certbot tool provides a --post-hook flag that we can use to hook into the ClearOS event system.

Chained certificate handling in app-certificate manager is problematic.

In the process of fixing #12, it became obvious that the de-facto api defined by https://github.com/clearos/app-certificate-manager isn't really future-proof.

The de-facto API in the certificate manager was clearly to support the old Apache style:

  • $cert_files[$certificate]['certificate-filename'] (Corresponds to Apache SSLCertificateFile)
  • $cert_files[$certificate]['key-filename'] (Corresponds to Apache SSLCertificateKeyFile)
  • $cert_files[$certificate]['intermediate-filename'] (Corresponds to Apache SSLCertificateChainFile, which is deprecated in 2.4.8 https://httpd.apache.org/docs/2.4/mod/mod_ssl.html#sslcertificatefile)

To which I added:

  • $cert_files[$certificate]['fullchain-filename'] (Corresponds to Apache SSLCertificateFile for Apache >2.4.8, and many others: nginx, openfire, etc.)

It seems to me the certificate manager should expose a better API, not rely on the different apps sorting out what they need from keys that may, or may not be present.

Note that missing intermediate certificates by using cert.pem insteat of fullchain.pem causes especially hard to diagnose problems, where sometimes browsers work fine because they cached let's encrypt chains, but things like wget throw 'Unable to locally verify the issuer's authority.' or similar errors.

@pcbaldwin, @bchambers As discussed with ben this morning, I'd like to hear your thoughts on this, while relatively few apps use let's encrypt so far, and it's still time to abstract this out in the certificate manager. Ultimately this is a generic SSL issue, it just so happens that openfire exposed it first.

Certificate renewal will only work if webserver is not running!

There has been a change to the /usr/clearos/apps/lets_encrypt/deploy/renew script and the RESULT line now includes the switch "--standalone". This means certbot will use its built-in webserver which is great if you have not set up and started a webserver. If you already have a running web server, this command will always fail as it cannot bind to port 80. It is, however, a great solution if you are not running a webserver.

I believe the certificate creation and renewal routines should be made to detect if the web server is running (or if anything is bound to port 80). If it is not it should use the --standalone switch. Otherwise it should not.

This is a pretty urgent issue as the last update appeared around 12th Feb (which may have been the one containing the change) so we are approaching the 30 day limit where existing certificates will begin to expire.

Add support for wildcard certificates - Tricky

Wildcard support is coming to Let's Encrypt on February 27, 2018. There's one gotcha -- only the DNS validation protocol will be available:

Wildcard certificates will be offered free of charge via our upcoming ACME v2 API endpoint. We will initially only support base domain validation via DNS for wildcard certificates, but may explore additional validation options over time.

That means an end user will have to create a DNS TXT record for both creation and renewals. There are some plugins available to automate this for some providers (e.g. Amazon Route 53, DigitalOcean DNS). Integration with ClearCenter DNS should be possible though.

To investigate further.

Critical issue with certbot-0.31

There is a critical issue with certbot-0.31. If you create a certificate after updating to certbot-0.31, it will create a file /etc/letsencrypt/live/README. The webconfig then tries to look for certificates under /etc/letsencrypt/live/README such as /etc/letsencrypt/live/README/cert.pem as it is only expecting certificate folders in /etc/letsencrypt/live/, and then the webconfig gives an "Ooooops: Certificate not found."

A number of thoughts come to mind:
1 - the app could just trap the error and skip it
2 - the app could only search folders /etc/letsencrypt/live/ and not try to search regular files
3 - Dirty fix, but check of the existence of /etc/letsencrypt/live/README and delete it if it exists. This could even be put in the renew-hooks.

Note the README file does not appear to be created when a certificate is renewed with a line like:
certbot certonly --standalone --max-log-backups 200 --preferred-challenges http-01 --preferred-challenges http-01 -d example.com

So it seems to be on creation only.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.