PowerDNS / pdns

PowerDNS Authoritative, PowerDNS Recursor, dnsdist
https://www.powerdns.com/
GNU General Public License v2.0
3.72k stars 912 forks source link

add a default-soa-edit-api setting #6173

Open atosatto opened 6 years ago

atosatto commented 6 years ago

Short description

Add a default-soa-edit-api setting to automatically set the default soa-edit-api METADATA for all the created zone.

Usecase & Description

Editing PowerDNS Authoritative DNS zones RRsets via API it would be convenient to a have a default configuration setting for the soa-edit-api METADATA instead of having to set it per-zone.

jangrewe commented 6 years ago

Oh yes, this would be very appreciated, especially considering that a lot of people who use Let's Encrypt will switch to the DNS-based authentication challenge soon, as that's required for wildcard certificates, and you really, really, really want to automate this - preferably via the API! ;-) (And you then want slave notifications as quickly as possible, which currently doesn't happen unless you set the metadata.)

zeha commented 5 years ago

Note that, if you create the zone using the api, SOA-EDIT-API defaults to DEFAULT, if soa_edit_api is not present in the create request.

Napsty commented 5 years ago

What about if pdns would lookup the pdns.conf file and check for the option default-soa-edit?

# grep "^default-soa-edit" /etc/powerdns/pdns.conf
default-soa-edit=INCEPTION-INCREMENT

If a zone is created through the API and the request not contain the soa_edit_api key, use the default from the config file. Any reason, why this is not read from the config file? Or, if that somehow breaks something, add a second option into the config file, e.g. default-soa-edit-api.

Berthe01 commented 12 months ago

Hello there,

Is there any update on this ?

apezio commented 3 weeks ago

I could definitely use this setting. I am using master/slave and if the a zone is created on master, without setting this metadata to INCREASE (which can only be done manually) the zone never axfrs after being updated on the master via the API resulting in stale records on the slave.

zeha commented 3 weeks ago

If you use the API to create zones, it should just work. Otherwise pass SOA-EDIT-API in the zone create API call.