Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downstream DNS Server Cookies a la RFC7873 and RFC9018 #762

Merged
merged 25 commits into from
Aug 17, 2023

Conversation

wtoorop
Copy link
Member

@wtoorop wtoorop commented Sep 28, 2022

Create server cookies for clients that send client cookies.
This needs to be explicitly turned on in the config file with:

	answer-cookie: yes

A cookie-secret: can be configured for anycast setups. Without one, a random cookie secret is generated.

This PR also adds an access control list policy allow_cookie that allows queries with either a valid cookie or over a stateful transport.

  • TODO: Rolling cookie-secrets

This PR replaces #322

Create server cookies for clients that send client cookies.
Needs to be turned on in the config file with:

	answer-cookie: yes

A cookie-secret can be configured for anycast setups.
Also adds an access control list that will allow queries with
either a valid cookie or over a stateful transport.
@gthess gthess added this to the 1.18.0 milestone Mar 17, 2023
gthess added 18 commits June 14, 2023 16:41
  by allowing Cookies to bypass the ratelimit, but still allowing
  ratelimit to valid DNS Cookie clients via the new
  ip-ratelimit-cookie option.
  thread and total: num.queries_cookie_valid, num.queries_cookie_client,
  num.queries.cookie_invalid.
@gthess gthess removed request for TCY16 and gthess August 8, 2023 13:49
@gthess gthess self-assigned this Aug 8, 2023
@gthess
Copy link
Member

gthess commented Aug 8, 2023

@wcawijngaards, with the recent changes for refactoring, unit/rpl/tdir tests, cookie/ip_ratelimiting interaction and new stat counters for queries with cookies, I believe this is ready for merging after your final review :)

  8 bytes after a client option of length 8, and then ignore them to
  recreate a 24 byte response. The fixup does not read out of bounds,
  and puts zeroes in the buffer at that point, that then are ignored.
Copy link
Member

@wcawijngaards wcawijngaards left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the code and committed couple of fixes. Nice to have the additional feature.

@wcawijngaards wcawijngaards merged commit a1c82ac into master Aug 17, 2023
1 check passed
wcawijngaards added a commit that referenced this pull request Aug 17, 2023
- Merge PR #762: Downstream DNS Server Cookies a la RFC7873 and
  RFC9018. Create server cookies for clients that send client cookies.
  This needs to be explicitly turned on in the config file with:
  `answer-cookie: yes`. A `cookie-secret:` can be configured for
  anycast setups. Without one, a random cookie secret is generated.
  The acl option `allow_cookie` allows queries with either a valid
  cookie or over a stateful transport. The statistics output has
  `queries_cookie_valid` and `queries_cookie_client` and
  `queries_cookie_invalid` information. The `ip\-ratelimit\-cookie:`
  value determines a rate limit for queries with cookies, if desired.
@gthess gthess deleted the features/downstream-cookies branch October 2, 2023 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants