1
0
mirror of https://github.com/certbot/certbot.git synced 2026-01-26 07:41:33 +03:00
Commit Graph

129 Commits

Author SHA1 Message Date
sydneyli
8231b1a19c Pin Lexicon version to 2.2.1 (#5803) 2018-03-29 17:09:21 -07:00
Delan Azabani
8e9a4447ff make pip_install.sh compatible with POSIX sh(1) again (#5622) 2018-03-22 12:24:53 -07:00
cclauss
e405aaa4c1 Fix print() and xrange() for Python 3 (#5590) 2018-03-14 09:37:29 -07:00
Brad Warren
d310ad18c7 Put API link at the bottom of DNS plugin docs (#5699)
* Put link to API at the bottom for future docs.

* Put API link at the bottom of existing docs.
2018-03-12 17:10:23 -07:00
Brad Warren
cc344bfd1e Break lockstep between our packages (#5655)
Fixes #5490.

There's a lot of possibilities discussed in #5490, but I'll try and explain what I actually did here as succinctly as I can. Unfortunately, there's a fair bit to explain. My goal was to break lockstep and give us tests to ensure the minimum specified versions are correct without taking the time now to refactor our whole test setup.

To handle specifying each package's minimum acme/certbot version, I added a requirements file to each package. This won't actually be included in the shipped package (because it's not in the MANIFEST).

After creating these files and modifying tools/pip_install.sh to use them, I created a separate tox env for most packages (I kept the DNS plugins together for convenience). The reason this is necessary is because we currently use a single environment for each plugin, but if we used this approach for these tests we'd hit issues due to different installed plugins requiring different versions of acme/certbot. There's a lot more discussion about this in #5490 if you're interested in this piece. I unfortunately wasted a lot of time trying to remove the boilerplate this approach causes in tox.ini, but to do this I think we need negations described at complex factor conditions which hasn't made it into a tox release yet.

The biggest missing piece here is how to make sure the oldest versions that are currently pinned to master get updated. Currently, they'll stay pinned that way without manual intervention and won't be properly testing the oldest version. I think we should solve this during the larger test/repo refactoring after the release because the tests are using the correct values now and I don't see a simple way around the problem.

Once this lands, I'm planning on updating the test-everything tests to do integration tests with the "oldest" versions here.

* break lockstep between packages

* Use per package requirements files

* add local oldest requirements files

* update tox.ini

* work with dev0 versions

* Install requirements in separate step.

* don't error when we don't have requirements

* install latest packages in editable mode

* Update .travis.yml

* Add reminder comments

* move dev to requirements

* request acme[dev]

* Update pip_install documentation
2018-03-05 09:50:19 -08:00
Hugo
42638afc75 Drop support for EOL Python 2.6 and 3.3
* Drop support for EOL Python 2.6

* Use more helpful assertIn/NotIn instead of assertTrue/False

* Drop support for EOL Python 3.3

* Remove redundant Python 3.3 code

* Restore code for RHEL 6 and virtualenv for Py2.7

* Revert pipstrap.py to upstream

* Merge py26_packages and non_py26_packages into all_packages

* Revert changes to *-auto in root

* Update by calling letsencrypt-auto-source/build.py

* Revert permissions for pipstrap.py
2018-02-16 16:14:01 -08:00
Brad Warren
39472f88de reduce ipdb version (#5408) 2018-01-10 13:26:31 -08:00
Brad Warren
e02adec26b Have letsencrypt-auto do a real upgrade in leauto-upgrades option 2 (#5390)
* Make leauto_upgrades do a real upgrade

* Cleanup vars and output

* Sleep until the server is ready

* add simple_http_server.py

* Use a randomly assigned port

* s/realpath/readlink

* wait for server before getting port

* s/localhost/all interfaces
2018-01-08 17:38:03 -08:00
Brad Warren
5388842e5b Fix pytest on macOS in Travis (#5360)
* Add tools/pytest.sh

* pass TRAVIS through in tox.ini

* Use tools/pytest.sh to run pytest

* Add quiet to pytest.ini

* ignore pytest cache
2018-01-03 17:49:22 -08:00
Brad Warren
a1aea021e7 Pin dependencies in oldest tests (#5316)
* Add tools/merge_requirements.py

* Revert "Fix oldest tests by pinning Google DNS deps (#5000)"

This reverts commit f68fba2be2.

* Add tools/oldest_constraints.txt

* Remove oldest constraints from tox.ini

* Rename dev constraints file

* Update tools/pip_install.sh

* Update install_and_test.sh

* Fix pip_install.sh

* Don't cat when you can cp

* Add ng-httpsclient to dev constraints for oldest tests

* Bump tested setuptools version

* Update dev_constraints comment

* Better document oldest dependencies

* test against oldest versions we say we require

* Update dev constraints

* Properly handle empty lines

* Update constraints gen in pip_install

* Remove duplicated zope.component

* Reduce pyasn1-modules dependency

* Remove blank line

* pin back google-api-python-client

* pin back uritemplate

* pin josepy for oldest tests

* Undo changes to install_and_test.sh

* Update install_and_test.sh description

* use split instead of partition
2017-12-18 12:31:36 -08:00
Jannis Leidel
2abc94661a Use josepy instead of acme.jose. (#5203) 2017-12-11 11:25:09 -08:00
Jacob Hoffman-Andrews
7319cc975a Quiet pip install output. (#5288)
pip install generates a lot of lines of output that make it harder to see what
tox is running in general. This adds the -q flag to pip install.

At the same time, add `set -x` in install_and_test.sh and pip_install.sh so they
echo the commands they are running. This makes it a little clearer what's going
on in tests.

I didn't put `set -x` at the top or in the shebang, because moving it lower lets
us avoid echoing some of the messy if/then setup statements in these scripts,
which focussed attention on the pip install command.
2017-12-01 23:40:09 -08:00
Brad Warren
394dafd38c Revert requiring dnsmadeeasy extras for lexicon (#5291)
Fixes failures at https://travis-ci.org/certbot/certbot/jobs/310248574#L1558.

Additional context can be found at #5230 and 604584521a (diff-2eeaed663bd0d25b7e608891384b7298).
2017-12-01 17:00:24 -08:00
Brad Warren
48173ed1cb Switch from nose to pytest (#5282)
* Use pipstrap to install a good version of pip

* Use pytest in cb-auto tests

* Remove nose usage in auto_test.py

* remove nose dev dep

* use pytest in test_tests

* Use pytest in tox

* Update dev dependency pinnings

* remove nose multiprocess lines

* Use pytest for coverage

* Use older py and pytest for old python versions

* Add test for Error.__str__

* pin pytest in oldest test

* Fix tests for DNS-DO plugin on py26

* Work around bug for Python 3.3

* Clarify dockerfile comments
2017-12-01 10:59:55 -08:00
Brad Warren
686fa36b3b Install dnsmadeeasy extras from dns-lexicon (#5230)
* Add tools/pip_constraints.txt to pin all Python dependencies

* Use tools/pip_constraints.txt in tools/pip_install.sh

* Install dnsmadeeasy extras in dnsmadeeasy plugin
2017-11-08 10:58:00 -08:00
Brad Warren
884fc56a3e Use pipstrap to ensure pip works on older systems (#5216)
* Use pipstrap in tools/_venv_common.sh

* Use _venv_common.sh in test_sdists
2017-11-03 10:59:56 -07:00
Matt Dainty
811d436d5a RFC 2136 DNS Authenticator (#4701)
Introduce a plugin that automates the process of completing a dns-01 challenge by creating, and subsequently removing, TXT records using RFC 2136 Dynamic Updates (a.k.a. nsupdate).

This plugin has been tested with BIND, but may work with other RFC 2136-compatible DNS servers, such as PowerDNS.
2017-06-16 16:53:46 -07:00
Zach Shepherd
3f86e13acc LuaDNS DNS Authenticator (#4605)
Implement an Authenticator which can fulfill a dns-01 challenge using
the LuaDNS API. Applicable only for domains using LuaDNS for DNS.

Testing Done:
 * `tox -e py27`
 * `tox -e lint`
 * Manual testing:
    * Used `certbot certonly --dns-luadns -d`, specifying a
      credentials file as a command line argument. Verified that a
      certificate was successfully obtained without user interaction.
 * Negative testing:
    * Path to non-existent credentials file.
    * Credentials file with unsafe permissions (644).
    * Path to credentials file without an email.
    * Path to credentials file with an invalid email.
    * Path to credentials file without a token.
    * Path to credentials file with an invalid token.
    * Domain name not registered to LuaDNS account.
2017-06-16 14:43:12 -07:00
Zach Shepherd
87f6e18ac4 Add certbot-dns-dnsmadeeasy to release script (#4844) 2017-06-16 10:35:52 -07:00
Zach Shepherd
0a269f31d0 DNS Made Easy DNS Authenticator (#4603)
Implement an Authenticator which can fulfill a dns-01 challenge using
the DNS Made Easy API. Applicable only for domains using DNS Made Easy.

Testing Done:
 * `tox -e py27`
 * `tox -e lint`
 * Manual testing:
   (`http://api.sandbox.dnsmadeeasy.com/V2.0` used as the
    `api_endpoint` for all manual testing)
    * Used `certbot certonly --dns-dnsmadeeasy -d`, specifying a
      credentials file as a command line argument. Verified that a
      certificate was successfully obtained without user interaction.
 * Negative testing:
    * Path to non-existent credentials file.
    * Credentials file with unsafe permissions (644).
    * Path to credentials file with an invalid API key.
    * Path to credentials file with a malformed API key.
    * Path to credentials file with an invalid Secret key.
    * Path to credentials file with a malformed Secret key.
    * Domain name not registered to DNS Made Easy account.
2017-06-15 16:41:00 -07:00
Brad Warren
650611bd1f Fix oldest tests (#4782)
* Add pip_install_editable.sh

* add install_and_test.sh

* simplify tox.ini and fix oldest tests

* Put paths & packages on their own line in tox.ini
2017-06-08 12:22:46 -07:00
Zach Shepherd
e749937465 route53: rename to match other DNS plugins (#4747)
This change renames certbot-route53 to certbot-dns-route53 and updates
the package's setup.py file to maintain backwards compatibility.

Testing Done:
 * Run `certbot` with `-a certbot-route53:auth`, verify the plugin runs.
 * Run `certbot` with `--dns-route53`, verify the plugin runs.
2017-06-06 15:41:04 -07:00
Zach Shepherd
4448a86013 Handle releasing of DNS subpackages not yet included in certbot-auto (#4779)
Add the DNS subpackages being considered for future inclusion in
certbot-auto as non-certbot-auto packages for the 0.15.0 release.
2017-06-05 17:59:56 -07:00
Brad Warren
962879c35c Remove dependency on git from pip_install.sh. (#4770)
* Remove dependency on git from pip_install.sh.

Using git allowed this file to continue to work even if it was moved to another
directory. This slight increase in robustness wasn't worth it though as it
broke our development Dockerfile (see #4703), the certbot website's Dockerfile
(see certbot/website#226), and our test farm tests (see
certbot/tests/letstest/scripts/test_apache2.sh for an example that calls
tools/venv.sh without installing git). Rather than continuing to find and patch
these things, let's just allow this script to fail if it's moved rather than
propagating the git dependency all over the place.

* Add readlink.py.

This is the equivalent of `readlink -f` on many Linux systems. This is useful
as there are often differences in readlink on different platforms.

* Use readlink.py in pip_install.sh.

This allows us to work around differences in readlink on macOS.
2017-06-05 17:51:45 -07:00
Zach Shepherd
c9ff9e3c7a route53: add unit tests (#4725)
This change introduces unit tests to cover all lines of the route53
plugin except for the timeout in `_wait_for_change`.
2017-05-31 15:25:24 -07:00
Zach Shepherd
40e8fc4dec Handle releasing subpackages not included in certbot-auto (#4758)
This change refactors the release script to handle subpackages which are
not bundled as a part of cerbot-auto.

The script now allows developers to define subpackages as either being
included in certbot-auto, or not.

The script then uses one of three sets of subpackages for each operation:
 * The version number is updated for all non-certbot subpackages
   (and certbot itself is handled separately)
 * sdists and wheels are created for all non-certbot subpackages
   (and certbot itself is handled separately)
 * Testing is performed for all subpackages
 * Hashes are pinned for certbot-auto subpackages (including certbot)
2017-05-31 15:05:55 -07:00
Zach Shepherd
c827c9ec5f NS1 DNS Authenticator (#4602)
Implement an Authenticator which can fulfill a dns-01 challenge using
the NS1 DNS API. Applicable only for domains using NS1 DNS.

Testing Done:
 * `tox -e py27`
 * `tox -e lint`
 * Manual testing:
    * Used `certbot certonly --dns-nsone -d`, specifying a
      credentials file as a command line argument. Verified that a
      certificate was successfully obtained without user interaction.
    * Used `certbot certonly --dns-nsone -d`, without specifying a
      credentials file as a command line argument. Verified that the
      user was prompted and that a certificate was successfully
      obtained.
    * Used `certbot certonly -d`. Verified that the user was prompted for
      a credentials file after selecting dnsimple interactively and that
      a certificate was successfully obtained.
    * Used `certbot renew --force-renewal`. Verified that certificates
      were renewed without user interaction.
 * Negative testing:
    * Path to non-existent credentials file.
    * Credentials file with unsafe permissions (644).
    * Path to credentials file with an invalid token.
    * Path to credentials file without a token.
    * Domain name not registered to NS1 account.
2017-05-26 11:24:38 -07:00
Zach Shepherd
fb02877268 DNSimple DNS Authenticator (#4587)
Implement an Authenticator which can fulfill a dns-01 challenge using
the DNSimple DNS API. Applicable only for domains using DNSimple DNS.

Testing Done:
 * `tox -e py27`
 * `tox -e lint`
 * Manual testing:
    * Used `certbot certonly --dns-dnsimple -d`, specifying a
      credentials file as a command line argument. Verified that a
      certificate was successfully obtained without user interaction.
    * Used `certbot certonly --dns-dnsimple -d`, without specifying a
      credentials file as a command line argument. Verified that the
      user was prompted and that a certificate was successfully
      obtained.
    * Used `certbot certonly -d`. Verified that the user was prompted for
      a credentials file after selecting dnsimple interactively and that
      a certificate was successfully obtained.
    * Used `certbot renew --force-renewal`. Verified that certificates
      were renewed without user interaction.
 * Negative testing:
    * Path to non-existent credentials file.
    * Credentials file with unsafe permissions (644).
    * Path to credentials file with an invalid token.
    * Path to credentials file without a token.
    * Domain name not registered to DNSimple account.
2017-05-22 17:06:04 -07:00
Zach Shepherd
49c41da4f1 CloudXNS DNS Authenticator (#4585)
Implement an Authenticator which can fulfill a dns-01 challenge using
the CloudXNS DNS API. Applicable only for domains using CloudXNS DNS.

Testing Done:
 * `tox -e py27`
 * `tox -e lint`
 * Manual testing:
    * Used `certbot certonly --dns-cloudxns -d`, specifying a
      credentials file as a command line argument. Verified that a
      certificate was successfully obtained without user interaction.
    * Used `certbot certonly --dns-cloudxns -d`, without specifying a
      credentials file as a command line argument. Verified that the
      user was prompted and that a certificate was successfully
      obtained.
    * Used `certbot certonly -d`. Verified that the user was prompted for
      a credentials file after selecting cloudxns interactively and that
      a certificate was successfully obtained.
    * Used `certbot renew --force-renewal`. Verified that certificates
      were renewed without user interaction.
 * Negative testing:
    * Path to non-existent credentials file.
    * Credentials file with unsafe permissions (644).
    * Domain name not registered to CloudXNS account.
2017-05-19 16:23:53 -07:00
Jacob Hoffman-Andrews
10bac107ee Add an account deactivate utility script. (#4254)
* Add an account deactivate utility script.

This is handy if you created an account with a tool other than Certbot, and want
to deactivate the account.

* Move deactivate.py to tools.

* Add test for ConflictError.

* Fix lint error.

* Document how to set server.
2017-05-17 14:24:59 -07:00
Zach Shepherd
4caff11371 Google Cloud DNS Authenticator (#4581)
Implement an Authenticator which can fulfill a dns-01 challenge using
the Google Cloud DNS API. Applicable only for domains using Google Cloud
DNS for DNS.

Testing Done:
 * `tox -e py27`
 * `tox -e lint`
 * Manual testing:
    * Used `certbot certonly --dns-google -d`, specifying a credentials
      file as a command line argument. Verified that a certificate was
      successfully obtained without user interaction.
    * Used `certbot certonly --dns-google -d`, without specifying a
      credentials file as a command line argument. Verified that the
      user was prompted and that a certificate was successfully
      obtained.
    * Used `certbot certonly -d`. Verified that the user was prompted for
      a credentials file after selecting google interactively and that
      a certificate was successfully obtained.
    * Used `certbot renew --force-renewal`. Verified that certificates
      were renewed without user interaction.
 * Negative testing:
    * Path to non-existent credentials file.
    * Credentials file with unsafe permissions (644).
    * Domain name not registered to Google Cloud Platform account.
2017-05-17 11:26:26 -07:00
Brad Warren
e4f65074d1 Merge pull request #4642 from certbot/new-pkg-release-prep
Make it easier to add new packages to the release script
2017-05-16 15:42:23 -07:00
Zach Shepherd
9e206f8024 DigitalOcean DNS Authenticator
Implement an Authenticator which can fulfill a dns-01 challenge using the
DigitalOcean API. Applicable only for domains using DigitalOcean for DNS.

Testing Done:
 * `tox -e py27`
 * `tox -e lint`
 * Manual testing:
    * Used `certbot certonly --dns-digitalocean -d`, specifying a
      credentials file as a command line argument. Verified that a
      certificate was successfully obtained without user interaction.
    * Used `certbot certonly --dns-digitalocean -d`, without specifying a
      credentials file as a command line argument. Verified that the user
      was prompted and that a certificate was successfully obtained.
    * Used `certbot certonly -d`. Verified that the user was prompted for
      a credentials file after selecting digitalocean interactively and
      that a certificate was successfully obtained.
    * Used `certbot renew --force-renewal`. Verified that certificates
      were renewed without user interaction.
 * Negative testing:
    * Path to non-existent credentials file.
    * Credentials file with unsafe permissions (644).
    * Credentials file missing token.
    * Credentials file with blank token.
    * Credentials file with incorrect token.
    * Domain name not registered to DigitalOcean account.
2017-05-11 17:26:02 -07:00
Brad Warren
74c7ffe25e Make it easier to add new packages to the release script 2017-05-11 12:17:01 -07:00
Brad Warren
be7e99a461 Pin dependency versions when using tools/venv.sh (#4629)
* Revert "Pin python-augeas version to avoid error with 1.0.0 (#4422)"

This reverts commit 1c51ae2588.

* make dependency-requirements

* separate certbot and dependency requirements

* fix build.py

* update hashin comment

* simplify release pinning

* separate letsencrypt dependency

* pin hashes in venv

* error out when bad things happen

* use pinned dependencies in tox

* Revert "pin hashes in venv"

This reverts commit 1cd38a9e50.

* use pip_install.sh in venv_common

* quote pip install args

* bump mock version
2017-05-11 10:06:05 -07:00
Zach Shepherd
7955274126 Script to create docs directory for new packages. 2017-05-10 15:26:51 -07:00
Zach Shepherd
db6defe614 Cloudflare DNS Authenticator
Implement an Authenticator which can fulfill a dns-01 challenge using the
Cloudflare API. Applicable only for domains using Cloudflare for DNS.

Testing Done:
 * `tox -e py27`
 * `tox -e lint`
 * Manual testing:
    * Used `certbot certonly --dns-cloudflare -d`, specifying a
      credentials file as a command line argument. Verified that a
      certificate was successfully obtained without user interaction.
    * Used `certbot certonly --dns-cloudflare -d`, without specifying a
      credentials file as a command line argument. Verified that the user
      was prompted and that a certificate was successfully obtained.
    * Used `certbot certonly -d`. Verified that the user was prompted for
      a credentials file after selecting cloudflare interactively and
      that a certificate was successfully obtained.
    * Used `certbot renew --force-renewal`. Verified that certificates
      were renewed without user interaction.
 * Negative testing:
    * Path to non-existent credentials file.
    * Credentials file with unsafe permissions (644).
    * Credentials file missing e-mail address.
    * Credentials file with blank API key.
    * Credentials file with incorrect e-mail address.
    * Credentials file with malformed API key.
    * Credentials file with invalid API key.
    * Domain name not registered to Cloudflare account.
2017-05-10 15:26:51 -07:00
Yen Chi Hsuan
779af8db1e Extend tools/venv3.sh to support full certbot development (#4532) 2017-04-20 09:09:20 -07:00
Brad Warren
bf45cea7cd Ensure a SHA2 hash algorithm is used when signing releases (#4384)
* use gpg2

* explictly use sha256
2017-03-20 18:00:50 -07:00
Brad Warren
7b34e73752 Merge pull request #4295 from certbot/dockerfile++
Rewrite our Dockerfile
2017-03-13 20:25:45 -07:00
Amjad Mashaal
0e735e360c remove unnecessary whitespace from tools/release.sh 2017-03-10 18:09:39 -08:00
Brad Warren
eb1e3c4cb3 add docker-warning script 2017-03-06 19:31:42 -08:00
Brad Warren
caa7e4e3f0 fix tools/venv.sh (#4126) 2017-01-27 14:06:40 -08:00
Josh Soref
6a39a42f45 Spelling (#4101)
* spelling: action

* spelling: artifacts

* spelling: asymmetric

* spelling: attempts

* spelling: bizarre

* spelling: certbot

* spelling: certificate

* spelling: certainly

* spelling: challenge

* spelling: client

* spelling: collated

* spelling: correct

* spelling: considered

* spelling: custom

* spelling: distinguish

* spelling: encoding

* spelling: enhancement

* spelling: equivalent

* spelling: execution

* spelling: existence

* spelling: failed

* spelling: handshake

* spelling: hyphen

* spelling: initialized

* spelling: initialization

* spelling: interpretation

* spelling: letsencrypt

* spelling: multiline

* spelling: multipart

* spelling: necessary

* spelling: otherwise

* spelling: output

* spelling: overridden

* spelling: positives

* spelling: preferable

* spelling: progress

* spelling: recommended

* spelling: referring

* spelling: relativity

* spelling: request

* spelling: requiring

* spelling: separate

* spelling: source

* spelling: specified

* spelling: standard

* spelling: successfully

* spelling: unparseable

* spelling: useful
2017-01-26 16:21:54 -08:00
Peter Eckersley
0956e61c7c Remove the sphinxcontrib.programout [docs]dependency (#3830)
- By making a static text file at release time, and including that
   instead.
2016-11-30 10:47:10 -08:00
Martey Dodoo
a7bfefc6d0 Change all "cerbot" references to "certbot" (#3770) 2016-11-08 11:09:20 -08:00
Brad Warren
f008fd0af9 Don't run nosetests from the root of our repo (#3620) 2016-10-11 19:15:11 -07:00
Brad Warren
0b792e46b7 fix requirements.txt surgery in response to shipping certbot-nginx (#3585) 2016-10-05 18:16:03 -07:00
Brad Warren
a89dfc7226 Add the nginx plugin's hash to certbot-auto during the release process 2016-08-17 16:10:21 -07:00
bmw
6a0c6c85fb Revert "Use --force-reinstall to fix bad virtualenv package" 2016-06-02 16:42:55 -07:00