Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
IPIP-296: DNSLink resolution export with DNSSEC records #296
IPIP-296: DNSLink resolution export with DNSSEC records #296
Changes from 3 commits
71438fc
00658aa
a55f721
26a5cc5
e299087
423e0e7
a93e4a1
c331375
d7d886d
53b8ed5
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two nits:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💭
Needs clarification: since "Reduced TLS DNSSEC Chain Extension" here is based on RFC 9102, does it also include setting
dnssec_chain
flag on request's TLS handshake?My feedback here is that custom TLS is a very big ask for everyone to implement, and limits the utility of DNSLink proofs on Gateways, especially given they can be decoupled from retrieving content-addressed data. Ok to experiment, but we should always have a plain way for fetching them without messing with TLS layer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Reduced TLS DNSSEC Chain Extension is an experimental RFC, which has inspired some of the design in this IPIP. There is no ask for gateways to implement a custom TLS layer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💭
We have browser vendors (un)officially interested in adding end-to-end integrity "checkmark" to DNSLink websites loaded over IPFS.
Someone familiar with implementation cost on the browser side should take a look (will ping some folks).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a variant of this design is worth evaluating.
I propose we remove the need for generating the proof and returning CID with every response on DNSLink websites, and instead, leave it up to the client to request DNSSEC proof via a separate request, and response having ONLY the DNSLink's DNSSEC proof.
This way:
dnslink=/ipfs/{cid}
and caches it (e.g. based on DNS record TTL)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
having the resolution in two steps require the gateway to keep some state, which I don't think is a good requirement. Ideally, gateway should be stateless. In the variant you propose above, a stateless gateway could be consider dishonest as it might not necessarily have the same view of DNS in the two requests.
For a two requests protocol to not require the gateway to have state, a client should first request the DNSSEC proof, and then request the resolved CID/CAR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition, the gateway doesn't need to request the proofs from the resolver unless it receives the header
"Accept: application/vnd.dnslink.dnssec; version=1"
. So a client who's only interested in the CAR can opt to receive only that.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree on two points: the gateway should be stateless, and the client should be able to decide when the DNSLink proof is returned.
What I'm not comfortable with is limiting clients, forcing them to always fetch data when all they want is DNSLink proofs. Having 2-in-1 response type is fine (sounds like you have use cases in mind for this?), but there should also be a way to request proof without the data, allowing clients to do the data retrieval by other means.
This is exactly that I had in mind, and it follows the patterns of how the web works.
You need to resolve DNSLink once, and in my mind DNSSEC proof would be part of that.
After that, you don't need it again until TTL runs out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛑
Putting everything into a single response may not be the best design:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
coupling has the advantage of not requiring state, nor a two requests protocol from the client side. Similar to CAR which block headers could technically be requested separately, having them all bundled in one file is useful.
Regarding the decoupling, one could imagine a DAG build on top of IpfsDnssecChain with a node for version, a node for proof, and a node for ipfsData. Data retrieval is different from the bundling. One will likely not be able to resume download of a DNSLink proof on a gateway with a different view, but once the bundle has been generated, it can be content addressed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mind elaborating on use cases you have in mind for coupling them together?
Maybe it will make the utility of this approach more apparent.
I was trying to imagine mobile web browser, or a light IoT client, in both cases I struggle to see benefit from sending DNS+DNSSEC resolution along with the data.
To maximize cache hits, client would resolve mutable pointer (DNS or IPNS) to learn the CID, then immutable data is transferred.
Caching immutable data together with the pointer does not leverage the fact that immutable data can be placed in a global cache to maximize cache hits across different mutable pointers and time.
Why not? Client resolved DNSLink to a CID. CID is either a single block, or a root of a bigger DAG (e.g., UnixFS directory,).
If that CID is a root of a DAG, download can be not only resumed, but download of different branches of the DAG can be fetched from different gateways, or even via P2P transports.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ℹ️
I feel this is exactly the reason, why this spec should not couple data and proofs together.
All that the client cares about is the integrity of
dnslink=..
string in DNS TXT record.How the content-addressed data is fetched should not be in the scope here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think @thibmeu's comments apply here as well. If the binding fails to validate, it would not be clear if the gateway was dishonest or if the DNSLink mapping changed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💭
If we decouple content-addressed data from DNSSEC proof, then THIS alone could be what the client receives when they request
application/vnd.dnslink.dnssec; version=1
.Ensuring this struct is useful to clients (such as web browsers) should be our main focus.
Reusing existing RFC formats where possible is 👍
Will ping some browser folks for review here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the main concern here is that DNSLink's DNSSEC proofs should not be returned with every block or CAR.
The client needs to fetch the proof only once, and the proof, once generated, can be cached for some time. I think this spec should explicitly state that proof can be cached by the gateway for at least 60 seconds, and up to the TTL of the TXT record.
This should mitigate use of proof requests as a surface for DoS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requiring a minimum TTL could go against DNS behaviour, and adding a new layer of cache should be left to the gateway operator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, I forgot we already talked about his around
DNS.MaxCacheTTL
.Ignore my comment then, no special treatment here,
gateway and client should reuse DNS cache around TTL value for TXT record with DNSLink.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💭
re: subresource, if we decouple data from proof response, the problem of subresources goes away: no need to trust gateway did resolution right, the client will fetch root CID block to learn about CID of subresource.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. It would be good to clearly state the scope of this Version 1 spec.
Sidenote: context on recursive DNSLinks
If the DNSLink value is
/ipfs/..
then the story is simple, we have two distinct stages of resolution and DNSSEC proof closes the gap, allowing clients to display end-to-end integrity indicators:If we add
/ipns/
to the picture, that namespace requires an additional resolution step:/ipns/
path can point at an IPNS KEY or another domain name (FQDN), which requires doing recursive DNSLink resolution. This resolution creates more complexity and potential gap around client's ability to verify signed IPNS records (KEY ones):To illustrate:
What to do with /ipns/ ?
For Version 1, we could say the
/ipns/
gap is out of the scope and needs to be resolved client-side.I think we don't need to worry about
dnslink=/ipns/FQDN
– client will be able to send follow-up DNSSEC proof requests for the new FQDN, and do that recursive dance until a non-DNS, cryptographically verifiable path is found.Open problem / need for spec: fetching signed IPNS records from Gateway
I think Gateways should support a scenario where
dnslink=/ipns/KEY
.Many clients won't be able to retrieve IPNS records (no p2p, no dht), and asking clients to implement delegated routing via separate protocol like reframe (allowing light clients to fetch Signed IPNS Records) may be a stretch for many.
I think the Gateway should provide a way for a client to request IPNS proof (signed IPNS record) in a way that is as easy as requesting a DNSSEC one.
Details TBD, but my initial take is that either
"IPNS proof" should be a separate request-response type, allowing clients to resolve and cache IPNS resolutions independently, or
part of unified
application/vnd.dnslink.integrity; version=1
response that returns both DNSSEC proof and (optional) IPNS signed record, broad strokes:To make things easier for light clients, we should lean towards the latter one. A single request-response made by a thin client that can be cached for the duration of the retrieval session.