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

feature request: encrypted SNI #2327

Closed
Lennie opened this issue Oct 24, 2018 · 9 comments
Closed

feature request: encrypted SNI #2327

Lennie opened this issue Oct 24, 2018 · 9 comments
Labels
feature ⚙️ New feature or request

Comments

@Lennie
Copy link

Lennie commented Oct 24, 2018

Not sure if this is the right place, I'm probably early to request this anyway.

If I understand correctly, this needs:

  • an extra TLS extension
  • the webserver should understand 2 or more 'SNI names' for the same name, the plain text name plus a number of encrypted names.
  • generate a new key regularly
  • needs a way to tell DNS about what key clients can use

https://tools.ietf.org/html/draft-rescorla-tls-esni-00

Sounds to me like if there are multiple web servers, you'd might want to have a centralized program pushing updates to the servers and DNS.

@Avamander
Copy link

Avamander commented Nov 6, 2018

Same topic in nginx mailing list implies boringssl already supports Encrypted SNI (ESNI) which means it shouldn't be super-hard to implement in Caddy?

@francislavoie francislavoie added the feature ⚙️ New feature or request label Nov 6, 2018
@mark-kubacki
Copy link

mark-kubacki commented Nov 18, 2018

You need another rotation for this (the others are: certificates, session tickets), this time of the (separately published using DNS) ESNI pre-keys. Unless you want to dump a base64-encoded "put this into your TXT record now" in the logs, a mechanism for updating DNS entries must be implemented.

The decryption and so on, that's trivial.

Furthermore, this feature depends on TLSv1.3 (but could be retro-fitted), and is still a draft. Hence, if someone were to pick this up, months away.

And you'd need to negotiate with upstream (the Go authors) about whether it'll be in crypto/tls, or to be implemented by the clients (with some utility functions in Go); and decided by Caddy's steering if an interim solution is wanted (I could implement one) and if so, plot a central secret storage facility and share ideas about the interaction with nameservers.

@Avamander
Copy link

Unless you want to dump a base64-encoded "put this into your TXT record now" in the logs, a mechanism for updating DNS entries must be implemented.

Even with that it'd be kind-of okay.

@francislavoie
Copy link
Member

francislavoie commented Nov 18, 2018

Unless you want to dump a base64-encoded "put this into your TXT record now" in the logs, a mechanism for updating DNS entries must be implemented.

Actually, Caddy has DNS providers to plug into the tls directive for doing the DNS challenge (see https://caddyserver.com/docs/automatic-https#dns-challenge) so it isn't a stretch to make it possible to automate, if I'm understanding what you're saying.

In other news, see this comment: golang/go#9671 (comment)

It's very likely Caddy will wait until Go adds support for encrypted SNI before it's implemented otherwise.

@elcore
Copy link
Collaborator

elcore commented Nov 18, 2018

[A] mechanism for updating DNS entries must be implemented.

We could implement something similar to tls.dns.{provider}

@Avamander
Copy link

I investigated my DNS provider's API it isn't fine-grained enough for me to want to grant my server access to it - a export-record-to-log option is still a really good idea.

@mholt mholt added this to the 2.0 milestone May 9, 2019
@tankerkiller125
Copy link

I know this is quite old but in regards to an "export to log option" couldn't we just create a new file located where the caddy file is called "site.tld-esni.txt" or something that people could use. Exactly the same way 99% of Email DMARC and DKIM providers do?

@mholt
Copy link
Member

mholt commented Dec 11, 2020

It's more and more likely that ESNI will be superceded by ECH: https://blog.cloudflare.com/encrypted-client-hello/

It's been a couple of years and ESNI hasn't seen wide adoption among clients yet. With its likely deprecation looming, I'll close this issue now and wait and see if ECH will become mainstream.

If I'm wrong and ESNI ends up mainstream instead, we can reopen this.

@mholt mholt closed this as completed Dec 11, 2020
@mholt mholt removed this from the 2.x milestone Dec 11, 2020
@Avamander
Copy link

Isn't it just a rename? @mholt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature ⚙️ New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants