Commit Graph
11412 Commits
Author SHA1 Message Date
ohemorangeandGitHub 6fd6a541d4 Remove internal comments from server_names directive (#10147)
Fixes https://github.com/certbot/certbot/issues/7090
2025-02-24 10:54:58 -08:00
Jonathan VanascoandGitHub cda56361ad Fix deprecate pyopenssl (#10186)
Uploading for tests;

These deprecations are a precursor to #10174 

In addition to the previously discussed `acme` functions, the `certbot`
functions were deprecated as they are primarily used for testing and
support. Marking them deprecated now will allow them to be removed in
the next major release, as they will no-longer be used.
2025-02-24 10:54:17 -08:00
d3aceba188 [TOOLING] Add Automation for When a PR or Issue is Assigned (#10191)
Adding automation for team triage meetings for when PRs or Issues are
assigned. You can see an example in the "Test" channel.

---------

Co-authored-by: ohemorange <erica@eff.org>
2025-02-14 14:58:00 -08:00
8524255a2e [REPO] Create New Issue Template with Updated Strcuture (#10172)
Playing around with the new [issue template
structure](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms).

If you'd like to test it out:
https://github.com/zoracon/zoracon/issues/new?template=bug.yml

---------

Co-authored-by: ohemorange <ebportnoy@gmail.com>
Co-authored-by: ohemorange <erica@eff.org>
2025-02-14 14:50:20 -08:00
Osiris InferiandGitHub a32fc2d6f0 Example explanation for standalone authenticator in cli.ini mentions incorrect port (#9951)
The standalone authenticator doesn't use port 443, so the comment in the
`cli.ini` example also shouldn't say so.
2025-02-13 14:26:06 -08:00
ohemorangeandGitHub a24f14d48f Be consistent with checking capitalization in rfc2136 plugin (#10188)
Fixes https://github.com/certbot/certbot/issues/10177.

We were using `.upper()` when validating the config but not when
actually creating the object. Now we call it in both places. I updated a
test to work as a regression test here.
2025-02-12 21:42:00 -08:00
ohemorangeandGitHub 3ab9bf9f39 Release 3.2.0 (#10187)
This should be merged, not squashed!
2025-02-11 15:32:51 -08:00
Will Greenberg 4708012b2d bump changelog to 4.0.0 2025-02-11 15:18:54 -08:00
Will Greenberg 8a2ded2d0e psych, actually bump version to 4.0.0 2025-02-11 15:17:56 -08:00
Will Greenberg 77594d7300 Bump version to 3.3.0 2025-02-11 11:58:46 -08:00
Will Greenberg fa9cd61066 Add contents to certbot/CHANGELOG.md for next version 2025-02-11 11:58:46 -08:00
Will Greenberg a6d8c467f0 Remove built packages from git 2025-02-11 11:58:45 -08:00
Will Greenberg a0e8b49057 Release 3.2.0 v3.2.0 2025-02-11 11:58:44 -08:00
Will Greenberg 3272dcbebd Update changelog for 3.2.0 release 2025-02-11 11:57:39 -08:00
Ted StrzalkowskiandGitHub 3395dce319 Add ClouDNS to documentation (#9879)
There is a ClouDNS plugin actively maintained that should be included in
the documentation for discoverability by users.
2025-02-11 10:56:58 -08:00
Trinopoty BiswasandGitHub ad29d5fbcf Remove support for Linode API v3 (#10062)
The v3 api was sunset at the end of July 2023. This PR cleans up code
related to api v3.

## Pull Request Checklist

- [ ] The Certbot team has recently expressed interest in reviewing a PR
for this. If not, this PR may be closed due our limited resources and
need to prioritize how we spend them.
- [ ] If the change being made is to a [distributed
component](https://certbot.eff.org/docs/contributing.html#code-components-and-layout),
edit the `main` section of `certbot/CHANGELOG.md` to include a
description of the change being made.
- [ ] Add or update any documentation as needed to support the changes
in this PR.
- [ ] Include your name in `AUTHORS.md` if you like.
2025-02-11 10:25:28 -08:00
de48847af4 Require v2.19 of cloudflare's python library (#10182)
This is a stopgap measure until we upgrade to the newer (but
backwards-incompatible) versions of cloudflare's python library (see
#9938)

---------

Co-authored-by: Brad Warren <bmw@users.noreply.github.com>
2025-02-06 19:29:07 +00:00
ohemorangeandGitHub a57b29a276 [apache] Add type hints to apache configurator for mypy --strict (#10155)
I don't love the `Any` in that `Callable`, but I can't find a way to fix
it. In practice, it's either going to be `str` or `None`, but we pass an
`options` that's typed as `List[str] | str | None`, and one of the
functions has a header with a strict `str`. I tried various unions of
things and it wasn't working and I decided it's not worth it.

```
$ mypy --strict certbot-apache/certbot_apache/_internal/configurator.py 
Success: no issues found in 1 source file
```
2025-02-06 10:54:10 -08:00
ohemorangeandGitHub 9989e7b82f Remove unneeded casts now that Addr.fromstring can't be None (#10167)
Now that https://github.com/certbot/certbot/pull/10162 is in
2025-02-06 10:53:22 -08:00
ohemorangeandGitHub aafe7ba2f9 Update to latest poetry-plugin-export to fix urllib3 multiple versions issue and unpin urllib3 (#10169)
We can use modern urllib3 now! They
[fixed](https://github.com/python-poetry/poetry-plugin-export/pull/286)
the poetry
[issue](https://github.com/python-poetry/poetry-plugin-export/issues/183)
and shipped it!

Since this PR updates the requirements file, it pulls in the new
`josepy` release, so I've silenced those warnings here. If I should do
that in a separate PR lmk.
2025-02-05 17:14:25 -08:00
Brad WarrenandGitHub 87e5dcbc83 update ocsp api (#10181)
this does the simple and more urgent fix described in
https://github.com/certbot/certbot/issues/10053. i created
https://github.com/certbot/certbot/issues/10180 to track fixing up our
tests to generally help prevent this kind of problem in the future
2025-02-05 14:08:14 -08:00
Brad WarrenandGitHub 2535a7bb29 fix mypy on 3.9 (#10179)
in
https://github.com/certbot/certbot/pull/10160/files#diff-f14c5058a01d9c9f8e0215ae6378c1d99fcfe2dd71d5cea207a7d610b31c149bR123
we used the nice & clean `|` syntax for unions but this caused tests to
fail for me locally where i was using python 3.9. this fixes that using
the same approach as was used in
https://github.com/certbot/certbot/pull/10178

i think we want this regardless, but by the same logic as
https://github.com/certbot/certbot/commit/a00e34345993f0724a05cc2dd0f6e8ea6a4299a5,
i think we could consider deprecating & dropping python 3.9 support
early
2025-02-05 12:15:27 -08:00
ohemorangeandGitHub e32f4fc5fb Allow http block inclusion at top-level nginx.conf (#10178)
Fixes #9928.

Thanks to @vanviethieuanh for tracking down the source of the issue!
2025-02-04 11:15:17 -08:00
ohemorangeandGitHub b5f7fe179e Avoid trailing dot on link problem (#10173)
Fixes https://github.com/certbot/certbot/issues/9964.

Decided not to be fancy and just throw a newline in there.

```
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at:
https://letsencrypt.org/documents/LE-SA-v1.4-April-3-2024.pdf
You must agree in order to register with the ACME server. Do you agree?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: 
```
2025-02-03 08:50:18 -08:00
AlexisandGitHub 2ae7f83e2a [REPO] Modify Stalebot Labels for Better Filters (#10171)
- Better labels upon an issue going stale will help triage better. There
other PRs with "needs update" that are manually put and therefore we
can't explicitly filter for stalebot.
- For management purposes, being able to view how many issues are
auto-closed helps as well.
2025-01-31 15:23:10 -08:00
935855b751 Enable strict mypy for certbot-ci/certbot_integration_tests (#10168)
Co-authored-by: Brad Warren <bmw@eff.org>
2025-01-31 02:32:27 +00:00
ohemorangeandGitHub 0dedef801a Run mypy with --strict on modules that are ready for it (#10166) 2025-01-30 23:11:31 +00:00
ohemorangeandGitHub d5cb89ba13 [apache] Add type hints to apache test utils (to enable mypy --strict) (#10151)
We could also leave the `jose.JWKRSA` call as-is and add
`--implicit-reexport`, or explicitly export `JWKRSA` in `josepy`, but I
think just cleaning the calls up is nice.

```
$ mypy --strict certbot-apache/certbot_apache/_internal/tests/util.py
Success: no issues found in 1 source file
```
2025-01-29 15:10:31 -08:00
ohemorangeandGitHub 04f3072399 Ignore sublime project files (#10165) 2025-01-29 13:26:44 -08:00
Brad WarrenandGitHub 392467609f add python 3.13 support (#10164)
fixes https://github.com/certbot/certbot/issues/10045. this is based on
the PR that did this for 3.12 at
https://github.com/certbot/certbot/pull/9852

this PR also removes python 3.8 from our tox config which should have
been done as part of https://github.com/certbot/certbot/pull/10077
2025-01-29 12:53:56 -08:00
ohemorangeandGitHub 7661dbaf82 Enable strict typing in certbot-dns-google (#10160)
```
$ mypy --strict certbot-dns-google/certbot_dns_google
Success: no issues found in 5 source files
```


I can change the `setattr`s to `# type: ignore [method-assign,
unused-ignore]` if that's preferred.
2025-01-28 16:53:38 -08:00
ohemorangeandGitHub 014e554f70 Enable strict typing in certbot-dns-cloudflare (#10157)
```
$ mypy --strict certbot-dns-cloudflare/certbot_dns_cloudflare
Success: no issues found in 5 source files
```

If we do `type: ignore` but don't set `--strict`, mypy gets mad. Flake8
doesn't like this but luckily we don't use that here (yet?). The other
option is to add `# type: ignore [method-assign, unused-ignore]`; I can
change it to that if that's preferred.
2025-01-28 16:46:18 -08:00
ohemorangeandGitHub f5bfe543ff Enable strict typing in certbot-dns-rfc2136 (#10159)
```
$ mypy --strict certbot-dns-rfc2136/certbot_dns_rfc2136
Success: no issues found in 5 source files
```

`dnspython` would be perfectly happy to accept a string once the
algorithm is passed through, but our `_RFC2136Client` object will only
accept `dns.name.Name` objects, so let's make it happy.
2025-01-28 16:43:28 -08:00
ohemorangeandGitHub e8cc2df316 [nginx] Add type hints to nginx configurator for mypy --strict (#10156)
Decided that imports should be in ascii, not caseless, order. If we've
done otherwise elsewhere I'll change it.

The cast isn't the best but that's what we get for using a dict holding
various objects -- the thing marked by `vhost` is going to be a
virtualhost so 🤷

`re.findall` can
[return](https://docs.python.org/3/library/re.html#re.findall) either a
list of strings or a list of tuples of strings, depending what you
specify in the regex. In our case it's going to be a list of strings.
2025-01-28 16:42:08 -08:00
ohemorangeandGitHub f94c981dfd [apache] Add type hints to apache obj and http_01 for mypy --strict (#10154)
```
$ mypy --strict certbot-apache/certbot_apache/_internal/http_01.py 
Success: no issues found in 1 source file
$ mypy --strict certbot-apache/certbot_apache/_internal/obj.py 
Success: no issues found in 1 source file
```

PEP 526 says to declare types of unpacked tuples beforehand:
https://peps.python.org/pep-0526/#global-and-local-variable-annotations.
Could have just declared it in apache, but improved the acme return type
while I was at it.

Once again, `typing.Pattern` is deprecated in favor of `re.Pattern` so
changing that while parametrizing the type
2025-01-28 16:33:12 -08:00
Brad WarrenandGitHub f0f3cdad9c fixup fromstring return types (#10162)
in https://github.com/certbot/certbot/pull/9124 we had the problem of
certbot-nginx's `Addr.fromstring` method possibly returning None which
is not possible in the `Addr` method in the certbot base class or in
certbot-apache. we fixed this by telling mypy the common
`Addr.fromstring` method returns an `Optional[Addr]` (despite it
actually always returning an `Addr`) and then unnecessarily complicating
certbot-apache's code a bit. the need for extra complexity with this
approach is going even further in
https://github.com/certbot/certbot/pull/10151 where we have to use
`cast` to assure mypy that the type isn't actually `Optional`. i
personally don't like all this
2025-01-28 16:29:52 -08:00
6f46e1be15 Improve help output for default-None constants (#10149)
Fixes #10000.

To create this PR, I looked through `constants.py` for defaults set to
`None`. If the action for the cli flag was `store_true` and there wasn't
other custom manual default specification, I changed it to report
`False`, and added a comment in `constants.py`. Adding `(default:` in
the help text suppresses listing of the actual default (done by
`cli_utils.py:CustomHelpFormatter`). Also added a comment for `redirect`
which is described manually since I noticed it while I was going
through.

---------

Co-authored-by: Brad Warren <bmw@users.noreply.github.com>
2025-01-28 23:41:02 +00:00
ohemorangeandGitHub ec3330ee0c Enable strict typing in certbot-dns-digitalocean (#10158)
If we do `type: ignore` but don't set `--strict`, mypy gets mad. Flake8
doesn't like this but luckily we don't use that here (yet?). The other
option is to add `# type: ignore [method-assign, unused-ignore]`; I can
change it to that if that's preferred.

```
$ mypy --strict certbot-dns-digitalocean/certbot_dns_digitalocean
Success: no issues found in 5 source files
```
2025-01-28 11:04:08 -08:00
ohemorangeandGitHub e657cc3a8d [apache] Add type hints to apache parser.py (to enable mypy --strict) (#10152)
```
$ mypy --strict certbot-apache/certbot_apache/_internal/parser.py 
Success: no issues found in 1 source file
```

`typing.Pattern` is deprecated in python 3.9 in favor of using
`re.Pattern` directly, and also wants to be subscripted with its type.

`python-augeas` types can be found in
https://github.com/hercules-team/python-augeas/blob/a1e84a7e58e535658f681731b66eca7b71c095a2/augeas/__init__.py
2025-01-28 10:54:11 -08:00
ohemorangeandGitHub a46db66371 Enable strict typing in certbot-dns-route53 (#10161)
Using the `ignore` syntax this time!

```
$ mypy --strict certbot-dns-route53/certbot_dns_route53
Success: no issues found in 5 source files
```
2025-01-28 10:53:27 -08:00
d98edd97ad Preserve IP addresses when adding ssl listen directives in nginx server blocks (#10145)
Fixes #10011

When we take a server block with no ssl addresses in and and enable ssl,
if it has any listens on the http port, use those host addresses when
creating a directive to listen on ssl. Addresses with no port and on
other ports will be ignored.

---------

Co-authored-by: Will Greenberg <willg@eff.org>
2025-01-28 10:52:06 -08:00
ohemorangeandGitHub 70ba4f2438 Run directory hooks during commands other than renew (#10146)
Partially fixes #9869. Fixes #9978.
2025-01-28 10:20:17 -08:00
ohemorangeandGitHub 9d049723c2 Enable mypy strict equality checking (#10150)
Fixes one impossible check, but that's it! Closes
https://github.com/certbot/certbot/issues/5649.
2025-01-27 14:55:57 -08:00
ohemorangeandGitHub 60b88a3b83 [apache] Add type hints to apache dualparser.py (to enable mypy --strict) (#10153)
`typing.Type` is deprecated in favor of built-in `type`. In strict
mode,`find_ancestors` needs to be more specific about what it actually
returns, due to covariance and generics and such.

```
$ mypy --strict certbot-apache/certbot_apache/_internal/dualparser.py 
Success: no issues found in 1 source file
```
2025-01-27 14:54:40 -08:00
ohemorangeandGitHub e0e81a97f2 Add new style of issue template (#10143)
Pasted from the old one. Maybe we can just rename it but this is what
github's web interface led me to create.

I want to make sure that they at least create the template so that they
read it. If they then choose to ignore it that's fine, but it should
always pop up. Basically I want to keep the old behavior. Open to
alternatives.

We could also play around with the new issue forms:
https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms

Or label this one the "bug" template, and create a second one that is
blank but has the header text paragraph. I haven't seen a way to make
something appear in all templates, including the "blank" one, other than
just turning off blank templates.
2025-01-22 16:27:03 -08:00
e050fe91a3 Allow using cryptography certs and keys in the standalone plugin (#10133)
Co-authored-by: Brad Warren <bmw@users.noreply.github.com>
2025-01-16 22:16:45 +00:00
Will GreenbergandGitHub ed972a130f Add gen_ss_cert deprecation to changelog (#10142)
Forgot a changelog note for this
2025-01-16 19:23:41 +00:00
Brad WarrenandGitHub b411cddc8a fix private key format (#10134)
fixes https://github.com/certbot/certbot/issues/10131

this seems simple enough, but i also requested alex's review as a quick
sanity check if he doesn't mind providing one

i've verified this fixes the problem and that PKCS#8 was used in certbot
3.0.1
2025-01-16 11:04:55 -08:00
Brad WarrenandGitHub 40f0b91512 Fix readlink on windows (#10140)
fixes https://github.com/certbot/certbot/issues/10135

i did this by first reverting the bad changes from
https://github.com/certbot/certbot/pull/10077 and then fixing up
comments/documentation

it seems that the code comments
[here](https://github.com/certbot/certbot/blob/v3.0.1/certbot/certbot/compat/filesystem.py#L410-L411)
and in the unit tests that os.readlink always returns the extended form
in python 3.8+ was incorrect

significant credit for this work goes to
https://github.com/certbot/certbot/pull/10136 and
https://github.com/mbs-c for identifying the problem in the code here
2025-01-16 10:09:44 -08:00
Will GreenbergandGitHub 7e87acee3c acme: deprecate gen_ss_cert in favor of make_self_signed_cert (#10097)
gen_ss_cert()'s signature contains deprecated pyOpenSSL API, so here we
deprecate it in favor of a new function that does the same thing, except
with only cryptography types: make_self_signed_cert
2025-01-16 11:38:10 +09:00