-
-
Notifications
You must be signed in to change notification settings - Fork 405
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
Certificate rotation for long running clients #474
Comments
It would be the |
Cool. Do you think exposing the edit: Nevermind the |
I would investigate a bit what can be done with (In general it would probably be cool to update the wider |
Alright I'll take a more in dept look once I get the time. |
A more general solution is to place a routing service in front of your application that can be used to direct new connections to a new instance of your application. Highly-available services will need something like this regardless to support graceful upgrades. QUIC is designed to support this case gracefully by allowing data (e.g. a phase bit) to be encrypted into the local connection ID to coordinate with external routing systems. Quinn does not currently provide any way to do this, but it's something we'll want to explore eventually. I don't believe anybody's working on standardizing encoding of information into connection IDs, so it may take substantial effort (e.g. a custom-written load balancer) to deploy in practice. |
Cool, wasn't aware of this.
I think this makes sense for updates that require application restart (OS updates or application update), but for certificates I'm not sold. If you run your own internal certificate authority and you emit short-lived certificates that you rotate often this would be a headache. But for web facing certificates which are usually long-lived that wouldn't be an issue. Moreover for gracefull updates of long running applications you still need to migrate your connected peers to the new server. For instance you would have to emit a notification telling the peer to connect to the new connection, maybe finish processing the pending request and then gracefully shutdown.
I'm afraid I'm not following. How would this phase bit be of use? |
Yeah, it's a big hammer. I'm not opposed to being able to update things live. Be aware that there are subtle 0-RTT correctness implications to changing some configuration parameters live; replacing the
To allow a stateless packet router to direct packets to the instance associated with their connection. Simple stateful routing based on storing connection IDs does not work because connections may change ID unpredictably. |
Currently the server's certificate can only be set once at the creation of the server (AFAIK). This means that certificate rotation is basically impossible for long running servers without restarting the socket. This might be unacceptable in use cases where certificates are rotated quickly (few hours).
An alternative solution would be hitless rotation. The strategy involves periodically updating the server's certificate so that new connections use that new certificate and old connections continue using the old certificate.
Do you think that updating a
Endpoint's
rustls::ServerSession
over time would achieve this effect?The text was updated successfully, but these errors were encountered: