I donβt see how this can be done in two-way HTTPS mode, because ELB establishes a second TCP connection to the internal server and internally decrypts / encrypts the payload on / from the client and server ... so the server will not see the client certificate directly, and there are no documented X-Forwarded- * headers other than -For, -Proto, and -Port.
With an ELB running in TCP mode, on the other hand, SSL negotiation is performed directly between the client and server when the ELB blindly binds streams together. If the server supports the PROXY protocol, you can enable this functionality in ELB so that you can identify the client, outgoing IP and port on the server, and also identify the clientβs certificate directly, because the client will negotiate directly with you ... although this means that you no longer upload SSL to ELB, which may be part of what you are trying to do.
Update:
It doesn't seem like there is a way to do everything you want to do - unload SSL and identify the client certificate - only using ELB. The information below is "what it is for."
Apparently, HAProxy supports client certificate support in version 1.5 and passes certificate information in X- headers. Since HAProxy also supports the PROXY protocol through configuration (something like tcp-request connection expect-proxy lines) ... so it seems possible that you could use HAProxy for TCP-mode ELB, while HAProxy terminates the SSL connection and redirects information about the client's IP address from ELB (via the PROXY protocol) and client certificate information to the application server ..., thereby allowing you to support SSL offloading.
I mention this because it seems like an additional solution, perhaps more fully functional than any platform, and at least in 1.4, these two products work seamlessly together - I use HAProxy 1.4 for ELB successfully for all requests on my the largest web platform (in my case, ELB uploads SSL - no client certificates), and it seems to be a solid combination, despite the obvious redundancy of cascading load balancers. I like the fact that ELB is the only thing in the big bad Internet, although I have no reason to think that directly affected HAProxy will be problematic in itself. In my application, ELBs exist to balance between HAProxies in A / Z (which I originally planned to auto-scale as well, but the processor load remained so low even during our busy season that I never had more than one in Zone availability, and I never lost it, but ...), which can then do some filtering, forwarding and splitting headers before delivering traffic to the actual platform in addition to giving me some protocols, rewriting and traffic -splitting control, which I have no with ELB yourself.
Michael - sqlbot
source share