Commit graph

10412 commits

Author SHA1 Message Date
Brad Warren
397b3799d3 apache2 only 2022-02-23 15:14:21 -08:00
Brad Warren
0e75effa9c Cleanup scripts and switch to pyenv 2022-02-23 15:11:45 -08:00
Brad Warren
e2b7b62b98
remove test_sdists.sh (#9213)
The reason I want to do this is many of the targets of `test_sdists.sh` use Python 3.6 which [has reached its EOL](https://www.python.org/dev/peps/pep-0494/#lifespan). We could instead just stop running the test on these systems or install a newer version of Python 3 outside of OS packaging, but instead I decided to look into why we have these tests to begin with.

I introduced these tests many years ago in https://github.com/certbot/certbot/pull/4089 as a fix for https://github.com/certbot/certbot/issues/4044. Essentially the problem was the way packagers ran tests and the way we ran tests were slightly different. This difference could cause test failures when distros tried to run tests on our packages.

Since I did this, [we've switched to telling packagers to run tests using `pytest` like we do](5e76669c50/certbot/docs/packaging.rst (notes-for-package-maintainers)) and we've greatly reduced our reliance on OS packaging through things like `snap`.

Because of this, I think we should stop running this test, reducing our reliance on the heavy "test farm tests", and simplifying our CI pipeline. I think future problems here is quite unlikely and even if we have them, it should only affect tests on our non-primary distribution mechanisms which I think is a very minor concern.

When reviewing this PR, it's probably worth noting that I just replaced `targets.yaml` with the contents of `apache2_targets.yaml` since the Apache 2 tests are the only runs we're running with this change.
2022-02-23 15:10:48 -08:00
Brad Warren
5e76669c50
add another DEBIAN_FRONTEND=noninteractive (#9212) 2022-02-23 09:22:10 +11:00
Brad Warren
c3cb01d24a
Fixing hanging test farm tests (#9211)
[Our test farm tests started hanging last night](https://dev.azure.com/certbot/certbot/_build/results?buildId=5151&view=logs&j=23275d9a-33b0-57f8-5f28-197fe2e5b9cd&s=1dfbc15b-7d0f-52a9-b1da-b17592bf94f8). Running the tests locally, the cause was `apt-get install` raised an interactive prompt that wasn't handled well and caused the entire system to restart. Here's a [log of that](https://gist.github.com/fb80d0279306d08e4ffd744e559a3df2).

I fixed this by setting `DEBIAN_FRONTEND=noninteractive` as is commonly done in things like Dockerfiles to avoid this problem.
2022-02-22 13:19:48 -08:00
Brad Warren
c96420dbe0
remove outdated setup.cfg files (#9201) 2022-02-17 22:17:21 +11:00
Mads Jensen
6f85eb928c
Use literals wherever possible. (#9194)
* Use literals wherever possible.

These were found with flake8-comprehensions.
2022-02-14 14:54:03 -08:00
ohemorange
a1b2e973c0
Search included files for nginx server_names_hash_bucket_size directive (#9198)
* Search all included files for bucket directive

* Add tests for mod_config

* Update changelog

* Move changelog entry to the new release's section

* Break immediately once we've found the `http` block

Co-authored-by: alexzorin <alex@zorin.id.au>

* Add parallel descriptive comment about updating bucket directive

Co-authored-by: alexzorin <alex@zorin.id.au>

* remove github-inserted trailing whitespace

Co-authored-by: alexzorin <alex@zorin.id.au>
2022-02-11 15:40:14 +11:00
Will Greenberg
f14cefff18
Test revert setuptools pin (#9197)
* Revert setuptools-rust pin

This was a temporary workaround to fix
https://github.com/certbot/certbot/issues/9111, but it looks like the
the issue resolved itself

* Make mypy happy

There was an unused ignore statement, and Validator.certificate was
unnecessarily casting strings as bytes for an X509 digest method.

* Pin setuptools-rust to prevent build-dep hiccups in the future
2022-02-10 14:10:14 -08:00
alexzorin
9524a9fc16
Merge pull request #9196 from certbot/candidate-1.23.0
Update files from 1.23.0 release
2022-02-10 15:50:16 +11:00
Brad Warren
d73c6f44c5 Bump version to 1.24.0 2022-02-08 07:50:45 -08:00
Brad Warren
d655ab6913 Add contents to certbot/CHANGELOG.md for next version 2022-02-08 07:50:45 -08:00
Brad Warren
719f3ac577
Release 1.23.0 2022-02-08 07:50:44 -08:00
Brad Warren
69461bc15a Update changelog for 1.23.0 release 2022-02-08 07:49:47 -08:00
Mads Jensen
6c278c3352
Inline dict creation in _assert_valid_call. (#9190)
PyCharm has this check, and it's the only one it could find. It'll cut off valuable nanoseconds off the test suite run 😄
2022-02-04 09:57:21 -08:00
Patrik Hagara
d1608f8f2d
include py.typed marker files in distribution (#9187) 2022-02-04 18:29:26 +01:00
Mads Jensen
fe0c0dc3ae
Add support for revoking ecdsa keys without --cert-name. (#8725)
* Add support for revoking ecdsa keys without --cert-name.

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

* Move alg to acme_client.ClientNetwork instantiating in acme_from_config_key

* Fix argument for RS256/ES256

* Support also ES384 and ES512 signing algorithms.
2022-02-03 17:34:04 -08:00
Brad Warren
5b17a18355
CentOS & RHEL test farm fixes (#9188)
* update rhel 7 ami

* update bootstrap script

* update centos 8 image

* update centos 7 images

* add target comments
2022-01-31 15:52:43 -08:00
Adrien Ferrand
0181a0b07f
Fully type certbot apache (#9177)
* Work in progress

* Work in progress

* Work in progress

* Work in progress

* Fix issues around nullability of VirtualHost.path, may discuss that during review

* Work in progress

* Fix remaining types

* Various lint fixes

* Reconfigure tox and mypy to disallow untyped defs globally

* Cleanup compatibility tests

* Use cast for unused v2 logic

* Improve types

* Remove unused comment

* Fix coverage

* Better types

* Fix another type

* Update certbot-apache/certbot_apache/_internal/apacheparser.py

Co-authored-by: alexzorin <alex@zor.io>

* Update certbot-apache/certbot_apache/_internal/assertions.py

Co-authored-by: alexzorin <alex@zor.io>

* Fix type

* Various fixes

* Refactor imports

* Keep naming convention consistent on TypeVars

* Improve types

* Improve types

* Remove remaining Sequence[str] in the project

Co-authored-by: alexzorin <alex@zor.io>
2022-01-31 19:17:40 +11:00
Rick
fb1b105ba2
dns-digitalocean: Ignore SOA TTL in favor of explicit TTL argument (#9149)
* Ignore SOA TTL in favor of explicit TTL argument

`domain.ttl` should be `None` so that the `self.ttl` argument in 
`add_txt_record()` is not ignored (`domain.ttl` takes precedence).

* Document mitigation for dns-digitalocean ignoring the 30 second TTL.
2022-01-25 21:34:38 +11:00
Adrien Ferrand
dac0b2c187
Typed jose fields (#9073)
* Add generic methods to save some casts, and fix lint

* Update current and oldest pinning

* Fix classes

* Remove some todos thanks to josepy 1.11.0

* Cleanup some useless pylint disable

* Finish complete typing

* Better TypeVar names

* Upgrade pinning and fix some typing errors

* Use protocol

* Fix types in apache

Co-authored-by: Brad Warren <bmw@users.noreply.github.com>
2022-01-24 15:16:19 -08:00
alexzorin
7198f43008
apache: expose aug_save errors in the debug log (#9169)
Fixes #9168.

* apache: expose aug_save errors in the debug log

* logger arguments wrong way around

* log formatting

Co-authored-by: Brad Warren <bmw@users.noreply.github.com>
2022-01-24 09:33:11 -08:00
tJouve
fb564cddd9
Dns-google: update permissions needed in documentation (#9094)
* dns-google : Update account permission needed

Add permission for transaction creation => dns.managedZones.get
Add permission for RR removal transaction => dns.changes.list

* Add fix GCP Permission Changelog

* Update CHANGELOG.md
2022-01-24 18:17:43 +11:00
Adrien Ferrand
3d5defe28a
Deprecate Python 3.6 support (#9160)
Fixes https://github.com/certbot/certbot/issues/8983

Python 3.6 is now EOL: https://endoflife.date/python

This is normally a good time to create warnings about Python 3.6 deprecation the Certbot upcoming release 1.23.0 so that its support is removed in 1.24.0.

We have to say here that EPEL maintainers asked us to keep maintaining support of Python 3.6 because Python 3.7 will never be shipped to CentOS 7. This support would be needed in theory up to 2 more years, basically until CentOS 7 EOL in 2024-06-30. It has been said that we could support as a best effort until a reasonable need on Certbot side requires to drop Python 3.6. See https://github.com/certbot/certbot/issues/8983 for more information.

However some of us (including me) consider that there is already a reasonable need right now. Indeed, keeping the support on Python 3.6 while the Python community globally moves away from it will pin implicitly some Certbot dependencies to the last version of these dependencies supporting Python 3.6 as the upstream maintainers decide to make the move. At any point in a future time, one of these dependencies could require an urgent upgrade (typically a critical uncovered vulnerability): then we would require to drop Python 3.6 immediately without further notice instead of following an organized deprecation path.

This reason motivates to proactively deprecate then drop the Python versions once they are EOL. You can see the discussion in Mattermost starting from [this post](https://opensource.eff.org/eff-open-source/pl/ntzs9zy1fprjmkso3xrqspnoce) to get more elements about the reasoning.

* Deprecate Python 3.6 support.

* Ignore our own PendingDeprecationWarning
2022-01-21 12:42:05 -08:00
Mads Jensen
12442a2aca
Test coverage dns ecdsa (#9174)
* Added test coverage for ES256 signing keys in DNS challenges.

* pass tests

* Feedback
2022-01-21 20:29:53 +11:00
Mads Jensen
7d9e9a4900
Add typing to certbot.apache (#9071)
* Add typing to certbot.apache

Co-authored-by: Adrien Ferrand <ferrand.ad@gmail.com>
2022-01-21 10:15:48 +01:00
kevgrig
afc5be5abe
Add wildcard example (#9164)
* Add wildcard example

* Update wildcard example
2022-01-18 23:20:25 +01:00
Adrien Ferrand
16aad35d31
Fully type certbot-nginx module (#9124)
* Work in progress

* Fix type

* Work in progress

* Work in progress

* Work in progress

* Work in progress

* Work in progress

* Oups.

* Fix typing in UnspacedList

* Fix logic

* Finish typing

* List certbot-nginx as fully typed in tox

* Fix lint

* Fix checks

* Organize imports

* Fix typing for Python 3.6

* Fix checks

* Fix lint

* Update certbot-nginx/certbot_nginx/_internal/configurator.py

Co-authored-by: alexzorin <alex@zor.io>

* Update certbot-nginx/certbot_nginx/_internal/configurator.py

Co-authored-by: alexzorin <alex@zor.io>

* Fix signature of deploy_cert regarding the installer interface

* Update certbot-nginx/certbot_nginx/_internal/obj.py

Co-authored-by: alexzorin <alex@zor.io>

* Fix types

* Update certbot-nginx/certbot_nginx/_internal/parser.py

Co-authored-by: alexzorin <alex@zor.io>

* Precise type

* Precise _coerce possible inputs/outputs

* Fix type

* Update certbot-nginx/certbot_nginx/_internal/http_01.py

Co-authored-by: ohemorange <ebportnoy@gmail.com>

* Fix type

* Remove an undesirable implementation.

* Fix type

Co-authored-by: alexzorin <alex@zor.io>
Co-authored-by: ohemorange <ebportnoy@gmail.com>
2022-01-12 16:36:51 -08:00
Mads Jensen
30b066f082
Remove outdated pylint comments (#9167)
* Remove outdated pylint: disable=unused-import annotations.

* remove # pylint: disable=ungrouped-imports annotations.

* Remove single pylint: disable = unused-argument in DeleteIfAppropriateTest.test_opt_in_deletion.
2022-01-09 22:51:06 +01:00
Mads Jensen
7e5e51aeff
Use super().__init__ instead of explicitly calling named super-class. (#9166)
* Use super().__init__ instead of explicitly calling named super-class.

* Fix unittest (typo fix).
2022-01-09 22:50:44 +01:00
Mads Jensen
ed7964b424
Improve assertions in nginx and DNS plugin tests. (#9157)
* Improve assertions in nginx and DNS plugin tests.

* Use assertIs for asserting is True/False.
2022-01-04 23:59:58 +01:00
Adrien Ferrand
97a09dee19
Revert "Remove win2016 from Azure devops pipelines. (#9145)" (#9158)
This reverts commit dc66c87928.
2022-01-04 20:24:24 +11:00
Mads Jensen
a0dbe1e850
Improve assertions in certbot-apache tests. (#9131)
* Improve assertions in certbot-apache tests.

Replacements inspired by flake8-assertive.

* Fix test failures

* assertEqual is not for None :D

* Pass all tests :)
2022-01-03 22:05:21 +01:00
Mads Jensen
eeca208c8f
Various clean-ups in certbot-apache. Use f-strings. (#9132)
* Various clean-ups in certbot-apache. Use f-strings.

* Smaller tweaks
2022-01-02 00:27:47 +01:00
alexzorin
00f98fa911
letstest: bump ubuntu groovy to impish (#9155) 2022-01-02 00:23:24 +01:00
Mads Jensen
dc66c87928
Remove win2016 from Azure devops pipelines. (#9145)
From March 2022, support will be removed.
https://github.com/actions/virtual-environments/issues/4312
2022-01-02 00:22:52 +01:00
osirisinferi
93c2852fdb
Add show_account subcommand to retrieve account info from ACME server (#9127)
* Fetch and print account contacts from ACME server

* Add tests

* Add changelog entryAdd changelog entry

* Add account URI and thumbprint output

Only show these items when verbosity > 0

* Add test case for account URI and thumbprint

* Move changelog entry to new placeholder

* Add test for `cb_client.acme` (coverage)

* Address comments

* Update changelog

* Few small word changes

* Add server to error messages

* Remove phone contact parts
2021-12-27 19:12:52 +11:00
osirisinferi
a391a34631
Add appending behaviour of max-log-backups = 0 (#9146) 2021-12-22 08:20:01 +11:00
Brad Warren
1577cd8663
write docs on how to test release script (#9142)
Alexis (rightfully) wasn't sure how to test this when working on https://github.com/certbot/certbot/pull/9076. This PR documents it in the script based on what I wrote at https://github.com/certbot/certbot/pull/8351#issue-715227127 which I reverified.
2021-12-21 09:28:31 -07:00
Adrien Ferrand
89ccbccff0
Fully type all DNS plugins (#9125)
* Add types in all DNS plugins

* Order imports

* Fix type

* Update certbot-dns-route53/certbot_dns_route53/_internal/dns_route53.py

Co-authored-by: alexzorin <alex@zor.io>

* Clean up imports

Co-authored-by: alexzorin <alex@zor.io>
2021-12-14 12:38:14 +11:00
Adrien Ferrand
cb3e1403cd
Fully type certbot-compatibility-test (#9133)
* Finish typing the module

* Use cast

* Precise type
2021-12-14 12:14:11 +11:00
alexzorin
3353c0df43
tests: remove Boulder v1 endpoint from certbot-ci and azure (#9140) 2021-12-13 10:42:15 -08:00
Adrien Ferrand
97d9e2c97d
Fully type lock_test.py (#9126)
* Type lock_test.py

* Reconfigure tox

* Fix imports
2021-12-13 14:01:31 +11:00
Adrien Ferrand
89cefc177a
Fix --help output (#9130) 2021-12-11 12:58:33 +11:00
Brad Warren
8799b108c2
fix macos coverage (#9137) 2021-12-11 12:43:17 +11:00
Brad Warren
dab7864809
Add macOS instructions (#9136)
* add macOS instructions

* add integration test warning
2021-12-11 12:28:18 +11:00
Brad Warren
693c674a7e
Merge pull request #9128 from certbot/candidate-1.22.0
Release 1.22.0
2021-12-08 09:42:08 -07:00
Erica Portnoy
c02ead0f11 Bump version to 1.23.0 2021-12-07 14:03:51 -08:00
Erica Portnoy
d5ea9072af Add contents to certbot/CHANGELOG.md for next version 2021-12-07 14:03:51 -08:00
Erica Portnoy
6463a2e22d
Release 1.22.0 2021-12-07 14:03:50 -08:00