To use Cloudflare API tokens, Cerbot Cloudflare API plugin https://www.freshports.org/security/py-certbot-dns-cloudflare/ requires python package cloudflare>=2.3.1. However, the latest version available here is currently 2.1.0, which appears to be severely outdated (released more than 2 years ago). Without API tokens, it is only possible to use the global API key, which gives access to the whole API at once (could be insecure).
If possible, please update this port to version 2.3.1 or newer (preferably the latest one available) to allow usage of API tokens. Thank you very much.
Do you want to submit a patch to update it and even take the maintainership of this port?
I wish I could submit a new version myself, but I don't have a suitable environment for that nor the expertise necessary to set it up. I'm truly sorry if my original request was inappropriate. I only wanted to point out that the current version of this port lacks a crucial security-oriented feature, and it would be nice to have it updated, especially since that the global API keys are now considered "legacy" by Cloudflare and are not recommended to be used anymore.
(In reply to player701 from comment #2)
This is definitely not an inappropriate request, and your notification of new version is available is much appreciated. I asked so because this updating looks not very hard and could be a good practice before others creating a patch. Please try to update the PORTVERSION in Makefile (and remove PORTREVISION), and distinfo, then see if it works. You can check the porter's handbook https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/ and ask question on freebsd-ports@ mailing list: https://lists.freebsd.org/mailman/listinfo/freebsd-ports
(In reply to Li-Wen Hsu from comment #3)
OK, I've edited the makefile and changed the version to latest (2.8.13 as of now) and regenerated the checksum file (distinfo). Now when I try to install the port, I get the following error:
pkg-static: Unable to access file /usr/ports/dns/py-cloudflare/work-py37/stage/usr/local/man/man1/cli4.man:No such file or directory
*** Error code 74
make: stopped in /usr/ports/dns/py-cloudflare
Not quite sure what to do about it. Sorry...
I've found a solution for this problem and will generate a patch for this soon
Version 2.3.1 supports Python 2 and 3 and has api token support as pointed out.
For the latest version we will need to handle the Python 2 support removal on certbot-dns-cloudflare, and it will be the only certbot-dns port without Python 2.
I suggest updating it to 2.3.1 for now, is that ok for you?
(In reply to Danilo G. Baio from comment #6)
Yes of course. There could have been other important feature updates in newer versions, but as far as I'm aware, certbot seems to be asking only for this particular feature (API tokens). There may be other use cases to warrant further updates, but I have no idea what they could be.
A commit references this bug:
Date: Sun Sep 13 18:00:04 UTC 2020
New revision: 548496
dns/py-cloudflare: Update to 2.3.1
Latest release that supports Python 2 and 3.
This version brings api token support.
Reported by: email@example.com
Approved by: python (with hat)
We can track dns/py-cloudflare to latest release in another PR.
In the next days we will update certbot to 1.8.0, just waiting Python 3.5 removal.