Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is this plugin compatible with PowerDNS in "bind" mode? #28

Open
webhype opened this issue Nov 15, 2023 · 0 comments
Open

Is this plugin compatible with PowerDNS in "bind" mode? #28

webhype opened this issue Nov 15, 2023 · 0 comments

Comments

@webhype
Copy link

webhype commented Nov 15, 2023

When I try to run the following simulated renewal...

$ certbot renew --dry-run \
		--authenticator certbot-dns-powerdns:dns-powerdns  \
		--certbot-dns-powerdns:dns-powerdns-credentials /etc/powerdns/api-credentials.ini

...I see in the Certbot log files something like this:

2023-11-14 23:54:35,846:DEBUG:urllib3.connectionpool:http://127.0.0.1:8081 "PATCH /api/v1/servers/localhost/zones/mydomain.com. HTTP/1.1" 422 62
2023-11-14 23:54:35,847:DEBUG:lexicon.providers.powerdns:response: {"error": "Hosting backend does not support editing records."}
2023-11-14 23:54:35,847:DEBUG:certbot.plugins.dns_common_lexicon:Encountered error adding TXT record: 422 Client Error: Unprocessable Entity for url: http://127.0.0.1:8081/api/v1/servers/localhost/zones/mydomain.com.

So it appears that the PowerDNS API tells your plugin "Sorry I can't edit plain-text zone files".

• Is my interpretation correct?
• Is this a general restriction; BIND-style zone files just won't get edited, period?
• Or is there a "reason" for the rejection, such as bad permissions or whatever?
• Or is my only recourse to switch to something like PostgreSQL to store my DNS records?

Technically there's nothing that would keep PowerDNS or its tool suite from editing its own plain-text zone files.

FWIW, I get the same error when using curl:

curl -v -v -s -X PATCH \
	-H "X-API-Key: CHANGEME" \
	-H "Accept: application/json" \
	-H "Content-Type: application/json" \
	"http://localhost:8081/api/v1/servers/localhost/zones/mydomain.com." \
	--data '{
           "rrsets": [
             {
               "name": "_acme-challenge.mydomain.com.",
               "type": "TXT",
               "ttl": 86400,
               "changetype": "REPLACE",
               "records": [
                 {
                   "content": "\"new-txt-record-content\"",
                   "disabled": false
                 }
               ]
             }
           ]
         }'

I know this is not the PowerDNS support forum but perhaps there is some known issue with patching TXT records that you guys have previously run into and I'm missing what's wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant