Hi Petr,
Thanks for the detailed review! Apologies for the slow reply, responses inline.
> On 11. 07. 26 15:15, Eric Kinnear wrote:
> >> Name: draft-kinnear-dnsop-globally-relevant
> >> Revision: 00
> >> Title: Globally Relevant HTTPS RRs
>
> I've read all of it and while I understand the technical side, I think,
> but I consider this approach problematic. It's a lot of text so I tried
> to split it into sections, and I swear this is not AI generated slop :-)
>
>
> ## Assumptions
>
> Are there data available on:
> - how often such presumed 'cache flush' occurs?
Many clients that move between networks, such as phones and laptops, don't
reuse DNS answers across network changes. They either flush the cache entirely
or keep cached responses scoped to the network they were obtained on. RFC 7556
makes that the default for nodes that are aware of provisioning domains: "by
default a node uses information obtained via a name service lookup to establish
connections only within the same PvD as the lookup results were obtained." RFC
7838 says basically the same thing for clients caching Alt-Svc.
For many mobile devices, that’s often many times per day, can often be at least
twice (to and from cellular in many regions).
> - how much extra traffic does that generate (compared to not doing cache
> flush)?
> - what's the cost in terms of latency?
Trying to improve the latency more the traffic load: it can be a correctness
issue in many cases to not flush the cache, so avoiding the additional traffic
isn’t possible without better information from the network/resolver (hence the
globally-relevant flag).
In our measurements, we spend roughly 2-3x longer waiting on DNS resolution in
the first few seconds after a network interface goes up or down as we do later
(once there’s been time to rebuild the cache a bit), and around 3.5x at p90.
> - how widespread such behavior is/where it is implemented?
As far as I’m aware, every major platform does some variant of this behavior
today.
> - is there indication clients are interested in this proposed signal?
At least two client platforms (Apple, Google) are interested in experimenting
with it, but it’d be great to hear from more folks!
>
> ## Design choice
>
> I find odd this optimization targets only SVCB and HTTPS.
>
> AFAIK vast majority of NSD/BIND/Knot DNS deployments on this planet
> generate 'constant' answers no matter who and when asked. I.e. a
> significant portion of DNS answers is 'constant'/observer-independent
> and all record types would benefit from "globally-relevant" treatment.
>
> With this in mind, I can imagine this signal can be EDNS option attached
> to whole answer message, which might be simply good enough granularity
> and provide much better coverage.
>
> Have you considered something like this?
A bit (although always happy to talk about alternative ways to achieve the same
goals!), so far we were going with a SvcParam for a few reasons:
- In my understanding, EDNS is hop-by-hop, and OPT records aren't cached or
forwarded. A signal from the authoritative server wouldn't reach all the way to
the client unless we got every resolver, forwarder, and proxy on the path to
adopt and store it with the cached data/repeat it later (as ECS required). A
SvcParam would propagate today unchanged.
- The OPT record isn't covered by DNSSEC, while a SvcParam is part of the
signed RRset. (Which affects the attack below)
- A response can contain RRsets from several zones (for example, a CNAME into a
CDN's zone), and a per-message signal can't really say which of them it applies
to.
- An SVCB record already contains the things a client needs to connect (ALPN,
ECH, port, and address hints) under one owner name and one signature. (Which is
an interesting philosophical question, but perhaps a separate one)
All that said, I agree that there are quite a few answers that are all constant
and would be considered “globally-relevant”, and if there were good ways to
carry that signal/flag then that could be very interesting.
>
> ## Important
>
> > 7. Security Considerations
> > 7.1. Incorrect Use
> > Clients MUST NOT reuse cached address hints across network changes for
> > connections that are not authenticated by a security protocol, such as TLS.
> > ...
>
> That sounds waaaaaaaaay beyond scope of this draft. It seems the
> underlying assumption is that all clients already MUST drop all caches
> all the time, but I don't think it is universally true, or even desired,
> especially in data centres and such.
>
> Are there data to back this assumption?
Ah, true — I was thinking of this more for clients on the wider internet than
in deployments like intra-datacenter use cases. If a client doesn’t need to
contend with anything split-horizon, any DNS-based load balancing, etc. then
it’s probably possible for it to be confident in reusing those answers.
This requirement is more trying to say “if you rely on the globally-relevant
flag as your signal to use a result across a network change, you need to do
that only on a connection where you can tell if something is wrong”.
We can say something more like "A client MUST NOT rely on this flag to reuse
cached address hints…”.
It could also be worth clarifying that the draft doesn't require any client to
discard cached answers on a network change — we’re not trying to introduce new
requirements there.
The goal is to only relaxes behavior for clients that already scope answers to
a network, if there are clients that don’t, then they don’t need this signal
for that purpose.
I think the introduction is also probably a bit broad in that case, we can
tighten it down.
>
>
> > 7.4. Downgrade and Upgrade Attacks
>
> This section misses the nasty case:
>
> An attacker can supply a fake value, with long TTL, and with
> "globally-relevant" flag. If the underlying assumption is still that
> clients normally flushes caches then this new behavior extends the
> attack window across network changes.
Agreed, that makes sense. Current thoughts (feedback welcome!):
- When the client validates DNSSEC, the flag is covered by the RRset's
signature, so an attacker can't add it to a record or forge a flagged one.
- Clients SHOULD honor the flag only for answers that are integrity protected:
DNSSEC-validated, or received over an authenticated/encrypted connection to a
trusted resolver.
- For other answers, maybe we should have a cap for how long a record can be
reused across networks? A client could lift the cap once it has connected to
the origin using the record's parameters over a connection authenticated for
that origin, since that proves (yay layer crossing/violations) that the answer
was “correct”, for some value of correct.
- That approach can't detect a parameter the attacker removed, such as the
ECHConfig, although we always have to deal with that for things like ECH
downgrade attacks.
>
> I also agree with comments raised by Ben Schwarz in the other thread and
> will not repeat them here.
>
For sure, reworking the privacy considerations along the lines he suggested.
>
>
> ## Hard to understand
>
> > 6. Resolver Behavior
> > Recursive resolvers
>
> This section contradicts itself - MUST pass vs. SHOULD NOT carry.
>
> > MUST pass the "globally-relevant" SvcParamKey through to clients
> > transparently, without modification....
> > Such synthesized answers SHOULD NOT carry
>
> I suggest reformulating section to something along the lines of 'MUST
> remove flag if the intemediary modifies data, MUST pass the flag if it
> does not'.
>
> The section also needs some words on DNSSEC and interaction with it, and
> possibly forward reference to 7.3. DNSSEC Considerations. Having said
> that, I don't know how DNSSEC could be handled, short of going to EDNS
> option/flag :-)
>
Ah yeah, agreed, that was confusing. Ben's PR reworks it (thanks Ben!): since
intermediaries don't modify RDATA at all, they neither add nor remove the flag,
and an intermediary that synthesizes its own answer is that answer's author and
shouldn't include the flag. It’d be nice not to require intermediaries to
remove the flag, since removing it from a signed RRset would break validation,
and with that framing they never need to. I think that also covers the DNSSEC
part, since a validating client checks the flag along with the rest of the
record. We can also replace the DNS64 example, since RFC 9460 already forbids
DNS64 resolvers from modifying the hints.
>
> ## Terminological nits
>
> > 5. Server Behavior
> >
> > An authoritative DNS server SHOULD set the "globally-relevant" SvcParamKey
> > only when the service binding parameters in the record are consistent
> > across all resolvers and network paths. This typically applies to
> > globally-deployed services with uniform configurations.
>
> I would argue this section is for zone managers, not only authoritative
> servers. Often it is not 'software' which generates RRs, but even if
> they are generated, often it is not the authoritative server software in
> charge of generating RRs.
>
> > 6. Resolver Behavior
> > Recursive resolvers
>
> Surely recursive resolvers are not the only component in the path. It
> can be forwarder, dumb proxy at CPE which provides different transports,
> RPZ filtering, or anything else. I suggest reformulating to
> 'intermediaries' or something like that.
Good point on both, thank you! "zone operators” and “intermediaries” both sound
good to me.
Thanks,
Eric
>
> --
> Petr Špaček
>
_______________________________________________
DNSOP mailing list -- [email protected]
To unsubscribe send an email to [email protected]