-
Notifications
You must be signed in to change notification settings - Fork 4
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
feat: auto-generate SSL certs to enable operators to run WSS out of the box #139
Comments
Cramming thoughts here:https://zerossl.com/ apparently let users create a certificate for an IP, which would solve all of our troubles. https://zerossl.com/documentation/api/create-certificate/ certificate_domains | [Required] Use this parameter to specify one or multiple comma-separated domains (or IP addresses) to include in your certificate.
The connection would fail no matter what (since the PeerId in the multiaddress will be incorrect), so we don't really need bit Otherwise, relevant for Let's Encrypt, the rate limits: https://letsencrypt.org/docs/rate-limits/
If I go back to my first idea a bit, couldn't we do:
Protocol would be a lot simpler, though we will still hit let's encrypt rate limiting since everything is under the same domain. If we go back to your plan, Here, the real challenge will be, how to avoid "DDoS" on |
Tried zerossl for my node: Unfortunately, to verify your IP, you need to put a file at So if we go the zerossl route, here is what the process would look like:
Why do we need a "small certbot"?
So all of this wouldn't be zero-conf, but still a lot easier than setting DNS, imo |
Ah I see, yes makes sense but it means Alice needs to run
With a Dynamic DNS, you don't need a new certificate. You just need to update the DNS. Am I missing something?
That's good. A DP could just accumulate requests and batch them every ~4 hours (to not hit the 50 requests per week). It does mean waiting 4 hours for Alice to have websocket enabled. She can still use her node in the meantime via tcp.
I agree, in our case wss brings no security, we could do with plain websocket if browsers would allow it (but they don't in a secure environment).
Few thoughts:
Note: NordVPN has 5567 servers so yes a DP could get spammed on the first week but it's still limited. If with these mitigations, there are still DDOS issues then a DP may choose to only provide certs to RLN members.
Thank you for that. Yes, I agree it looks great. It also reinforce my initial thoughts that most of the heavy lifting should be on the DP side so that the user does not have to open 80 ports, install certbot etc.
Then the rest could be handled entirely by the DP and nwaku (including writing ssl file locally and loading at next restart) |
Problem
Currently, js-waku only support wss to connect to other nodes.
Works is WIP for:
However, they both come with limitations:
For a node operator to accept incoming WSS connection they need:
While (2) can be automated with letsencrypt, (1) is trickier as it means the operators needs to:
a. acquire the domain
b. setup the domain to point to their ip
This costs money, time and effort.
Finally, note that SSL certs are used to:
Libp2p, an hence Waku, has its own mechanism for this purpose:
Hence, in this use case, the SSL cert for WSS is only a technical barrier.
Suggested solution
Solution inspired by @Menduist https://discord.com/channels/864066763682218004/1019621534769352904/1022411714492375081
The idea would be for a DP (domain provider) to do (1) and (2) for the node operator:
<peer-id>
being a short encoding of Alice's peer id.Security considerations
Domain name censorship
States actors can censor domain names.
DP could decide to take down DNS entry.
mitigation:
Anyone can be a DP. Hence, we could recommend node operators to get certs from several DP (and hence domains) to mitigate the risk of censorship.
DP could be incentivized when providing a domain to encourage a multitude of domain names to be used.
Domain redirected to another IP
DP could decide to redirect some records to their own nodes, to decrease Waku decentralization or coordinate a sybil attack
mitigation: a node should connect using a multiaddr with both peer id and fqdn (ie, ENR), hence this risk is moot as long as peer ids are kept in the peer discovery protocols.
DP banned by LetsEncrypt
LetsEncrypt rate limits needs to be taken in account as a DP should avoid being banned because it tries to get too many certs for LetsEncrypt's liking.
mitigation: Encourage several DP, DP set mechanisms to avoid hitting rate limits.
Other comments
I believe the proposed protocol would work with current technology, without needing coordination with LetsEncrypt contrary to libp2p/go-libp2p#1360
The text was updated successfully, but these errors were encountered: