Page MenuHomePhabricator

Synchronize and rotate TCP Fastopen keys for various use-cases
Open, MediumPublic

Description

We've enabled TCP Fastopen for a few use-cases on our public edges (at least for HTTP[S] + AuthDNS DoTLS, possibly others, DoH in the future, etc). However:

  1. We're not rotating the underlying TCP Fastopen server keys at all (even on an individual server basis). Basically the kernel is setting a key a boot time and keeping it forever. This can be problematic, as it allows remote parties to amass a large set of valid cookies over time.
  2. We're not synchronizing the keys across cluster members (within a DC, or globally in the case of GeoDNS failover and/or anycast), which means we sometimes lose opportunities for TFO to work when a client's next connection lands on a different server than before due to loadbalancing, GeoDNS, and/or anycast-routing changes.

We need a solution that both rotates the TFO keys on a reasonable schedule (and gracefully overlaps validity), and also keeps the rotated keys in sync across a given cluster.

See also past related tickets: T108827 , T240866

Event Timeline

BBlack triaged this task as Medium priority.

We discussed this in Traffic earlier this week, and I ended up implementing what I think is a reasonable solution already, so now I've made this ticket for the paper trail and to cover the followup work to debianize and usefully-deploy it. The core code for it is published at https://github.com/blblack/tofurkey .