NLnetLabs / domain

A DNS library for Rust.
https://nlnetlabs.nl/projects/domain/about/
BSD 3-Clause "New" or "Revised" License
332 stars 56 forks source link

(A/I)XFR-in/out (with TSIG), NOTIFY-in/out + demo zone persistence. #335

Open ximon18 opened 1 month ago

ximon18 commented 1 month ago

Based on the service-layering branch.

Manually tested as both primary and secondary with NSD and BIND.

Still lots to do:

Introduces the following new major components:

Component Description
Catalog - For primary zones: "on-zone-change" triggered sending of NOTIFY messages zones to "secondaries". - For "secondary" zones: NOTIFY-in and SOA timer based SOA query and (A/I)XFR-out.
XfrMiddlewareSvc Handling of (A/I)XFR-in requests. Requires a Catalog.
NotifyMiddlewareSvc Handling of NOTIFY-in requests. Requires a Catalog.
TsigMiddlewareSvc Verify TSIG signed requests and sign responses.
net::client::auth::Connection TSIG signing and validation client layer for signing request(-stream)s and validating response(-stream)s. Used by Catalog.

Zone persistence on change (either edit to a local primary zone or sync of a local secondary zone with changes obtained from a remote primary) is demonstrated in examples/serve-zone.rs via the ArchiveZone impl of the ZoneStore trait and by using the same Zone wrapping "hack" that Catalog uses to monitor zones for changes.

ximon18 commented 2 weeks ago

Thx @tertsdiepraam !

The code is not finished functionally yet, thus certainly not in terms of docs, comments, examples etc either.

So I'd suggest to limit yourself to high level review at this point.

I'd be happy to walk you through it if you would appreciate that, either in person next week or online before then.

tertsdiepraam commented 2 weeks ago

Oh yeah don't mind me. I was just interested to look through it and figured I'd comment on some things while I was going through it. I'd love a walkthrough at some point though.