]> git.ipfire.org Git - thirdparty/pdns.git/commit
rec: Add support for NOTIFY operations to wipe cache entries
authorKevin P. Fleming <kevin@km6g.us>
Fri, 12 Nov 2021 12:20:19 +0000 (07:20 -0500)
committerKevin P. Fleming <kevin@km6g.us>
Fri, 12 Nov 2021 12:20:19 +0000 (07:20 -0500)
commit35189b7db15bb6f9a38f2b54bedd6be001531168
treed281f9c22fcdc3f392079f1d23b5bd46fb6689ca
parentf6329e6ed111724ff357a9c41341be3b2e281154
rec: Add support for NOTIFY operations to wipe cache entries

NOTIFY operations can be sent to trigger removal of cache entries which
match the zone specified in the operation. All entries, regardless of
type, in or below the specified zone, are removed.  Control over
permission to send such operations is provided by an ACL, and control over
zones which can be wiped is provided by a new configuration setting.

The default configuration ignores all NOTIFY operations.

This patch adds:

* 'allow-notify-from' and 'allow-notify-from-file' settings, operating
  almost identically to 'allow-from' and 'allow-from-file' (the only
  difference being the default value).

* 'allow-notify-for' and 'allow-notify-for-file' settings, which provide
  a list of zones for which NOTIFY operations are allowed.

* modification to 'forward-zones-file' setting, allowing zones specified
  there to optionally allow NOTIFY operations.

* 'source-disallowed-notify' metric, counting the number of NOTIFY operations
  which have been denied by the ACL.

* 'zone-disallowed-notify' metric, counting the number of NOTIFY operations
  which have been denied by the zone list.

* API support for modifying 'allow-notify-from' ACL.

* Regression tests for new ACL settings.
12 files changed:
pdns/pdns_recursor.cc
pdns/rec-snmp.cc
pdns/rec_channel_rec.cc
pdns/recursordist/RECURSOR-MIB.txt
pdns/recursordist/docs/http-api/endpoint-servers-config.rst
pdns/recursordist/docs/metrics.rst
pdns/recursordist/docs/settings.rst
pdns/reczones.cc
pdns/syncres.hh
pdns/ws-recursor.cc
regression-tests.api/runtests.py
regression-tests.api/test_RecursorConfig.py