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

9177 Commits

Author SHA1 Message Date
Erica Portnoy
0e95cd8cde Release 0.34.2 v0.34.2 2019-05-07 12:52:28 -07:00
Erica Portnoy
7683636684 Update changelog for 0.34.2 release 2019-05-07 12:17:33 -07:00
Brad Warren
8ff24f60a8 0.34.x check_permissions.py filesystem root (#7038)
* Fix check permissions logic (#7034)

Fixes #7031 

I use the same approach than in `CreateVenv()` and `CompareVersions()`: a new bash function `CheckPathPermissions()` is declared an execute a python script passed to the interpreter through stdin.

This allows:
* to not require the temp_dir that holds a temporary script to be executed
* to reduce at the bare minimum the change to make on the order of bash command to execute (including when the temp_dir is created)

* Fix check permissions logic in certbot-auto by making a temp dir useless

* Update CHANGELOG.md

(cherry picked from commit 71b1b8c2d9)

* Fixup changelog.
2019-05-06 16:54:33 -07:00
Brad Warren
0c96cf6560 Merge pull request #7033 from certbot/0.34.1.release
Release 0.34.1
2019-05-06 15:26:28 -07:00
Erica Portnoy
2b4d6e23d5 Release 0.34.1 v0.34.1 2019-05-06 13:28:15 -07:00
Erica Portnoy
e5cdc2738d Update changelog for 0.34.1 release 2019-05-06 13:12:42 -07:00
Brad Warren
3410b9332c Update changelog for 0.34.1. (#7021) (#7023)
(cherry picked from commit 4bf6eb2091)
2019-05-02 15:28:27 -07:00
Brad Warren
e50d47d25c Merge pull request #7020 from certbot/prep-0.34.1
Prep 0.34.1
2019-05-02 14:46:42 -07:00
Adrien Ferrand
0ab2bb21fa Fix oldest tests when local dependencies are used (#7019)
Fixes #7014.

Using a --force-reinstall (only for oldest tests), dependencies are properly reinstalled. Since this action significantly increases the execution time of oldest tests, I split them into two parts to allow their parallel execution by Travis.

We will need to find a better way to solve this in the future.

An example of successful execution of oldest tests in the situation of a point release can be found here: https://travis-ci.org/adferrand/certbot/builds/527475532

* Fix for oldest requirements

* Split oldest tests

* Update a comment

(cherry picked from commit b19d4801c9)
2019-05-02 14:32:20 -07:00
Brad Warren
57be329058 Bump initial version to 0.33.1. (#7017)
We made this change locally yesterday while preparing the release.

I tested this change on all AMIs currently in the test farm as well as Fedora 29 and this test passed on all instances.

(cherry picked from commit 862577fffc)
2019-05-02 14:30:04 -07:00
Brad Warren
698e520044 Stop certbot-auto from printing blank lines (#7016)
Fixes #7012.

Apparently, the previous test we had here doesn't catch the case when certbot-auto prints blank lines. (I don't yet understand why so if someone does, please let me know!)

Regardless, I fixed up the test and verified it fails with the version of letsencrypt-auto in master and then fixed letsencrypt-auto so the test passes.

I ran test farm tests on the changes here and they passed on all instances.

* correct test

* fixes #7012

(cherry picked from commit e15e848474)
2019-05-02 14:29:43 -07:00
Erica Portnoy
7d28480844 Release 0.34.0 v0.34.0 2019-05-01 14:07:25 -07:00
Erica Portnoy
6ba242bc3d Update changelog for 0.34.0 release 2019-05-01 13:24:21 -07:00
Erica Portnoy
2ef1c512b4 Remove unused Changelog sections 2019-05-01 13:21:32 -07:00
schoen
5b76de48de Merge pull request #7009 from rigrassm/dns-rfc2136-config-changes
Make tsig algorithm configuration option in the certbot_dns_rfc2136 config file case insensitive
2019-04-30 19:15:16 -07:00
Ricky Grassmuck
5f5f44dd97 Merge branch 'master' into dns-rfc2136-config-changes 2019-04-30 20:43:07 -05:00
Ricky Grassmuck
40481e0fdb Update CHANGELOG.md
Signed-off-by: Ricky Grassmuck <rigrassm@gmail.com>
2019-04-30 20:33:05 -05:00
Adrien Ferrand
de88e7d777 Implements specific overrides for Fedora 29+ in Apache plugin (#6988)
* Start to plug specific logic for Fedora >= 29

* Invert the logic

* Implement specifics for Fedora 29

* Fix config

* Add documentation

* Fix parser, fix tests

* Fix import

* Fix lint

* Use LooseVersion to be fail safe on versions comparison

* Remove conditional restart on fedora override

* Use parent logic

* Update certbot-apache/certbot_apache/tests/fedora_test.py

Co-Authored-By: adferrand <adferrand@users.noreply.github.com>

* Simplify restart test

* Update certbot-apache/certbot_apache/override_fedora.py

Co-Authored-By: adferrand <adferrand@users.noreply.github.com>

* Correct test assertion

* Fix pylint errors

* Revert to a direct call to systemctl
2019-05-01 03:21:10 +03:00
Adrien Ferrand
b0d960f102 Send a POST-as-GET request to query registration in ACME v2 (#6993)
* Send a post-as-get request to query registration

* Add changelog

* Add comments. Add again a line.

* Prepare code for future PR about post-as-get
2019-04-30 15:37:23 -07:00
ohemorange
3900e56b52 Update Debian Jessie AMI to continue being able to use apt (#7003)
Fixes #6907.
2019-04-30 13:16:47 -07:00
ohemorange
f0f5bb4fc0 Update test farm version of boulder to current master (#7002)
Recent changes are no longer compatible with the old version of boulder used in the test farm tests. This PR updates the version of boulder used, and runs it with the new way of running boulder.

A new ami was created and is used here that uses Ubuntu 18.04, so that docker-compose can be installed more properly.

Removed commented-out section about rabbitmq that was already deprecated.

Switched to using the public DNS resolver 8.8.8.8 for the tests because the way to find the correct local resolver changed.
2019-04-30 13:13:37 -07:00
Brad Warren
dcf89c9396 Update Lexicon dependency in dnsimple (#7008)
* Add CERTBOT_OLDEST conditional to setup.py.

* Unset CERTBOT_OLDEST in release script.

* import os
2019-04-30 20:59:05 +02:00
Brad Warren
d1330efe41 Print warning when certbot-auto has insecure permissions. (#6995)
This PR attempts to better inform people about the problem identified at https://community.letsencrypt.org/t/certbot-auto-deployment-best-practices/91979/.

I was hesitant to add the flag --no-permissions-check, however, if there's some obscure distro out there (or custom user setup) that has a strange users and groups, I didn't want us to either:

Have to put out a bug fix release
Refuse to fix the problem and let them deal with warnings on every run

* add check_permissions.py

* Update letsencrypt-auto.template.

* build letsencrypt-auto

* Add test_permissions_warnings to auto_test

* Allow uid/gid < 1000.

* Add --no-permissions-check to Certbot.

* Add --no-permissions-check to certbot-auto.

* Add test farm test that letsencrypt-auto is quiet.

As a bonus, this new test will catch problems like the one that the caused
0.33.1 point release.

* Update CHANGELOG about permissions check.

* Update permissions comment.

* Fix symlink handling.

* Use a better default in auto_test.py.
2019-04-30 10:45:03 -07:00
Brad Warren
b41a992545 Use archive.org instead of ietf.org directly. (#7004)
Fixes the failing website builds at https://travis-ci.com/certbot/website/builds/110049706.
2019-04-30 09:42:58 -07:00
ohemorange
1aa111f941 Fix typo and add instructions for changing a single dependency (#6978)
* Fix typo and add instructions for changing a single dependency

* Only mention installing hashin
2019-04-30 06:59:45 +02:00
Ricky Grassmuck
a1dc63a0a2 Allow algorithm in certbot_dns_rfc2136's config to be case insensitive
Update dns_rfc2136_test to use a mixed-case test value in the valid algorithm test.
2019-04-28 21:45:27 -05:00
ohemorange
c99079fb0a Warn install users that future versions of certbot will automatically redirect (#6976)
First step of #6960.

* Warn install users that future versions of certbot will automatically redirect

* Only warn when the user declines or auto-declines redirect

* Unit tests

* Update changelog
2019-04-26 12:43:09 -07:00
Trinopoty Biswas
333ea90d1b Added support for linode version 4 tokens (#6588)
* certbot-dns-linode : Added support for linode version 4 tokens

* certbot-dns-linode : Added credentials ini option to override automatic api version detection

* certbot-dns-linode : Added clearer messages and documentation based on review

* certbot-dns-linode : Added check for empty 'linode_version' config instead of missing

* certbot-dns-linode : Fix rebase on master

* certbot-dns-linode : Updated local-oldest-requirements.txt

* Updated CHANGELOG to indicate Linode v4 API key support
2019-04-24 22:41:42 +02:00
schoen
fb83a1ac09 Merge pull request #6963 from certbot/coc
Adding links to EFF's Public Projects Code of Conduct
2019-04-24 12:17:22 -07:00
Adrien Ferrand
9dd2990e59 Remove keyAuthorization fallback dump in challenges response (#6975)
Fixes #6974.

This PR removes the fallback that consists in retrying to send the keyAuthorization field during a challenge request in case of malformed request.

* Remove keyAuthorization fallback dump in challenges response

* Correct import

* Add changelog entry
2019-04-23 15:10:15 -07:00
Adrien Ferrand
618e0562a0 [Unix] Create a framework for certbot integration tests: PART 4 (#6958)
This PR is the part 4 to implement #6541. It adds the integration tests for the nginx certbot plugin, and corresponds to the certbot-ci translation of certbot-nginx/tests/boulder-integration.sh that is executed for each PR.

As with certbot core tests, tests are written in Python, and executed by pytest, against a dynamic Boulder/Pebble instance setup. Tests are parallelized, of course, and a specific IntegrationTestsContext class, extended the one from certbot core tests, is crafter for these specific tests: its main goal is to setup a specific nginx instance for the current test.

On top of that, I use the test parametrization feature of Pytest, to drastically reduce the size of the actual code: indeed, the 6 tests from the original bash script share the same logic. So using a parametrization, one unique test is written, that is then executed 6 times against 6 different sets of parameters.

Note that the module integration_tests.nginx_tests.nginx_config do the same, but in Python, than certbot-nginx/tests/boulder-integration.conf.sh. The latter will be removed in a future PR, with all other bash scripts.

* Add nginx tests

* Distribute the other_port

* Load a pre-generated key/cert for nginx config

* Correct preload, remove a test, simplify a variable

* Integrate assertion directly in the test function

* Check process is not terminated

* Add spaces in the nginx config

* Add comments

* Use indirection

* Allow external cert

* Add coverage threshold for certbot-nginx
2019-04-23 13:29:48 -07:00
ohemorange
2812f054a3 Update urllib3 to 1.24.2 (#6977)
* Update urllib3 to 1.24.2

* Run build.py

* Update changelog
2019-04-22 15:23:26 -07:00
Brad Warren
a817e4f0ec There's no need to use certbot-auto here. (#6970)
I came across this when looking through our docs for other references to certbot-auto.

For the README changes, I deleted a bunch of duplicated and outdated instructions in favor of pointing people to https://certbot.eff.org.
2019-04-22 09:14:20 -07:00
Adrien Ferrand
a58ad22002 [Unix] Create a framework for certbot integration tests: PART 3e (#6951)
Following #6821, this PR continues to convert certbot integration tests into certbot-ci.

This PR add tests covering checks on L430-447 in tests/certbot-boulder-integration.sh. Previous lines are covered with existing tests, or by #6946, #6947, #6948, #6949.

* Add tests

* Change param

* Increase coverage min to 64%

* Disable OCSP Must-Staple test for Pebble
2019-04-17 15:24:39 -07:00
Jeremy Gillula
f5d0d4241f Added a CODE_OF_CONDUCT.md file so Github doesn't complain 2019-04-17 11:36:26 -07:00
Joona Hoikkala
0ee1002edc Clarify certbot-auto installation instructions (#6969) 2019-04-17 10:44:50 -07:00
Jeremy Gillula
7e5dcaa383 Adding the EFF Public Projects Code of Conduct to the contributing guide 2019-04-16 16:28:32 -07:00
Jeremy Gillula
24eb299a9b Added a link to the EFF Public Projects Code of Conduct to the readme. 2019-04-16 16:27:22 -07:00
Adrien Ferrand
410e74c4a1 [Unix] Create a framework for certbot integration tests: PART 3g (#6953)
Following #6821, this PR continues to convert certbot integration tests into certbot-ci.

This PR add tests covering checks on L531 to the end on tests/certbot-boulder-integration.sh. Previous lines are covered with existing tests, or by #6946, #6947, #6948, #6949, #6951, #6952.

* Add tests

* Add load resource

* Separate OCSP in two tests

* Copy new asset

* Load the asset

* Add coverage limit
2019-04-15 17:39:38 -07:00
Adrien Ferrand
298b1db36b [Unix] Create a framework for certbot integration tests: PART 3f (#6952)
Following #6821, this PR continues to convert certbot integration tests into certbot-ci.

This PR add tests covering checks on L448-530 in tests/certbot-boulder-integration.sh. Previous lines are covered with existing tests, or by #6946, #6947, #6948, #6949, #6951.

* Add tests

* Normalize paths

* Fix merge error in git
2019-04-15 16:42:06 -07:00
Adrien Ferrand
6bdc6435eb [Unix] Create a framework for certbot integration tests: PART 3d (#6949)
Following #6821, this PR continues to convert certbot integration tests into certbot-ci.

This PR add tests covering checks on L397-429 in tests/certbot-boulder-integration.sh. Previous lines are covered with existing tests, or by #6946, #6947 and #6948.

* Add tests

* Change a variable name

* Fix merge errors from git
2019-04-15 16:18:24 -07:00
Adrien Ferrand
b73c551f14 [Unix] Create a framework for certbot integration tests: PART 3c (#6948)
Following #6821, this PR continues to convert certbot integration tests into certbot-ci.

This PR add tests covering about renew, on L283-396 in tests/certbot-boulder-integration.sh (by including existing test_renew_files_permissions and test_renew_with_hook_scripts). Previous lines are covered with existing tests, or by #6946 and #6947.

* Add tests

* Correct assertion about world permission
2019-04-15 15:09:57 -07:00
Adrien Ferrand
471f8aecc0 [Unix] Create a framework for certbot integration tests: PART 3b (#6947)
Following #6821, this PR continues to convert certbot integration tests into certbot-ci.

This PR add tests covering on L268-282 in tests/certbot-boulder-integration.sh. Previous lines are covered with existing tests, or by #6946.

* Add tests

* Fix CSR generation

* Add dependency
2019-04-15 15:04:22 -07:00
Adrien Ferrand
3f0dc7c81c [Unix] Create a framework for certbot integration tests: PART 3a (#6946)
Following #6821, this PR continues to convert certbot integration tests into certbot-ci.

This PR add tests covering on L185-222 in tests/certbot-boulder-integration.sh.

* Add tests

* Correct some assertions
2019-04-15 14:59:45 -07:00
Brad Warren
d7610c1ae7 Update Fedora AMI (#6956)
* Update Fedora AMI to Fedora 28.

* Update initial version in test_leauto_upgrades.
2019-04-12 23:44:43 +02:00
Brad Warren
de84688844 Remove slash from path. (#6957) 2019-04-12 23:08:45 +02:00
Adrien Ferrand
d5de24d9fc [Windows] Security model for files permissions - STEP 2 (#6895)
This PR is the second part of #6497 to ease the integration, following the new plan propose by @bmw here: #6497 (comment)

This PR creates the module certbot.compat.os, that delegates everything to os, and that will be the safeguard against problematic methods of the standard module. On top of that, a quality check wrapper is called in the lint tox environment. This wrapper calls pylint and ensures that standard os module is no used directly in the certbot codebase.

Finally local oldest requirements are updated to ensure that tests will take the new logic when running.

* Add executable permissions

* Add the delegate certbot.compat.os module, add check coding style to enforce usage of certbot.compat.os instead of standard os

* Load certbot.compat.os instead of os

* Move existing compat test

* Update local oldest requirements

* Import sys

* Update account_test.py

* Update os.py

* Update os.py

* Update local oldest requirements

* Implement the new linter_plugin

* Fix local oldest for nginx

* Remove check coding style

* Update linter_plugin.py

* Add several comments

* Update the setup.py

* Add documentation

* Update acme dependencies

* Update certbot/compat/os.py

* Update docs/contributing.rst

* Update linter_plugin.py

* Handle os.path. Simplify checker.

* Add a comment to a reference implementation

* Update changelog

* Fix module registering

* Update docs/contributing.rst

* Update config and changelog
2019-04-12 13:32:51 -07:00
Brad Warren
9c54f3dec8 Add back used sys import. (#6954) 2019-04-12 21:33:17 +02:00
Joona Hoikkala
3a2e9ff1fa Try to restart httpd on Fedora if config check fails (#6941)
This PR adds a step to Apache plugin config_test when run on Fedora. Because Fedora now creates self signed certificate and related key material upon first startup of httpd. This was causing issues for users who run certbot-auto or install certbot (and mod_ssl) and run Certbot directly after.

Fixes: #6828

* Try to restart httpd on Fedora if config check fails

* Update CHANGELOG.md
2019-04-12 09:40:51 -07:00
Adrien Ferrand
2b1c77c1ca [Unix] Create a framework for certbot integration tests: PART 2 (#6821)
* Second part: integration tests for certbot core

* Specific coverages

* Add comments

* Improve names

* Suspend fail-under until complete coverage

* Implement a minimal functional example

* Update certbot-ci/certbot_integration_tests/certbot_tests/conftest.py

Co-Authored-By: adferrand <adferrand@users.noreply.github.com>

* Update certbot-ci/certbot_integration_tests/certbot_tests/context.py

Co-Authored-By: adferrand <adferrand@users.noreply.github.com>

* Update certbot-ci/certbot_integration_tests/certbot_tests/context.py

Co-Authored-By: adferrand <adferrand@users.noreply.github.com>

* Update certbot-ci/certbot_integration_tests/utils/misc.py

Co-Authored-By: adferrand <adferrand@users.noreply.github.com>

* Update certbot-ci/certbot_integration_tests/utils/misc.py

Co-Authored-By: adferrand <adferrand@users.noreply.github.com>

* Fist set of corrections after review

* Fix test and test deploy hook flag

* Improve an assertion, remove conftest

* Add a test to cover all assertions. Remove the CSR logic for now

* Update certbot-ci/certbot_integration_tests/utils/misc.py

Co-Authored-By: adferrand <adferrand@users.noreply.github.com>

* Update certbot-ci/certbot_integration_tests/utils/misc.py

Co-Authored-By: adferrand <adferrand@users.noreply.github.com>

* Update certbot-ci/certbot_integration_tests/utils/misc.py

Co-Authored-By: adferrand <adferrand@users.noreply.github.com>

* Update certbot-ci/certbot_integration_tests/utils/misc.py

Co-Authored-By: adferrand <adferrand@users.noreply.github.com>

* Some corrections

* Add the http-01 test to complete coverage

* Add a comment.

* Make single requirements

* Update certbot-ci/certbot_integration_tests/certbot_tests/context.py

Co-Authored-By: adferrand <adferrand@users.noreply.github.com>

* Revert "Some corrections"

This reverts commit 6f20a060e5.

# Conflicts:
#	certbot-ci/certbot_integration_tests/certbot_tests/context.py
#	certbot-ci/certbot_integration_tests/certbot_tests/test_main.py

* Clean join

* Update certbot-ci/certbot_integration_tests/certbot_tests/context.py

Co-Authored-By: adferrand <adferrand@users.noreply.github.com>

* Update certbot-ci/certbot_integration_tests/certbot_tests/context.py

Co-Authored-By: adferrand <adferrand@users.noreply.github.com>

* Change assertion name

* Rewrite http auth hook as real python scripts

* Correct output in some OS

* Try a direct execution

* Fix shebang

* Correct a script

* Update certbot config

* Call explicitly with python, to be cross platform compatible

* Avoid infinite loops. Improve documentation.

* Fix syntax
2019-04-11 18:07:36 -07:00