Certificats Let's Encrypt
Find a file
Robie Basak 0bebdedcbc Initial revision
Fix headings

Fix error in build instructions
2020-06-18 12:20:56 -07:00
.azure-pipelines Remove references to the apache-parser-v2 branch (#7925) 2020-04-21 13:06:30 -07:00
.github Improve issue closing behavior. (#7178) 2019-06-24 16:39:45 -07:00
acme Bump version to 1.6.0 2020-06-02 10:32:41 -07:00
certbot Add CERTBOT_PLUGIN_PATH support 2020-06-18 12:20:18 -07:00
certbot-apache Implement umask for Windows (#7967) 2020-06-09 17:08:22 -07:00
certbot-ci Run hooks with Powershell on Windows (#7800) 2020-04-27 09:38:30 -07:00
certbot-compatibility-test Bump version to 1.6.0 2020-06-02 10:32:41 -07:00
certbot-dns-cloudflare dns-cloudflare: Update docs and error messages to reflect new API permissions (#8015) 2020-06-12 20:38:13 +02:00
certbot-dns-cloudxns Bump version to 1.6.0 2020-06-02 10:32:41 -07:00
certbot-dns-digitalocean Bump version to 1.6.0 2020-06-02 10:32:41 -07:00
certbot-dns-dnsimple update certbot-dns-dnsimple snapcraft.yml. 2020-06-18 12:20:53 -07:00
certbot-dns-dnsmadeeasy Bump version to 1.6.0 2020-06-02 10:32:41 -07:00
certbot-dns-gehirn Bump version to 1.6.0 2020-06-02 10:32:41 -07:00
certbot-dns-google Bump version to 1.6.0 2020-06-02 10:32:41 -07:00
certbot-dns-linode Bump version to 1.6.0 2020-06-02 10:32:41 -07:00
certbot-dns-luadns Bump version to 1.6.0 2020-06-02 10:32:41 -07:00
certbot-dns-nsone Bump version to 1.6.0 2020-06-02 10:32:41 -07:00
certbot-dns-ovh Bump version to 1.6.0 2020-06-02 10:32:41 -07:00
certbot-dns-rfc2136 Bump version to 1.6.0 2020-06-02 10:32:41 -07:00
certbot-dns-route53 Bump version to 1.6.0 2020-06-02 10:32:41 -07:00
certbot-dns-sakuracloud Bump version to 1.6.0 2020-06-02 10:32:41 -07:00
certbot-nginx Add support for NetBSD (#8033) 2020-06-08 12:06:38 -07:00
letsencrypt-auto-source Upgrade Certbot dependencies (#8036) 2020-06-04 08:59:45 -07:00
snap Upgrade snap to be based on core20 2020-06-17 16:57:51 -07:00
tests Fix TLS-ALPN tests with newer versions of OpenSSL (#8026) 2020-06-01 15:18:38 -07:00
tools Add comment about pyca's use of tools script (#8044) 2020-06-08 12:14:02 -07:00
windows-installer Minor bugfixes (#7891) 2020-04-13 10:41:39 -07:00
.coveragerc Get integration tests working on python 3.8 (#7372) 2019-09-16 14:14:26 -04:00
.dockerignore Update ignore files to remove shared tox.venv 2015-07-12 15:30:51 +00:00
.gitattributes Merge pull request #2136 from tboegi/gitattributes_eol_overrideses_auto 2016-06-16 14:29:39 -07:00
.gitignore Certbot snap multiarch build (#8016) 2020-06-10 14:33:02 -07:00
.isort.cfg Reorganize imports (#7616) 2019-12-09 15:50:20 -05:00
.pylintrc Lint certbot code on Python 3, and update Pylint to the latest version (#7551) 2019-12-10 14:12:50 -08:00
.travis.yml Drop i386 architecture on snap build (#8083) 2020-06-16 15:57:05 -07:00
AUTHORS.md Fix certbot.compat.filesystem documentation (#8058) 2020-06-08 14:00:16 -07:00
certbot-auto Release 1.5.0 2020-06-02 10:32:38 -07:00
certbot.wrapper Make Certbot find externally snapped plugins (#8054) 2020-06-10 13:52:56 -07:00
CHANGELOG.md Refactor certbot/ and certbot/tests/ to use the same structure as the other packages (#7544) 2019-11-25 14:28:05 -08:00
CODE_OF_CONDUCT.md Added a CODE_OF_CONDUCT.md file so Github doesn't complain 2019-04-17 11:36:26 -07:00
CONTRIBUTING.md Adding the EFF Public Projects Code of Conduct to the contributing guide 2019-04-16 16:28:32 -07:00
docker-compose.yml Cleanup dockerfile-dev (#5435) 2018-02-16 09:51:27 -08:00
Dockerfile-dev Lint certbot code on Python 3, and update Pylint to the latest version (#7551) 2019-12-10 14:12:50 -08:00
ISSUE_TEMPLATE.md Suggest people try the community forum. (#5561) 2018-02-09 16:41:05 -08:00
letsencrypt-auto Release 1.5.0 2020-06-02 10:32:38 -07:00
LICENSE.txt More stray ncrypt reference cleanup 2016-04-14 17:04:23 -07:00
linter_plugin.py Remove letshelp-certbot (#7761) 2020-02-14 17:19:19 -08:00
mypy.ini Remove letshelp-certbot (#7761) 2020-02-14 17:19:19 -08:00
pull_request_template.md Don't list adding type annotations as a PR req. (#7627) 2019-12-04 20:22:10 +01:00
pytest.ini Add warning about ignoring our own warnings (#7971) 2020-05-04 16:54:09 -07:00
README.md Initial revision 2020-06-18 12:20:56 -07:00
README.rst Refactor certbot/ and certbot/tests/ to use the same structure as the other packages (#7544) 2019-11-25 14:28:05 -08:00
tox.cover.py drop min certbot coverage (#7972) 2020-05-05 09:38:20 -07:00
tox.ini Merge snap code into the Certbot repo 2020-04-24 13:47:36 -07:00

Certbot Plugin Snaps

This is a proof of concept of how a Certbot snap might support plugin snaps that add functionality to Certbot using its existing plugin API.

Architecture

This is a description of how Certbot plugin functionality is exposed via snaps. For information on Certbot's plugin architecture itself, see the Certbot documentation on plugins.

The Certbot snap itself is a classic snap. Plugin snaps are regular confined snaps, but normally do not provide any "apps" themselves. Plugin snaps export loadable Python modules to the Certbot snap via a snap content interface.

Certbot itself accepts a CERTBOT_PLUGIN_PATH environment variable. This support is currently patched but this is intended to be upstreamed. The variable, if set, should contain a :-separated list of paths to add to Certbot's plugin search path.

The Certbot snap runs Certbot via a wrapper which examines its list of connected interfaces, sets CERTBOT_PLUGIN_PATH accordingly, and then execs Certbot itself.

Use (Production)

Note: this production use example assumes that these snaps are available in stable channels in the Snap Store, which they aren't yet. See below for development instructions.

To use a Certbot plugin snap, install both the plugin snap and the Certbot snap as usual. Plugin snaps are confined as normal; the Certbot snap is a classic snap and thus needs --classic during installation. For example:

snap install --classic certbot
snap install certbot-dns-dnsimple

Then connect the plugin snap to the main certbot snap as follows. Note that this connection allows the plugin snap code to run inside the certbot process, which has access to your host system. Only perform this step if you trust the plugin author to have "root" on your system.

sudo snap connect certbot:plugin certbot-dns-dnsimple

Now certbot will automatically load and use the plugin when it is run. To check that this has worked, certbot plugins should list the plugin.

You can now operate the plugin as normal.

Use (Testing and Development)

To try this out, you'll need to build the snaps (a patched Certbot snap and a plugin snap) manually.

  1. Start with a Xenial VM.
  2. Install snapcraft with snap install --classic snapcraft.
  3. Run git clone git://github.com/basak/certbot-snap-build -b snap-plugins/snap/certbot.
  4. cd certbot-snap-build
  5. Run git clone https://github.com/basak/certbot-snap-build -b snap-plugins/certbot certbot (this is a workaround for #13).
  6. Run certbot/tools/strip_hashes.py certbot/letsencrypt-auto-source/pieces/dependency-requirements.txt > certbot/constraints.txt (this is a workaround for #13).
  7. Run snapcraft.
  8. Install the generated snap with sudo snap install --dangerous --classic certbot_*_amd64.snap. You can transfer the snap to a different machine to run it there instead if you prefer.
  9. cd ..
  10. git clone git://github.com/basak/certbot-snap-build.git -b snap-plugins/snap/certbot-dns-dnsimple certbot-dns-dnsimple
  11. cd certbot-dns-dnsimple
  12. snapcraft
  13. Install the generated snap with sudo snap install --dangerous certbot-dns-dnsimple_*_amd64.snap. Again, you can transfer the snap to a different machine to run it there instead if you prefer.
  14. Connect the plugin with sudo snap connect certbot:plugin certbot-dns-dnsimple.
  15. Now you can run Certbot as normal. For example, certbot plugins should display the DNSimple plugin as installed.

Code

This proof of concept ships four git branches:

  1. This documentation.
  2. A fork of Certbot upstream that adds support for CERTBOT_PLUGIN_PATH.
  3. A fork of the proof of concept Certbot snap packaging that adds plugin support.
  4. An example of snap packaging for the Certbot DNSimple plugin.

If adopted, these would all be upstreamed, and no branches would be necessary. Snap packaging is intended to be maintained within upstream code trees themselves with the addition of snapcraft.yaml, much like Travis CI integration.

Publishing Permissions

There are security implications to permitting anyone to publish, without review, a plugin into the Snap Store which will then run in Certbot's classic snap context, with full access to the host system.

At a minimum, it is clear that this should happen only with the user's explicit opt-in action.

As implemented, Certbot will only load plugins connected via the snap interface mechanism, so permission is effectively delegated to what interface connections the snap infrastucture will permit.

I am not clear as to exactly what is and isn't currently permitted, and what interfaces can or cannot be set to be automatically connected.

It seems fairly clear that, at a minimum, a manual connection between snaps coming from the same publisher will be permitted.

Outstanding issues

Outstanding items relating to plugin support in Certbot snaps are tracked on GitHub.