Skip to content
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.

Support dat shortnames via TLS? #227

Closed
cjb opened this issue Dec 21, 2016 · 19 comments
Closed

Support dat shortnames via TLS? #227

cjb opened this issue Dec 21, 2016 · 19 comments

Comments

@cjb
Copy link

cjb commented Dec 21, 2016

The current DNS shortnames have no authentication, so they aren't usable in production. To be comfortable using shortnames, we need a decentralized method of assigning dat hashes to shortnames that has authentication.

I'd guess that TLS is the best way of doing this, even though it's not ideal, since it's already out there, decentralized and authenticated. The path looked up could be:

https://hostless.website/.well-known/dat-url

A TLS result would have to take precedence over a DNS TXT result, otherwise we haven't improved the security of shortnames.

Thanks!

@cjb cjb changed the title Support data shortnames via TLS? Support dat shortnames via TLS? Dec 21, 2016
@pfrazee
Copy link
Member

pfrazee commented Dec 21, 2016

This may be a smart decision. It'll be a while before we can add authentication to the dat protocol.

@max-mapper
Copy link

been a while since ive looked at the spec but would this technically be WebFinger?

@pfrazee
Copy link
Member

pfrazee commented Dec 21, 2016

@maxogden it is close. Webfinger uses the .well-known path-space, but that's shared by a number of specs.

@pfrazee
Copy link
Member

pfrazee commented Dec 21, 2016

Another option is to HEAD / and include a header in the response

@max-mapper
Copy link

@pfrazee ah ok. i didnt like WebFinger a few years ago cause it was XML only but was hoping maybe something better had come out

also, if we're cool inventing specs (vs using dnssec or whatever) we could do a simple stateless message based encrypted udp thing (similar to dns but using sodium)

@pfrazee
Copy link
Member

pfrazee commented Dec 21, 2016

@maxogden You should give Webfinger another look, it's all json now.

We can invent as much as we like within TLS. We need the cert-based authentication.

@cjb
Copy link
Author

cjb commented Dec 21, 2016

Another option is to HEAD / and include a header in the response

I think we'd want something that most website owners can achieve. "Put a file here" works approximately anywhere (think e.g. GitHub Pages, Heroku), but anything involving changing HTTP configuration doesn't.

@pfrazee
Copy link
Member

pfrazee commented Dec 21, 2016 via email

@cjb
Copy link
Author

cjb commented Dec 22, 2016

Oh, just to get back to something from earlier:

It'll be a while before we can add authentication to the dat protocol.

How would that help with forward resolution of shortnames? I'm having trouble imagining that. (Feel free to point me towards old design docs or whatever.)

@pfrazee
Copy link
Member

pfrazee commented Dec 22, 2016

We havent explored it yet in depth. Specifically, we'd need to authenticate a DNS mapping.

One way to do it is DNSSEC, except the crypto community doesn't love it (weak RSA keys for one, centralization of authority, other easons) and it doesn't have extensive support by TLDs. Another way would be to get certs issued by CAs which can be placed in Dats, but that's obviously going to require some lobbying.

@cjb
Copy link
Author

cjb commented Dec 22, 2016

get certs issued by CAs which can be placed in Dats

But that doesn't help you find a Dat from a shortname, right? Once you have a Dat connection open you've already solved the problem of finding out which Dat hash you're looking for, and you're authenticated by its own keypair.

That's why I was confused about how this problem could be solved by adding anything to the Dat protocol. The shortname scheme has to exist outside of the Dat protocol to be useful and decentralized, it seems.

@pfrazee
Copy link
Member

pfrazee commented Dec 22, 2016

But that doesn't help you find a Dat from a shortname, right?

Correct, it helps us authenticate it. You do the shortname lookup => hash via DNS. Then you download the dat site, and check the certfile in the dat. If a trusted CA-chain signature authenticates ownership of the shortname, you're all set.

@pfrazee
Copy link
Member

pfrazee commented Jan 26, 2017

I've put this into a proposal: https://github.com/beakerbrowser/beaker/wiki/Authenticated-Dat-URLs-and-HTTPS-to-Dat-Discovery

@Jermolene
Copy link

I like the `.well-known/' idea. Having said that, it's not always convenient to set up an HTTPS web server, and yet one almost always has access to the DNS for custom domains. Might a blob of base64 in a text record be an alternative option?

@pfrazee
Copy link
Member

pfrazee commented Jan 26, 2017

@Jermolene My only reservation is that DNS does not have authentication, so somebody could MITM the lookup

@Jermolene
Copy link

@pfrazee ah, yes, you did point that out elsewhere I think. The .well-known/ mechanism is plenty useful enough to be getting on with.

@sull
Copy link

sull commented Jan 27, 2017

could be an opportunity to promote DNSSEC and complimentary tech like DNSCRYPT (https://dnscrypt.org).

@pfrazee
Copy link
Member

pfrazee commented Jan 27, 2017

DNSSEC gets mixed reviews. It might be the right choice in the long run, but for now I think I'd rather use a .well-known

@pfrazee
Copy link
Member

pfrazee commented Feb 6, 2017

Done! #275

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants