francoismichel / ssh3

SSH3: faster and rich secure shell using HTTP/3, checkout our article here: https://arxiv.org/abs/2312.08396 and our Internet-Draft: https://datatracker.ietf.org/doc/draft-michel-ssh3/
https://arxiv.org/abs/2312.08396
Apache License 2.0
3.18k stars 81 forks source link

Enable HTTP proxy support #89

Open francoismichel opened 6 months ago

francoismichel commented 6 months ago

Right now, HTTP proxies cannot be used as privkey and OIDC authentication explicitly sign the conversation ID derived by TLS exporters, binding the SSH3 conversation to the TLS session.

This PR adds support for proxies (cf #67, and #44 to a lesser extent). If explicitly set by the user, the conversation ID is removed from the auth token claims and the server relies on the expiration (exp) claim to prevent replay attacks. When proxy support is enabled, the user authentication token is valid for 1 minute and can therefore be used by proxies during that time window.

Proxies must therefore be trusted during that minute, as they could reuse that token for themselve, as it is the case for any HTTP authentication process relying on Bearer tokens. 1 minute is considered reasonable as it is a smaller duration than most popular SSO platforms and should be long enough to traverse the Internet.