pdns icon indicating copy to clipboard operation
pdns copied to clipboard

Handle parent/child zone NS records through the API

Open ekohl opened this issue 9 years ago • 4 comments

Our use case comes from our custom integration with DirectAdmin. Normally DirectAdmin works with bind zone files and uses bind to serve those. We have hooked into this to serve all our domains from a central PowerDNS instance (with replication).

Within DirectAdmin it's common to create separate zones for subdomains. That means you have an example.com zone and a sub.example.com zone. Without DNSSEC you can usually get away with not creating sub.example.com NS records in the example.com zone, but DNSSEC forces you to do the right thing. That's why we have a hook that manages the NS records.

  • On creation it finds:
    • the closest parent and ensures proper NS records.
    • all children and ensures proper NS records. If a parent existed before (sub1.sub2.example.com and example.com existed, sub2.example.com is created) we also take care of this. This means deleting the old NS records and creating new ones.
  • On deletion the process is reversed

This issue is to open up discussion if this feature is desired in the API and in what form.

The most limited support would be to retrieve the closest parent zone and child zones. Finding the closest parent would also be useful in the case where I want to insert host.example.com and I want to find the zone where I need to insert it.

Full support could mean a parameter on POST /zones to ensure NS records are correct.

ekohl avatar Aug 03 '16 13:08 ekohl

We have a delegation check in pdnsutil check-zone; perhaps the API should also have that check?

Habbie avatar Jan 24 '20 12:01 Habbie

We have a delegation check in pdnsutil check-zone; perhaps the API should also have that check?

Probably. However, should we fix the known issues in the delegation check first?

zeha avatar Jan 24 '20 14:01 zeha

Probably. However, should we fix the known issues in the delegation check first?

Yes.

Habbie avatar Jan 24 '20 14:01 Habbie

#8896 is related

Habbie avatar Nov 09 '20 17:11 Habbie