]> git.ipfire.org Git - thirdparty/pdns.git/commit
auth: Implement RFC 7872 and 9018 (COOKIES)
authorPieter Lexis <pieter.lexis@powerdns.com>
Mon, 12 Apr 2021 10:58:56 +0000 (12:58 +0200)
committerPieter Lexis <pieter.lexis@powerdns.com>
Mon, 20 Sep 2021 08:54:13 +0000 (10:54 +0200)
commit37063755dd0973cb75396f0bf629e9d68b54b6f3
tree4602ee60477a71403c08566a0dc9b61c92a97991
parenta02d0fa6328b2fa06e99dba7db3ad65174b93c2f
auth: Implement RFC 7872 and 9018 (COOKIES)

This implements the siphash-based interoperable DNS COOKIES defined in
RFC 9018 for the authoritative server. The EDNSCookieOpt struct has been
expanded to accomodate this and can now has constructors and functions
to check and generate a server cookie.

Cookies will only be sent out if the client sent a cookie and the
edns-cookie-secret setting is configures. The auth will respond with
EDNS+FORMERR when the client cookie is malformed, BADCOOKIE when the
client sent a server cookie we can't decode or is invalid and a normal
response with a cookie (either new or sent by the client) when the
cookie can be validated.
19 files changed:
.github/actions/spell-check/expect.txt
.not-formatted
docs/settings.rst
modules/remotebackend/Makefile.am
pdns/Makefile.am
pdns/common_startup.cc
pdns/dnspacket.cc
pdns/dnspacket.hh
pdns/ednscookies.cc
pdns/ednscookies.hh
pdns/packethandler.cc
pdns/recursordist/test-ednsoptions_cc.cc
pdns/test-dnsdist_cc.cc
pdns/test-ednscookie_cc.cc [new file with mode: 0644]
pdns/test-packetcache_hh.cc
regression-tests.auth-py/authtests.py
regression-tests.auth-py/cookiesoption.py [new symlink]
regression-tests.auth-py/test_Cookies.py [new file with mode: 0644]
regression-tests.dnsdist/cookiesoption.py