jahudka / certbot-dns-active24

Active24 DNS-01 Authentication Plugin for Certbot
MIT License
12 stars 8 forks source link

Different naming #7

Closed kaldap closed 2 years ago

kaldap commented 3 years ago

Hi! I've installed the certbot using apt and the plugin using pip on Debian 10. For make it work I had to rename the token key in active24.ini to: certbot_dns_active24:dns_active24_token="xxx" and change the -a argument to the following: certbot certonly -a certbot-dns-active24:dns-active24.

There is probably new namespace policy or something like that?

jahudka commented 3 years ago

Hi, the naming is something that I really don't understand, because it appears to work differently with every single installation.. I'm sorry about it, but I don't really know what I can do to make it work correctly across every system. One thing I recommend in any case is that you should install certbot using pip as well, mainly because the Debian packages will never be as up-to-date. For example the Debian Buster repositories currently distribute certbot version 0.31.0, whereas PyPI has 1.12.0.

I'll update the readme to reflect this issue, but other than that I don't really know what could be done. Do you have any ideas? I'm sorry, I'm not that much of a Python developer, maybe there's an obvious solution..

kaldap commented 3 years ago

I've looked into it and found the following list in the certbot sources (disco.py to be exact): PREFIX_FREE_DISTRIBUTIONS = [ "certbot", "certbot-apache", "certbot-dns-cloudflare", "certbot-dns-cloudxns", "certbot-dns-digitalocean", "certbot-dns-dnsimple", "certbot-dns-dnsmadeeasy", "certbot-dns-gehirn", "certbot-dns-google", "certbot-dns-linode", "certbot-dns-luadns", "certbot-dns-nsone", "certbot-dns-ovh", "certbot-dns-rfc2136", "certbot-dns-route53", "certbot-dns-sakuracloud", "certbot-nginx", "certbot-postfix", ]

The _entrypoint.dist.key provided by _pkgresources should be contained in the list. So it seems that the entry point has to start with certbot namespace like dns-active24 = certbot.dns_active24:Authenticator. I have also noticed that other plugins are using only the full namespace-prefixed names in READMEs...

jahudka commented 3 years ago

wow, didn't know they had a list of plugins with preferential treatment.. that sux, although it led me to the discussion for this issue, where they mention that "certbot 1.7.0 introduced the possibility to use dns plugins without the prefix"; given the fact that you're probably using certbot 0.31.0 this would explain why it doesn't work for you without the prefix, but the fix is easy either way - either stick to 0.31.0 and use prefixes, or upgrade to >=1.7.0.