Code Monkey home page Code Monkey logo

letsencrypt's Introduction

LetsEncrypt for Google AppEngine Python

If you want to have a free SSL certificate from LetsEncrypt for you custom domain, the setup and renewal can be a hassle. This little script makes the process super easy.

Note about security

You should probably quickly read through the python script to convince yourself that it's secure.

Installation

In your Python AppEngine Project execute the following command:

git submodule add https://github.com/AirConsole/letsencrypt

Then add the following to your app.yaml:

handlers:
- url: /\.well\-known\/acme\-challenge\/.*
  script: letsencrypt.app

Upload your app to Google AppEngine.

Create or renew a SSL certificate

letsencrypt's People

Contributors

andrin-n-dream avatar th3w4y avatar

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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

letsencrypt's Issues

Action required: Let's Encrypt subscriber agreement URL Change

Hi there,

Your project has a hardcoded URL reference to the current Let's Encrypt subscriber agreement:

https://github.com/AirConsole/letsencrypt/blob/master/__init__.py#L228

This URL changed November 15th. New registration requests using this ACME client will produce an error as of today. (This is another instance of the previously reported Issue #3)

ACME clients do not need to hardcode a subscriber agreement URL and Let's Encrypt discourages this practice. You should learn the current agreement URL at runtime instead so that it is always current.

One option is to reference the agreement URL from the "meta" key's "terms-of-service" element from the response to a GET request to the ACME server's /directory endpoint:

{
  <snip>
  "meta": {
        "terms-of-service": "https://letsencrypt.org/documents/LE-SA-v1.1.1-August-1-2016.pdf"
  },
  <snip>
}

A second option is to learn the current subscriber agreement URL at runtime as part of the new-reg flow: Client code can submit an initial new-reg request without an agreement value in the request payload. The account will be created and in the response will be a Link header with a terms-of-service relation pointing at the current agreement URL. Once this Link header has been seen the client should update the registration to agree to the terms by sending a payload with the agreement value set to the current agreement URL.

Thanks!

Thanks a lot!

You can delete this issue, but I just wanted to give a huge THANK YOU for making this. I have been dealing with manually renewing letsencrypt certs on appengine for a few cycles now and it's a pita.

This is a way better and faster solution than any of the higher google search ranked blog posts on this topic.

Updated agreement PDF

I got the following error:

Registering account...
Traceback (most recent call last):
  File "<stdin>", line 332, in <module>
  File "<stdin>", line 329, in main
  File "<stdin>", line 212, in get_crt
ValueError: Error registering: 400 {
  "type": "urn:acme:error:malformed",
  "detail": "Provided agreement URL [https://letsencrypt.org/documents/LE-SA-v1.0.1-July-27-2015.pdf] does not match current agreement URL [https://letsencrypt.org/documents/LE-SA-v1
.1.1-August-1-2016.pdf]",
  "status": 400
}

…and needed to fork your script and update the hard-coded agreement URL in order for it to work.

Thanks much for this script β€” very useful!

Error setting challenge

Hey,

I have run through the installation instructions and deploy to appengine. I have tried the curl command in OSX Terminal and also Google Cloud Shell but I'm getting the same error (log below).

I have limited knowledge of Python, so can't really see where it's going wrong on line 244 other than that the response code hasn't come back as 200 (which I presume is because there's an error creating the challenge file).

Generate account key... Generate domain key... Generate csr... Parsing account key... Parsing CSR... Registering account... Registered! Verifying www.xxxxx.co.uk... Setting challenge www.xxxxx.co.uk... Traceback (most recent call last): File "<stdin>", line 332, in <module> File "<stdin>", line 329, in main File "<stdin>", line 244, in get_crt ValueError: Error setting challenge on http://www.xxxxx.co.uk/.well-known/acme-challenge/

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.