Giter Site home page Giter Site logo

tomwassenberg / certbot-ocsp-fetcher Goto Github PK

View Code? Open in Web Editor NEW
26.0 2.0 4.0 250 KB

A tool that primes the OCSP cache of nginx for certificates managed by Certbot, in order to make OCSP stapling work reliably.

License: MIT License

Shell 100.00%
certbot ocsp ocsp-stapling nginx

certbot-ocsp-fetcher's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

certbot-ocsp-fetcher's Issues

Check for status of certificate

A certificate should normally never be in a "revoked" status, while still being present in Certbot's folder. So when the script encounters such a certificate, the script should halt and/or send an alert.

Add systemd service + timer

This is useful, because this script should be run periodically, since OCSP responses are valid for a maximum of 10 days, and a new response should be issued at least every 4 days.

Docker image?

Hi there. Thank you for this immensely useful tool, it really should be more well-known.
Currently, the only way to use it is to just manually take the script file that's found in the repo and put it where you want and execute it. You also have to also make sure that the dependencies are in place.

It would be nice though if you also published a Docker image to Docker Hub.

Let me know if this is somehow not feasible.

Thanks.

Add check for correct OpenSSL syntax

Because of a backwards-incompatible argument style change in OpenSSL 1.1.0, the current OpenSSL command that fetches the actual OCSP response doesn't work on OpenSSL <1.1.0.

I should check what OpenSSL version is on the system, and use the correct argument style for it.

Message "Running as a deploy hook of Certbot" shown as error in certbot renew

Renewing an existing certificate for example.com and *.example.com

Hook 'deploy-hook' ran with output:
 example.com	updated
Hook 'deploy-hook' ran with error output:
 Running as a deploy hook of Certbot...

 LINEAGE   	RESULT 	REASON

Sounds like the message " Running as a deploy hook of Certbot..." is seen as an error message by certbot renew.
And " LINEAGE RESULT REASON" as well.

Therefore, I uncommented the lines in your code that print these two messages detected as error messages.

But even, after that, I get the "error" message:

"Hook 'deploy-hook' ran with error output:
 example.com	updated"

Make it possible to run as non-root

The check for root privileges should be conditional, so the script only halts if it actually needs root for the tasks it's about to perform. So if:

  • your certificate chains are readable by the current user, AND
  • the output directory is writeable by the current user, AND
  • nginx can be restarted by the current user

you wouldn't actually need root.

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.