edgedb / rfcs

RFCs for major changes to EdgeDB
Apache License 2.0
35 stars 5 forks source link

DRAFT: add TLS and ALPN support #36

Closed fantix closed 3 years ago

fantix commented 3 years ago

This pre-RFC is for early discussion and not a proper RFC yet, because it contains ambiguity and undecided options and questions, and is not yet following RFC 0001 properly.

rendered

UPDATE: Thank you all for the valuable comments! I'll summarize the outstanding questions or current decisions below for the next draft, and I'll close this PR as it is and start a new one on a new branch, so that the discussion history can be preserved.

  1. Use a local CA or issue self-signed certificates separately for each server instance? CA is easier to trust a single root certificate, and separate self-signed certificates is just cleaner like how SSH handles the server fingerprints.
  2. Store optional TLS settings in server config, don't use command parameters.
  3. UNIX socket: remove non-admin ones, clear text for admin socket and use the binary protocol only.
  4. We probably don't need passphrasses on the generated private keys?
  5. The client should transparently work with dev certs and prod certs, no additional switch is to be added.
  6. If an ALPN negotiation didn't succeed, error out.
  7. Optional TLS settings should have the same default as Python does.
  8. If the user brings cert files with them, we should just use them in place. Importing/copying adds more unnecessary work to us.
  9. NO for integrating with letsencrypt or something similar.
  10. Supporting client certificate authentication is a nice to have for this RFC.
  11. Who eventually generates the certificates? The Python server or the Rust CLI? Sounds like we'll use the Rust CLI.
  12. Which ALPN protocol option? Option 1.