GithubHelp home page GithubHelp logo

mozilla-github-standards / 41593a1c8dd3645a08b4e192bdbe05a06bd5f871125c95b62169df2239383fe1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mozilla/tag2cert

0.0 0.0 0.0 12 KB

Lightweight pip installable wrapper for creating and renewing Let's Encrypt certificates using Route53 and AWS Tags

License: Mozilla Public License 2.0

Python 100.00%

41593a1c8dd3645a08b4e192bdbe05a06bd5f871125c95b62169df2239383fe1's Introduction

tag2cert

Lightweight pip installable wrapper for creating and renewing Let's Encrypt certificates using Route53 and AWS Tags

Description

During CloudInit new machines deployed need to be able to automatically generate let's encrypt certificates. Ideally as a user the you can set the Domain name and contact e-mail as AWS Tags.

The command line utility requires two tags set on the instance to autocert with let's encrypt using another cool project the lego certificate client.

Required AWS Tags:

Usage

usage: tag2cert [-h] [--verbose] [--testing] [--setup] [--renew]

AutoCert wrapper for calling during CloudInit. Requires lego on the system and
Route53 delegation.

optional arguments:
  -h, --help  show this help message and exit

  --verbose   log debug messages
  --testing   Use the let's encrypt staging instance
  --setup     Generate a let's encrypt certificate with lego for the first
              time and setup a cron job to renew. Requires AWS tag of
              LE_DOMAIN set.
  --renew     Will renew the let's encrypt certificate using the lego ACME
              client for the AWS tag value of LE_DOMAIN.

TLDR on Route53 Zones

You must have the following IAM Policy on the Route53 zone for Let's Encrypt to validate against. Attach this inline or as a policy to your instance profile.

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "route53:GetChange",
                "route53:ListHostedZonesByName"
            ],
            "Resource": [
                "*"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "route53:ChangeResourceRecordSets"
            ],
            "Resource": [
                "arn:aws:route53:::hostedzone/<INSERT_YOUR_HOSTED_ZONE_ID_HERE>"
            ]
        }
    ]
}

41593a1c8dd3645a08b4e192bdbe05a06bd5f871125c95b62169df2239383fe1's People

Contributors

andrewkrug avatar mozilla-github-standards avatar

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.