Make it work as certbot-route53

This commit is contained in:
Paulo Koch 2016-10-04 14:20:12 +01:00 committed by Paulo Koch
parent 108903dd26
commit 4538766c48
6 changed files with 22 additions and 23 deletions

View file

@ -1,4 +1,4 @@
include LICENSE.txt
include README.md
recursive-include docs *
recursive-include letsencrypt_route53/tests/testdata *
recursive-include certbot_route53/tests/testdata *

View file

@ -10,6 +10,9 @@ It's expected that the root hosted zone for the domain in question already exist
1. Create a virtual environment
2. Make sure you have libssl-dev (or your regional equivalent) installed.
`pycparser` suffers from
https://github.com/eliben/pycparser/issues/148, which is why we need to
recompile it, which depends on `libssl-dev`.
3. Install by adding these to your requirements.txt file:
@ -17,13 +20,10 @@ It's expected that the root hosted zone for the domain in question already exist
--no-binary pycparser
-e git+https://github.com/certbot/certbot.git#egg=certbot
-e git+https://github.com/certbot/certbot.git#egg=acme&subdirectory=acme
hpeixoto-letsencrypt-route53
certbot-route53
```
We need DNS01 support in certbot, which is only available in master for now.
Additionally, pycparser suffers from
https://github.com/eliben/pycparser/issues/148, which is why we need to
recompile it, which depends on `libssl-dev`.
### How to use it
@ -32,8 +32,8 @@ via `.aws/credentials`.
To generate a certificate:
```
letsencrypt certonly \
certbot certonly \
-n --agree-tos --email DEVOPS@COMPANY.COM \
-a hpeixoto-letsencrypt-route53:auth \
-a certbot-route53:auth \
-d MY.DOMAIN.NAME
```

View file

@ -8,8 +8,8 @@ import boto3
from acme import challenges
from letsencrypt import interfaces
from letsencrypt.plugins import common
from certbot import interfaces
from certbot.plugins import common
logger = logging.getLogger(__name__)
@ -56,7 +56,6 @@ class Authenticator(common.Plugin):
# provision the TXT record, using the domain name given. Assumes the hosted zone exits, else fails the challenge
r53 = boto3.client('route53')
logger.info("Doing validation for " + achall.domain)
listResponse = r53.list_hosted_zones_by_name(DNSName=achall.domain)
try:
zone = self._find_zone(r53, achall.domain)

View file

@ -1,6 +1,6 @@
{
"Version": "2012-10-17",
"Id": "letsencrypt-route53 sample policy",
"Id": "certbot-route53 sample policy",
"Statement": [
{
"Effect": "Allow",

View file

@ -7,12 +7,13 @@ version = '0.1.4'
install_requires = [
'acme>=0.9.0.dev0',
'letsencrypt>=0.9.0.dev0',
'certbot>=0.9.0.dev0',
'PyOpenSSL',
'pyparsing>=1.5.5', # Python3 support; perhaps unnecessary?
'setuptools', # pkg_resources
'zope.interface',
'boto3'
'boto3',
'dnspython',
]
if sys.version_info < (2, 7):
@ -26,12 +27,12 @@ docs_extras = [
]
setup(
name='hpeixoto-letsencrypt-route53',
name='certbot-route53',
version=version,
description="Route53 plugin for Let's Encrypt client",
url='https://github.com/lifeonmarspt/letsencrypt-route53',
author="Breland Miley",
author_email='breland@bdawg.org',
description="Route53 plugin for certbot",
url='https://github.com/lifeonmarspt/certbot-route53',
author="Hugo Peixoto",
author_email='hugo@lifeonmars.pt',
license='Apache2.0',
classifiers=[
'Development Status :: 3 - Alpha',
@ -41,7 +42,6 @@ setup(
'Operating System :: POSIX :: Linux',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Security',
@ -53,10 +53,10 @@ setup(
packages=find_packages(),
include_package_data=True,
install_requires=install_requires,
keywords = ['letsencrypt', 'route53', 'aws'],
keywords=['certbot', 'route53', 'aws'],
entry_points={
'letsencrypt.plugins': [
'auth = letsencrypt_route53.authenticator:Authenticator'
'certbot.plugins': [
'auth = certbot_route53.authenticator:Authenticator'
],
},
)