certbot / certbot

Certbot is EFF's tool to obtain certs from Let's Encrypt and (optionally) auto-enable HTTPS on your server. It can also act as a client for any other CA that uses the ACME protocol.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

3rd party plugin flags

bmw opened this issue · comments

The name of 3rd party plugins is generated in certbot/plugins/disco.py. Currently, all third party plugin names are <package>:<entry point>. Because we use the plugin name to prefix the CLI flag name, this generates some really awkward flags --certbot-foo:bar-baz. We should do better, but make sure this doesn't break existing plugins by allowing the old form.

I think we can stop adding the name of the package to the plugin flag and just use the name of the entry point which the plugin author controls. The big thing here is we don't want to break backwards compatibility. The package_name:entry_point_name version of the flags still need to work. This affects both adding the plugin flags and fetching the values from the parsed config.

Perhaps a simple solution is to pass multiple flags to add_argument here if option_namespace contains the package name. The option_namespace should probably still comes first as that's what affects the path in the parsed config, however, plugins can access these values using conf() so they don't have to see this ugliness. Only downside with this approach I see is the package_name:entry_point_name version will be used in renewal configuration files, but I can't see any other problems here. I definitely could be overlooking something though so this will require some experimentation and testing.

commented

We've made a lot of changes to Certbot since this issue was opened. If you still have this issue with an up-to-date version of Certbot, can you please add a comment letting us know? This helps us to better see what issues are still affecting our users. If there is no further activity, this issue will be automatically closed.

I still think we should do this. It's easily the most common complaint I see about writing 3rd party Certbot plugins.

Due to the colon it is not possible to provide configurations for plugins in the cli.ini configuration file.