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

10392 Commits

Author SHA1 Message Date
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 v1.22.0 2021-12-07 14:03:50 -08:00
Erica Portnoy
d6adc4a2d0 Update changelog for 1.22.0 release 2021-12-07 14:02:45 -08:00
Mads Jensen
402f18e039 Apache augeas clean up (#9114)
The `# self.comment = comment` caught my eye while working on #9071 as well as the intermediate variables, which aren't really needed. As a result, I reformatted the code slightly in those places.

* Remove comment in AugeasCommentNode.__init__

* Replace some intermediate varibles with return-statements in apache augeas parser.

* more clean-up
2021-12-02 08:45:16 -07:00
Adrien Ferrand
aeb7beb1b1 Fully type certbot-ci module (#9120)
* Fully type certbot-ci module

* Fix lint, focus lint

* Add trailing comma

* Remove unused private function

* Type properly for future usages

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

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

* Cleanup files

* Fix import

* Fix mypy and lint

Co-authored-by: alexzorin <alex@zor.io>
2021-11-30 08:24:39 +11:00
moratori
0d10a44f4b Added --issuance-timeout command line option (#9056)
* Added --issuance-timeout command line option

* clarification of command line option name,docstring and add tests

* fix test case for python36

* improved the command line options
2021-11-30 08:17:06 +11:00
Adrien Ferrand
86406ab63a Add type annotations to the certbot package (part 4) (#9087)
* Extract from #9084

* Cast/ignore types during the transition

* Remove useless casts and type ignore directives

* Fix lint

* Fix a cast

* Mandatory typing for certbot packages

* Update certbot/certbot/_internal/plugins/disco.py

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

* Remove unused type import

* Fix iterator type

* Fix type

* Fix types in selection

Co-authored-by: alexzorin <alex@zor.io>
2021-11-26 09:00:03 +11:00
Aaron Gable
7d3a344d43 Update py cryptography to >=2.5.0 (#9110)
* Update py cryptography to >=2.5.0

* Review feedback
2021-11-24 14:46:11 -08:00
Adrien Ferrand
250d7b1542 Add type annotations to the certbot package (part 3) (#9086)
* Extract from #9084

* Cast/ignore types during the transition

* Fix after review

* Fix lint

* Update certbot/certbot/_internal/storage.py

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

* Update certbot/certbot/_internal/storage.py

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

* Update certbot/certbot/_internal/main.py

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

* Update certbot/certbot/_internal/main.py

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

* Update certbot/certbot/_internal/client.py

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

* Update certbot/certbot/_internal/client.py

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

* Update certbot/certbot/_internal/auth_handler.py

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

* Update certbot/certbot/_internal/auth_handler.py

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

* Update certbot/certbot/_internal/auth_handler.py

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

* Remove a cast usage

* Fix import

* Remove now useless cast

* Update certbot/certbot/_internal/client.py

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

Co-authored-by: alexzorin <alex@zor.io>
2021-11-25 07:47:36 +11:00
Adrien Ferrand
19147e1b8c Add type annotations to the certbot package (part 2) (#9085)
* Extract from #9084

* Cast/ignore types during the transition

* Clean up

* Fix assertion

* Update certbot/certbot/display/ops.py

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

* Use sequence

* Improve documentation of "default" in display

* Fix contract

* Fix types

* Fix type

* Fix type

* Update certbot/certbot/display/ops.py

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

Co-authored-by: alexzorin <alex@zor.io>
2021-11-24 18:33:09 +11:00
Brad Warren
d1821b3ad7 Pin back setuptools-rust (#9112)
* pin back setuptools-rust

* make pylint happy

This was taken from https://github.com/certbot/certbot/pull/9073.

* pin back josepy

* Apply lint's code style suggestions

* fix lint again

Co-authored-by: Erica Portnoy <ebportnoy@gmail.com>
2021-11-23 12:35:49 -08:00
Paul Kehrer
267fb94478 Remove use of deprecated verifier with cryptography (#9105)
This was deprecated in version 2.1 and cryptography will be
removing it soon. The replacement function is available in all
versions of cryptography that certbot supports (2.1+)
2021-11-23 10:18:22 -08:00
alexzorin
6766786049 Fix Windows webroot crash when multiple domains have the same webroot (#9108)
* Certificate issuing on Window while having web.confing and more then one domain in request

* add a test

* update changelog

Co-authored-by: Serghei Trufkin <Serghei.Trufkin@Technosoft.md>
2021-11-22 19:00:55 +01:00
alexzorin
d2578e05e7 docs: describe how to modify renewal config (#9014)
* docs: describe how to modify renewal config

* Apply suggestions from code review

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

* reword warning about manual modifications

* explain the flags in the --force-renewal command

Co-authored-by: ohemorange <ebportnoy@gmail.com>
2021-11-18 12:14:10 -08:00
alexzorin
2746fc572f webroot: unset existing mime type in web.config (#9092) 2021-11-15 14:35:18 +11:00
Adrien Ferrand
d20e42562c Add type annotations to the certbot package (part 1) (#9084)
* Extract from #9084

* Cast/ignore types during the transition

* Fix after review

* Fix lint
2021-11-12 14:27:46 +11:00
alexzorin
4756b66089 docs: update intersphinx url for certbot project (#9096) 2021-11-11 09:44:59 +01:00
Brad Warren
e8265dbf9c Add Python 3.10 support and tests (#9077)
Fixes https://github.com/certbot/certbot/issues/9058.

The changes to the CI config are equivalent to the ones made in https://github.com/certbot/certbot/pull/8460.

Other than ignoring some warnings raised by botocore, the main additional work that had to be done here was switching away from using `distutils.version.LooseVersion` since the entire `distutils` module was deprecated in Python 3.10. To do that, I took a few different approaches:

* If the version strings being parsed are from Python packages such as Certbot or setuptools, I switched to using [pkg_resources.parse_version](https://setuptools.pypa.io/en/latest/pkg_resources.html#parsing-utilities) from `setuptools`. This functionality has been available since [setuptools 8.0 from 2014](https://setuptools.pypa.io/en/latest/history.html#id865).
* If the version strings being parsed are not from Python packages, I added code equivalent to `distutils.version.LooseVersion` in `certbot.util.parse_loose_version`.
* The code for `CERTBOT_PIP_NO_BINARY` can be completely removed since that variable isn't used or referenced anywhere in this repo.

* add python 3.10 support

* make some version changes

* don't use looseversion in setup.py

* switch to pkg_resources

* deprecate get_strict_version

* fix route53 tests

* remove unused CERTBOT_PIP_NO_BINARY code

* stop using distutils in letstest

* add unit tests

* more changelog entries
2021-11-08 15:55:32 -08:00
orangepizza
b1edda8a65 fix a typo in gen_ss_cert type hint (#9089) 2021-11-07 14:18:15 +11:00
Brad Warren
81d5d2b421 Pin readthedocs deps (#9083)
* pin readthedocs deps

* fix reqs path
2021-11-04 20:35:44 +11:00
alexzorin
8f8dd2824e Merge pull request #9082 from certbot/candidate-1.21.0
Update files from 1.21.0 release
2021-11-04 12:41:05 +11:00
Brad Warren
9740f5428e Bump version to 1.22.0 2021-11-02 14:28:34 -07:00