Certbot will be unable to create new ACME accounts
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-certbot (Ubuntu) |
Fix Released
|
Undecided
|
James Hebden | ||
Xenial |
Fix Released
|
High
|
Andreas Hasenack | ||
Bionic |
Fix Released
|
High
|
Andreas Hasenack | ||
Disco |
Fix Released
|
Undecided
|
Unassigned | ||
Eoan |
Fix Released
|
Undecided
|
James Hebden |
Bug Description
[Impact]
To do almost anything in the ACME protocol used by Let's Encrypt and Certbot including obtaining and revoking certificates, you need to first create an account with the ACME server. Starting in November, Certbot will no longer be able to do that with its default configuration. This is because as part of pushing people towards the standardized version of the protocol, Let's Encrypt is no longer letting people create new accounts on their ACMEv1 endpoint. More details about this change can be found at https:/
What this means for Ubuntu users is that new Certbot installations on affected systems would need to be given the URL of an alternative ACME server in order to work. Existing installations would be unaffected for now as long as they don't deactivate their account or delete its credentials. They will have additional problems in the future due to the additional deprecations described in the link above.
To solve this problem, I recommend backporting the Certbot packages from Cosmic to Bionic and Xenial. There are no breaking changes to the public interfaces between versions and I think this results in the smallest change to the packages that would resolve this problem while sticking to well tested packages.
[Test Case]
The test case will be about requesting a real certificate from Let's Encrypt. You need to make sure the host where you are running these instructions:
- is reachable from the internet on port 80
- has a public IP
- said public IP has a valid DNS record under a public domain name
* install certbot with the apache plugin:
sudo apt install python-
* run the certbot command:
sudo certbot run
* After the question about your email address, it will initiate a connection to an ACME server. The old packages will use a V1 server, like this:
Starting new HTTPS connection (1): acme-v01.
* The new packages will use a v2 server, like this:
Starting new HTTPS connection (1): acme-v02.
The above (use a v2 server) is the SRU verification in a nutshell. Of course, obtaining the certificate at the end should still work, but we want to verify with this update that the v2 server was used.
Depending on the date this test is run, the acme v1 server might have been deactivated, in which case you will get this error (with the old packages):
Starting new HTTPS connection (1): acme-v01.
An unexpected error occurred:
The client lacks sufficient authorization :: Account creation on ACMEv1 is disabled. Please upgrade your ACME client to a version that supports ACMEv2 / RFC 8555. See https:/
Please see the logfiles in /var/log/
* To complete the test, let's test renewing the certificate, and then revoke it:
sudo certbot --dry-run renew
* list certificates, taking note of the certificate path:
sudo certbot certificate
* revoke the certificate, using the certificate path obtained in the previous step:
sudo certbot --cert-path <path-from-
* As a final testing step, list the systemd timers, to make sure the certbot one is active:
$ sudo systemctl list-timers
NEXT LEFT LAST PASSED UNIT ACTIVATES
Fri 2019-10-11 04:38:08 UTC 8h left Thu 2019-10-10 19:24:55 UTC 1h 1min ago certbot.timer certbot.service
...
[Regression Potential]
The fix adopted for this bug is a backport from a newer package (cosmic). I included a fix that was found in debian's 0.28 package, but xenial needed more changes:
- not all python3 deps are in xenial, so I had to go back to py2. Upstream gave us their ok (see comment #8)
- debhelper 9 instead of 11, that required some changes too, specially around systemd
- build-depends on sphinx >= 1.6 had to be removed, and was done following upstream's guidance (see comment #6)
[Other Info]
This SRU depends on bug #1836823 being released first, as the newer python-acme is required.
[Original Description]
This bug affects the python-certbot packages in Xenial and Bionic. Cosmic and newer is unaffected.
To do almost anything in the ACME protocol used by Let's Encrypt and Certbot including obtaining and revoking certificates, you need to first create an account with the ACME server. Starting in November, Certbot will no longer be able to do that with its default configuration. This is because as part of pushing people towards the standardized version of the protocol, Let's Encrypt is no longer letting people create new accounts on their ACMEv1 endpoint. More details about this change can be found at https:/
What this means for Ubuntu users is that new Certbot installations on affected systems would need to be given the URL of an alternative ACME server in order to work. Existing installations would be unaffected for now as long as they don't deactivate their account or delete its credentials. They will have additional problems in the future due to the additional deprecations described in the link above.
To solve this problem, I recommend backporting the Certbot packages from Cosmic to Bionic and Xenial. There are no breaking changes to the public interfaces between versions and I think this results in the smallest change to the packages that would resolve this problem while sticking to well tested packages.
Related branches
- Andreas Hasenack: Approve
- Robie Basak: Pending requested
-
Diff: 77 lines (+10/-42)3 files modifieddebian/changelog (+8/-0)
debian/control (+2/-1)
dev/null (+0/-41)
- Andreas Hasenack: Approve
- Robie Basak: Pending requested
-
Diff: 298 lines (+107/-87)9 files modifieddebian/changelog (+22/-0)
debian/compat (+1/-1)
debian/control (+30/-29)
debian/patches/0002-revert-sphinx-1.6-requirement.patch (+38/-0)
debian/patches/series (+1/-0)
debian/python-certbot-doc.doc-base (+2/-2)
debian/python-certbot.lintian-overrides (+1/-1)
debian/rules (+12/-13)
dev/null (+0/-41)
- Canonical Server: Pending requested
-
Diff: 6455 lines (+2780/-562)74 files modifiedPKG-INFO (+6/-4)
README.rst (+2/-2)
certbot.egg-info/PKG-INFO (+6/-4)
certbot.egg-info/SOURCES.txt (+9/-0)
certbot.egg-info/requires.txt (+6/-2)
certbot/__init__.py (+1/-1)
certbot/account.py (+121/-13)
certbot/auth_handler.py (+14/-12)
certbot/cert_manager.py (+23/-16)
certbot/cli.py (+97/-29)
certbot/client.py (+92/-30)
certbot/configuration.py (+5/-1)
certbot/constants.py (+17/-2)
certbot/crypto_util.py (+87/-63)
certbot/display/ops.py (+26/-6)
certbot/display/util.py (+9/-10)
certbot/eff.py (+8/-5)
certbot/error_handler.py (+10/-6)
certbot/errors.py (+4/-0)
certbot/hooks.py (+10/-7)
certbot/interfaces.py (+81/-3)
certbot/log.py (+1/-2)
certbot/main.py (+129/-31)
certbot/plugins/common.py (+7/-3)
certbot/plugins/disco.py (+7/-1)
certbot/plugins/disco_test.py (+2/-1)
certbot/plugins/enhancements.py (+164/-0)
certbot/plugins/enhancements_test.py (+65/-0)
certbot/plugins/manual.py (+4/-1)
certbot/plugins/selection.py (+52/-8)
certbot/plugins/selection_test.py (+49/-2)
certbot/plugins/standalone.py (+21/-8)
certbot/plugins/standalone_test.py (+13/-6)
certbot/plugins/storage.py (+119/-0)
certbot/plugins/storage_test.py (+117/-0)
certbot/plugins/util.py (+2/-2)
certbot/plugins/util_test.py (+3/-6)
certbot/plugins/webroot.py (+10/-7)
certbot/renewal.py (+26/-14)
certbot/reverter.py (+8/-6)
certbot/storage.py (+13/-9)
certbot/tests/account_test.py (+129/-1)
certbot/tests/auth_handler_test.py (+3/-1)
certbot/tests/cert_manager_test.py (+101/-2)
certbot/tests/cli_test.py (+2/-1)
certbot/tests/client_test.py (+77/-5)
certbot/tests/crypto_util_test.py (+10/-0)
certbot/tests/display/completer_test.py (+2/-1)
certbot/tests/display/ops_test.py (+48/-2)
certbot/tests/eff_test.py (+18/-0)
certbot/tests/error_handler_test.py (+4/-2)
certbot/tests/hook_test.py (+11/-10)
certbot/tests/log_test.py (+7/-6)
certbot/tests/main_test.py (+259/-26)
certbot/tests/renewupdater_test.py (+125/-0)
certbot/tests/reporter_test.py (+9/-9)
certbot/tests/storage_test.py (+37/-11)
certbot/tests/testdata/cert-nosans_nistp256.pem (+11/-0)
certbot/tests/testdata/csr-nosans_nistp256.pem (+8/-0)
certbot/tests/testdata/nistp256_key.pem (+5/-0)
certbot/updater.py (+122/-0)
certbot/util.py (+10/-6)
debian/changelog (+51/-0)
debian/control (+8/-6)
debian/patches/0001-remove-external-images.patch (+2/-2)
debian/python3-certbot.lintian-overrides (+3/-0)
dev/null (+0/-41)
docs/cli-help.txt (+90/-17)
docs/conf.py (+1/-0)
docs/contributing.rst (+95/-58)
docs/install.rst (+41/-14)
docs/packaging.rst (+16/-2)
docs/using.rst (+17/-7)
setup.py (+12/-9)
Changed in python-certbot (Ubuntu Xenial): | |
status: | New → Triaged |
Changed in python-certbot (Ubuntu Bionic): | |
status: | New → Triaged |
Changed in python-certbot (Ubuntu Xenial): | |
importance: | Undecided → High |
Changed in python-certbot (Ubuntu Bionic): | |
importance: | Undecided → High |
Changed in python-certbot (Ubuntu): | |
assignee: | nobody → James Hebden (ec0) |
Changed in python-certbot (Ubuntu Xenial): | |
assignee: | nobody → James Hebden (ec0) |
Changed in python-certbot (Ubuntu Bionic): | |
assignee: | nobody → James Hebden (ec0) |
Changed in python-certbot (Ubuntu Xenial): | |
assignee: | James Hebden (ec0) → Andreas Hasenack (ahasenack) |
Changed in python-certbot (Ubuntu Bionic): | |
assignee: | James Hebden (ec0) → Andreas Hasenack (ahasenack) |
Changed in python-certbot (Ubuntu Xenial): | |
status: | Triaged → In Progress |
Changed in python-certbot (Ubuntu Bionic): | |
status: | Triaged → In Progress |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
tags: |
added: verification-done-xenial removed: verification-needed-xenial |
tags: | removed: verification-needed |
I forgot to mention two potential hurdles:
1. python-acme needs to be updated before backporting python-certbot. This needs to be done anyway by November though as described at https:/ /bugs.launchpad .net/ubuntu/ +source/ python- acme/+bug/ 1836823.
2. One potential problem for Xenial is that the version of the python-certbot-doc package in Cosmic built from this python-certbot package requires Sphinx >= 1.6 which is not available in Xenial. If continuing to offer this python-certbot-doc package on Xenial is important, I can probably suggest how to change the upstream code in this package to keep the docs building with the old version of Sphinx.