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

9227 Commits

Author SHA1 Message Date
Adrien Ferrand
bfd1ce97ef Add Adrien Ferrand to the authors list (#7119) 2019-06-04 11:37:54 -07:00
Thue
419ad7df1e Fix typo cerbot->certbot. (#7118) 2019-06-04 14:46:40 +02:00
Adrien Ferrand
889aeb31df Validate OCSP responses in case an explicit responder is designated (#7054)
* Validate OCSP response for responders that are not the certificate's issuer.

* Improve OCSP tests using a issuer/responder pair for OCSP responses

* Clean code

* Update ocsp_test.py

* Add various comments

* Add several cases of ocsp responder. More factories for the resilience tests.

* Update ocsp_test.py
2019-06-03 22:55:26 +03:00
Brad Warren
09b7d2f461 Configure the stale bot (#7108)
* Configure the stale bot.

* Add top level comment.

* except assignees

* Give warning about closing issues.
2019-06-03 10:25:23 -07:00
Brad Warren
18797dca79 Remove scripts that are never run. (#7111)
* Remove scripts that are never run.

* Update example in multitester.py docstring.
2019-06-03 10:20:20 +03:00
Brad Warren
31e81e7ae0 Add explanation of the purpose of test_tests.sh. (#7112)
This is one of the two action items from the conversation at https://opensource.eff.org/eff-open-source/pl/rno49hd6q7ba7dr18ph11njc6o.

Just to make sure I didn't make a typo, I ran this script with these changes and the tests still pass.
2019-05-31 18:09:17 -07:00
Brad Warren
4b06eeae64 Update Fedora AMI (#7102)
Fixes #6955.

This updates the Fedora version used in our test farm tests to Fedora 30. The AMI ID comes from https://alt.fedoraproject.org/cloud/ where it is listed as their standard HVM AMI for the region we use us-east-1 (US East (N. Virginia)).

Unfortunately, there were a lot of small changes required for this. The big reason for this is on Fedora, there isn't a Python 2 executable installed. In fact, there's not even an executable named python. It's just python3. Rather than installing another Python in each test, I wrote a script that the test scripts can share to figure out the different paths and names that should be used in their script. (This isn't used in test_sdists.sh because the logic is a little different.)

Other changes here worth flagging are:

I changed the name of the variable RUN_PYTHON3_TESTS in test_leauto_upgrades.sh to RUN_RHEL6_TESTS. The tests that are run when this variable is set test the upgrade from Python 2 to Python 3 on RHEL 6. I think this new name is much better now that we also have Fedora running Python 3.
I made tools/simple_http_server.py work on Python 3.
You can see tests passing with these changes at https://travis-ci.com/certbot/certbot/builds/113821476. I also ran test_tests.sh and they passed.

* Update to Fedora 30 in test farm tests.

Fedora 28 is likely to reach its EOL soon.

* Add set_python_envvars.sh.

* Fix test_apache2.sh on python3 only distros.

* Fix test_leauto_upgrades.sh on python3 systems.

* Fix certonly_standalone tests with python3 only

* Fix test_sdists.sh on python3 only distros.

* Make simple_http_server.py work on Python 3.

* add comments
2019-05-31 18:08:52 -07:00
Felix Lechner
641aba68b1 Ignore editor backups when running hooks. (#7109)
* Ignore editor backups when running hooks.

When processing hooks, certbot also runs editor backups even though
such files are outdated, clearly warranted correction and may quite
possibly be defective.

That behavior could lead to unexpected breakage, and perhaps even pose
security risks---for example, if a previous script was careless with
file permissions. As an aggravating factor, the backup runs after the
corrected version and could unintentionally override a fix the user
thought was properly implemented.

This commit causes editor backup files ending in tilde (~) to be
excluded when running hooks.

Additional information can be found here:

https://github.com/certbot/certbot/issues/7107
https://community.letsencrypt.org/t/editor-backup-files-executed-as-renewal-hooks/94750

* Add unit test for hook scripts with filenames ending in tilde.

* Provide changelog entry for not running hook scripts ending in tilde.

* Add Felix Lechner to the list of contributors.
2019-05-30 15:02:15 -07:00
Adrien Ferrand
926c8c198c Remove dependency on acme in certbot-ci (#7055)
Following discussion in #6947 (comment), I have second thoughts about relying on acme in certbot-ci.

Indeed, I think it is a good design to not rely in tests on the code you are testing. Obviously in unit tests it is very difficult, since most of the time the unit that is tested needs input generated by other part of the code. However it is not really a problem in a unit test, as its purpose is to make assertions about a specific portion of the code, not the others parts.

In the scope of integration tests, the software tested is treated as a black box. In this case, having some parts of the test logic that use in fact part of the code in the black box, increase the risk that some assertions compared two results coming from the same flawed logic from the tested software.

Since using acme in certbot-ci is only saving few lines of code, I think it does not worth the risk and the added complexity to declare acme as a dependency. I prefer to duplicate these lines and keep certbot-ci free of any dependency coming from the certbot project.
2019-05-30 07:09:09 -07:00
Pete Cooper
4c299be965 Update docs/cli-help.txt -- typo and formatting (#7105)
* Update docs/cli-help.txt -- yypo and formatting

'areusing' -> 'are using'

* Update cli.py -- formatting

See https://github.com/certbot/certbot/pull/7105

Addresses https://github.com/certbot/certbot/pull/7105#issuecomment-497079342
2019-05-29 14:16:16 -07:00
Brad Warren
561534b754 Move IRC notifications to #certbot-devel. (#7098)
* Move IRC notifications to #certbot-devel.

* Don't use notice.
2019-05-29 09:54:26 +03:00
Adrien Ferrand
7d35f95293 Avoid to delete both webroot_map and webroot_path (#7095)
* Always restore webroot_path in renewal config.

* Add unit tests to ensure correct behavior

* Add changelog

* Add certbot as modified package
2019-05-28 15:16:12 -07:00
Brad Warren
d2a2b88090 Update Ubuntu AMI to 19.04. (#7099) 2019-05-28 23:36:10 +02:00
Brad Warren
bf818036eb Revert "Fix unpinned dependencies tests towards botocore and urllib3 (#7081)" (#7101)
This reverts commit 51a7e7cd19.
2019-05-25 00:20:54 +02:00
Brad Warren
8b684e9b95 Enable test farm tests in Travis (#7072)
You can see the full test suite running at https://travis-ci.com/certbot/certbot/builds/112291892.

A few noteworthy things:

--fast is included because without, the tests would sometimes reach Travis' 50 minute timeout even with 1 test script per Travis build.
The only script that is run at release time which is not being run here is https://github.com/certbot/certbot/blob/master/tests/letstest/scripts/test_tests.sh because that script runs tests on the packages installed by certbot-auto which won't be updated until midway through a release.
We check TRAVIS_PULL_REQUEST and error out if it is not false for simplicity which should be fine because these tests are never run on PRs. The reason it's more complex to run test farm tests on PRs is the test farm tests need a named branch to pull from and Travis effectively merges the PR into the target branch before running tests complicating this.
I don't think this should block this PRs, but the one final change we may want to make to the current setup is #7071.

* Add encrypted private key.

* Add test farm tests to tox and travis.

* Change magic profile name.

* Further split test farm tests.

* Build local branch.

* more depth
2019-05-17 16:30:20 -07:00
Adrien Ferrand
51a7e7cd19 Fix unpinned dependencies tests towards botocore and urllib3 (#7081)
* Limit transitive dependency on urllib3 to <1.25 to fulfill requirements in certbot-dns-route53 throught botocore dependency.
2019-05-17 14:50:29 -07:00
Brad Warren
d1753e46f9 Allow magic profile name none for configuring test farm tests. (#7069)
* Allow magic profile name none.

* Naming is hard.
2019-05-17 20:40:20 +02:00
Brad Warren
16834a0d78 Stop sharing state between processes in test farm tests (#7057)
* Set LOGDIR at top of script.

* Set sentinel at top of script.

* Don't use EC2 global to block on instance start.

* Remove global boto3 state.

* Pass in boulder_url.

* Create main function.

* Add link to reload docs.
2019-05-17 20:36:58 +02:00
Brad Warren
11c3e7107c Exit with a nonzero status when tests fail. (#7065) 2019-05-17 19:44:51 +02:00
Brad Warren
6bcd0415e0 Fix race condition adding tags to instance. (#7080) 2019-05-17 11:27:40 +02:00
Brad Warren
7a6545b747 Regularly print output in the test farm tests (#7079)
* Occasionally print output in test farm tests.

* Flush output.
2019-05-17 11:21:57 +02:00
Brad Warren
f4bbaadd18 Fix cleanup on failure. (#7070)
* Fix cleanup on failure.

* Incrementally build instances list.
2019-05-17 11:17:27 +02:00
Brad Warren
f8614e7c04 Fix centos6 test_sdists (#7068)
* Use Python 3 when appropriate.

* fix venv path
2019-05-17 11:03:00 +02:00
Brad Warren
def9af9f5e Update known good apache2 targets. (#7067) 2019-05-17 10:49:06 +02:00
Brad Warren
26d01537cb Add test farm tests requirements file (#7061)
* Add requirements.txt.

* update readme
2019-05-17 10:41:11 +02:00
Andreas Vogler
7cfbeaeac8 Added certbot-dns-rfc2136 to list of changed modules in CHANGELOG (#7074)
* Add an option to dns_rfc2136 plugin to explicitly specify an authorative base domain.

* Updated CHANGELOG mentioning added base domain option

* Made the comment on the new option more clear on auto-detection

* Updated comment on how the authorative base domain is determined

* Added certbot-dns-rfc2136 to list of changed modules in CHANGELOG
2019-05-16 13:06:29 +02:00
Andreas Vogler
5ab6a597b0 Add an option to dns_rfc2136 plugin to specify an authorative base domain. (#7029)
* Add an option to dns_rfc2136 plugin to explicitly specify an authorative base domain.

* Updated CHANGELOG mentioning added base domain option

* Made the comment on the new option more clear on auto-detection

* Updated comment on how the authorative base domain is determined
2019-05-16 10:40:17 +02:00
Adrien Ferrand
9a7f774706 [Unix] Create a framework for certbot integration tests: PART 5-FINAL (#6989)
* Connect certbot-ci to travis. Remove old bash files.

* Configure test-everything

* Protect against import error

* Remove unused ignore

* Better handling of urllib3

* Correct path

* Remove a warning

* Correct call

* Protect atexit register execution

* Update docs/contributing.rst

Co-Authored-By: Brad Warren <bmw@users.noreply.github.com>

* Update docs/contributing.rst

Co-Authored-By: Brad Warren <bmw@users.noreply.github.com>

* Add again some bash scripts to avoid breaking to much retro-compatiblity on third party scripts

* Move boulder-v1 and boulder-v2 in nightly tests

* Separate oldest unit tests and oldest integration tests

* Remove try/except

* Test integration included in toxenv

* Add a wait to avoid a transient issue on OCSP status in oldest tests

* Clean travis.yml, split other tests

* Remove useless config

* Update .travis.yml

Co-Authored-By: Brad Warren <bmw@users.noreply.github.com>

* Update tox.ini

* Update tox.ini

* Remove pytest-sugar

* Remove empty pytest.ini, tests are working without it
2019-05-14 13:56:32 -07:00
Brad Warren
2abe39d8a2 Add legalese around MM instance. (#7064) 2019-05-14 13:28:23 -07:00
Adrien Ferrand
3888bc8f2a Revert " Add FreeBSD specific paths (#6702)" (#7056)
Revert #6702

After some discussions, we realized that changing the path for FreeBSD users, if it corresponds to the path used when Certbot is installed using ports, will break for users that installed it through certbot-auto.

Indeed in this case, the path used was the one for Linux. After #6702, Certbot would not find anymore the existing config path by default.

It would require, to be integrated, a proper documentation and a migration path. For now, it is preferable to revert it.

This reverts commit 7fe82cf1ac.
2019-05-13 13:55:22 -07:00
Po-Chuan Hsieh
7fe82cf1ac Add FreeBSD specific paths (#6702)
* Add support for FreeBSD specific paths

Reference:	https://svnweb.freebsd.org/ports/head/security/py-certbot/files/patch-certbot_compat.py

* Add CHANGELOG.md entry

* Fix linting error

Pointed out by:	@adferrand
2019-05-11 08:13:37 +02:00
Brad Warren
d391fb8876 Merge pull request #7044 from certbot/candidate-0.34.2
Candidate 0.34.2
2019-05-07 15:03:03 -07:00
ohemorange
60bf8edc79 Merge branch 'master' into candidate-0.34.2 2019-05-07 14:51:17 -07:00
Erica Portnoy
ccedde088d Bump version to 0.35.0 2019-05-07 12:52:34 -07:00
Erica Portnoy
c3a395e7c5 Add contents to CHANGELOG.md for next version 2019-05-07 12:52:34 -07:00
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
a754a90940 Fix test_leauto_upgrades.sh on CentOS 6. (#7037) 2019-05-06 16:50:03 -07:00
ohemorange
f56fad59c9 Merge pull request #7036 from certbot/candidate-0.34.1-2
Candidate 0.34.1-2
2019-05-06 16:24:47 -07:00
Brad Warren
b86f553586 Merge branch 'master' into candidate-0.34.1-2 2019-05-06 15:56:22 -07:00
Adrien Ferrand
71b1b8c2d9 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
2019-05-06 15:49:47 -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
0baefcae32 Bump version to 0.35.0 2019-05-06 13:28:23 -07:00
Erica Portnoy
115ed0e10b Add contents to CHANGELOG.md for next version 2019-05-06 13:28:23 -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
Adrien Ferrand
6a970f74d0 Try another approach (#7022)
In #7019, a solution has been integrated to fix oldest tests execution in the corner cases described in #7014.

However this solution was not very satisfactory, as it consists in making a --force-reinstall for all requirements on each oldest tests (apache, certbot, acme, each dns plugin ...). As a consequence, the overall execution time of these tests increased from 5 min to 10 min.

In this PR I propose a more elegant solution: instead of reinstalling all dependencies, we force reinstall only the requirements themselves describe in the relevant oldest-requirements.txt files. This way only the packages that are potentially ignored by pip because they exists locally (acme, certbot, ...) are reinstalled.

The result is the same than in #7019 (we are sure that all packages are really installed by pip), but the very limited number of force reinstalled package here make the impact on execution time negligible.

As a consequence, I revert back also the tox environments to execute all oldest tests together.

A successful execution of oldest tests using this PR material in the context of a point release can be seen here: https://travis-ci.org/adferrand/certbot/builds/527513101
2019-05-02 15:17:11 -07:00
Brad Warren
4bf6eb2091 Update changelog for 0.34.1. (#7021) 2019-05-02 14:52:36 -07:00