4 ms·
It's probably the biggest problem with pairing HTTP(S)/1.1 and REST. TLS/SSL will require a session that is much more "bound" (entangled?) -- and really would b
by e12e 11y ago
It's probably the biggest problem with pairing HTTP(S)/1.1 and REST. TLS/SSL will require a session that is much more "bound" (entangled?) -- and really would be the sane place to keep track of authentication/id bindings (Who is the client?) -- and use as a basis for authorization (What does this client have access to). But because of the "bolt-on" nature of TLS, we get things like TLS terminating proxies/load-balancers etc, and a lot of passing flags in headers (ProyxN confirms that it's relaying over plain-text HTTP on the (assumed to be) secure internal network, on behalf of clientX that's connected over TLS and has been authenticated...).
The "simple" answer is to have client-certificates, and allow a client access directly to an application server over TLS, or use a secure transport (eg: IPSec), and just use standard HTTP auth on every pass (which AFAIK never was extended to use some form of standardized token, so one's left with sending the actual login/password pair every time).
The sane compromise is to just use encrypted cookies -- but they are also bolt on solutions.
The problem is that essentially one needs encryption to ensure secure sessions, which essentially boil down to authenticating the client to the server, and the server to the client, and forming some kind of session (typically DH for a symmetric session key).
For a long while, encryption was really expensive compared to the db lookup and template render that "every" web application did -- and so we've ended up with a mess of "best practices" which aren't very good at all (and not a very good way of moving from REST-that-trusts-plaintext-ip to REST-and-also-secure).
With HTTP/2 it looks like things are moving towards making the transport-protocol part do the things it should -- track the session, and secure the session. Still doesn't do a good job of authenticating the client in any meaningful way, but it should simplify some of the assumptions that are necessary to build a secure(ish) system.