chaptergy / certbot-dns-njalla Goto Github PK
View Code? Open in Web Editor NEWA certbot plugin for enabling DNS authentication with Njalla
License: Apache License 2.0
A certbot plugin for enabling DNS authentication with Njalla
License: Apache License 2.0
Following the principle of Least Privilege, it'd be a good idea to list the required API methods for this plugin to function.
That way, users can be instructed to limit the access of the API key to the necessary methods.
API methods can be found here: https://njal.la/api/
hi! i'm packaging this for alpine linux and was asked to base the package on an actual release. could you please tag a recent commit? thanks!
https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/45409#note_303125
Certbot's user guide recommends installating Certbot via Snap (see e.g. https://certbot.eff.org/instructions?ws=other&os=debian-10).
However, the plugin for Njalla is not available on Snap (yet), thus requesting a certicate for a Njalla domain is not possible using this installation method.
Im getting this error when I'm trying to get it to work with apache2.
Certbot doesn't know how to automatically configure the web server on this system. However, it can still get a certificate for you. Please run "certbot certonly" to do so. You'll need to manually configure your web server to use the resulting certificate.
if I add --apache to the string it will say to many flags.,?
Hi @chaptergy I've come across an error while trying to use your njalla plugin for certbot to renew a certificate.
I'm not very experienced with Python so I don't really know whats going on. I'm hoping you can find something in the debug log.
2021-08-19 19:17:18,065:INFO:certbot.auth_handler:dns-01 challenge for x.y
2021-08-19 19:17:18,070:DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): njal.la
2021-08-19 19:17:18,266:DEBUG:urllib3.connectionpool:https://njal.la:443 "POST /api/1/ HTTP/1.1" 200 None
2021-08-19 19:17:18,270:DEBUG:certbot.error_handler:Encountered exception:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/certbot/auth_handler.py", line 75, in handle_authorizations
resp = self._solve_challenges(aauthzrs)
File "/usr/lib/python3/dist-packages/certbot/auth_handler.py", line 139, in _solve_challenges
resp = self.auth.perform(all_achalls)
File "/usr/lib/python3/dist-packages/certbot/plugins/dns_common.py", line 57, in perform
self._perform(domain, validation_domain_name, validation)
File "/usr/local/lib/python3.6/dist-packages/certbot_dns_njalla/dns_njalla.py", line 62, in _perform
self._remove_subdomains(domain), validation_name, validation
File "/usr/lib/python3/dist-packages/certbot/plugins/dns_common_lexicon.py", line 43, in add_txt_record
self.provider.create_record(type='TXT', name=record_name, content=record_content)
TypeError: create_record() got an unexpected keyword argument 'type'
2021-08-19 19:17:18,270:DEBUG:certbot.error_handler:Calling registered functions
2021-08-19 19:17:18,270:INFO:certbot.auth_handler:Cleaning up challenges
2021-08-19 19:17:18,274:DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): njal.la
2021-08-19 19:17:18,413:DEBUG:urllib3.connectionpool:https://njal.la:443 "POST /api/1/ HTTP/1.1" 200 None
2021-08-19 19:17:18,416:ERROR:certbot.error_handler:Encountered exception during recovery:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/certbot/auth_handler.py", line 75, in handle_authorizations
resp = self._solve_challenges(aauthzrs)
File "/usr/lib/python3/dist-packages/certbot/auth_handler.py", line 139, in _solve_challenges
resp = self.auth.perform(all_achalls)
File "/usr/lib/python3/dist-packages/certbot/plugins/dns_common.py", line 57, in perform
self._perform(domain, validation_domain_name, validation)
File "/usr/local/lib/python3.6/dist-packages/certbot_dns_njalla/dns_njalla.py", line 62, in _perform
self._remove_subdomains(domain), validation_name, validation
File "/usr/lib/python3/dist-packages/certbot/plugins/dns_common_lexicon.py", line 43, in add_txt_record
self.provider.create_record(type='TXT', name=record_name, content=record_content)
TypeError: create_record() got an unexpected keyword argument 'type'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/certbot/error_handler.py", line 108, in _call_registered
self.funcs[-1]()
File "/usr/lib/python3/dist-packages/certbot/auth_handler.py", line 323, in _cleanup_challenges
self.auth.cleanup(achalls)
File "/usr/lib/python3/dist-packages/certbot/plugins/dns_common.py", line 76, in cleanup
self._cleanup(domain, validation_domain_name, validation)
File "/usr/local/lib/python3.6/dist-packages/certbot_dns_njalla/dns_njalla.py", line 67, in _cleanup
self._remove_subdomains(domain), validation_name, validation
File "/usr/lib/python3/dist-packages/certbot/plugins/dns_common_lexicon.py", line 65, in del_txt_record
self.provider.delete_record(type='TXT', name=record_name, content=record_content)
TypeError: delete_record() got an unexpected keyword argument 'type'
2021-08-19 19:17:18,417:DEBUG:certbot.log:Exiting abnormally:
Traceback (most recent call last):
File "/usr/bin/certbot", line 11, in <module>
load_entry_point('certbot==0.31.0', 'console_scripts', 'certbot')()
File "/usr/lib/python3/dist-packages/certbot/main.py", line 1365, in main
return config.func(config, plugins)
File "/usr/lib/python3/dist-packages/certbot/main.py", line 1250, in certonly
lineage = _get_and_save_cert(le_client, config, domains, certname, lineage)
File "/usr/lib/python3/dist-packages/certbot/main.py", line 121, in _get_and_save_cert
lineage = le_client.obtain_and_enroll_certificate(domains, certname)
File "/usr/lib/python3/dist-packages/certbot/client.py", line 410, in obtain_and_enroll_certificate
cert, chain, key, _ = self.obtain_certificate(domains)
File "/usr/lib/python3/dist-packages/certbot/client.py", line 353, in obtain_certificate
orderr = self._get_order_and_authorizations(csr.data, self.config.allow_subset_of_names)
File "/usr/lib/python3/dist-packages/certbot/client.py", line 389, in _get_order_and_authorizations
authzr = self.auth_handler.handle_authorizations(orderr, best_effort)
File "/usr/lib/python3/dist-packages/certbot/auth_handler.py", line 75, in handle_authorizations
resp = self._solve_challenges(aauthzrs)
File "/usr/lib/python3/dist-packages/certbot/auth_handler.py", line 139, in _solve_challenges
resp = self.auth.perform(all_achalls)
File "/usr/lib/python3/dist-packages/certbot/plugins/dns_common.py", line 57, in perform
self._perform(domain, validation_domain_name, validation)
File "/usr/local/lib/python3.6/dist-packages/certbot_dns_njalla/dns_njalla.py", line 62, in _perform
self._remove_subdomains(domain), validation_name, validation
File "/usr/lib/python3/dist-packages/certbot/plugins/dns_common_lexicon.py", line 43, in add_txt_record
self.provider.create_record(type='TXT', name=record_name, content=record_content)
TypeError: create_record() got an unexpected keyword argument 'type'
2021-08-19 19:17:18,418:ERROR:certbot.log:An unexpected error occurred:
Running certbot snap 2.3.0 from the stable channel.
Running certbot-dns-njalla 1.0.0
Run certbot --help
and get this error:
An unexpected error occurred:
TypeError: 'type' object is not iterable
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /tmp/certbot-log-oyjpvxlp/log or re-run Certbot with -v for more details.
Log file:
2023-02-20 02:21:02,513:DEBUG:urllib3.connectionpool:http://localhost:None "GET /v2/connections?snap=certbot&interface=content HTTP/1.1" 200 787
2023-02-20 02:21:02,784:DEBUG:certbot._internal.log:Exiting abnormally:
Traceback (most recent call last):
File "/snap/certbot/2772/bin/certbot", line 8, in <module>
sys.exit(main())
File "/snap/certbot/2772/lib/python3.8/site-packages/certbot/main.py", line 19, in main
return internal_main.main(cli_args)
File "/snap/certbot/2772/lib/python3.8/site-packages/certbot/_internal/main.py", line 1833, in main
plugins = plugins_disco.PluginsRegistry.find_all()
File "/snap/certbot/2772/lib/python3.8/site-packages/certbot/_internal/plugins/disco.py", line 192, in find_all
cls._load_entry_point(entry_point, plugins)
File "/snap/certbot/2772/lib/python3.8/site-packages/certbot/_internal/plugins/disco.py", line 199, in _load_entry_point
plugin_ep = PluginEntryPoint(entry_point)
File "/snap/certbot/2772/lib/python3.8/site-packages/certbot/_internal/plugins/disco.py", line 40, in __init__
self.plugin_cls: Type[interfaces.Plugin] = entry_point.load()
File "/snap/certbot/2772/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2468, in load
return self.resolve()
File "/snap/certbot/2772/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2474, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/snap/certbot-dns-njalla/current/lib/python3.8/site-packages/certbot_dns_njalla/dns_njalla.py", line 18, in <module>
class Authenticator(dns_common.DNSAuthenticator):
File "/snap/certbot-dns-njalla/current/lib/python3.8/site-packages/zope/interface/declarations.py", line 1108, in __call__
directlyProvides(ob, *self.interfaces)
File "/snap/certbot-dns-njalla/current/lib/python3.8/site-packages/zope/interface/declarations.py", line 918, in directlyProvides
interfaces = _normalizeargs(interfaces)
File "/snap/certbot-dns-njalla/current/lib/python3.8/site-packages/zope/interface/declarations.py", line 1307, in _normalizeargs
_normalizeargs(v, output)
File "/snap/certbot-dns-njalla/current/lib/python3.8/site-packages/zope/interface/declarations.py", line 1306, in _normalizeargs
for v in sequence:
TypeError: 'type' object is not iterable
2023-02-20 02:21:02,784:ERROR:certbot._internal.log:An unexpected error occurred:
2023-02-20 02:21:02,785:ERROR:certbot._internal.log:TypeError: 'type' object is not iterable
dnspython, mock and a few others are declared as dependencies even though they are not used or are only used in tests.
alpine patched around it: https://gitlab.alpinelinux.org/alpine/aports/-/commit/7045bd81e650f7ff3b5adc2e54434c57933f1a6a
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.