TLS Passthrough Explained

  Рет қаралды 7,333

Hussein Nasser

Hussein Nasser

3 жыл бұрын

In this video, I explain what is TLS Passthrough specifically to Layer 4 Proxying.
0:50 Proxy playlist
3:15 L4 vs l7
4:45 TCP Handhsake
6:45 TLS Hanshake
12:43 Diffi helman
🏭 Backend Engineering Videos
• Backend Engineering (B...
💾 Database Engineering Videos
• Database Engineering
🛰 Network Engineering Videos
• Network Engineering
🏰 Load Balancing and Proxies Videos
• Proxies
🐘 Postgres Videos
• PostgresSQL
🚢Docker
• Docker
🧮 Programming Pattern Videos
• Programming Patterns
🛡 Web Security Videos
• Web Security
🦠 HTTP Videos
• HTTP
🐍 Python Videos
• Python by Example
🔆 Javascript Videos
• Javascript by Example
👾Discord Server / discord
Become a Member
/ @hnasr
Support me on PayPal
bit.ly/33ENps4
Become a Patreon
/ hnasr
Stay Awesome,
Hussein

Пікірлер: 25
@ArunprasadRajkumar
@ArunprasadRajkumar 3 жыл бұрын
I was trying to understand how virtual hosting works with https. Finally landed on this and SNI is the answer :)
@ardeleanvladgeorge7493
@ardeleanvladgeorge7493 2 жыл бұрын
Man, I appreciate your vid, the content is good. All the goofing around makes it harder to pay attention to the content however.
@ccyk9994
@ccyk9994 Жыл бұрын
Hi Hussein, thank you for your explanation. I just wondering what did the proxy actually do in the middle to pass the traffic to the backend servers without modifying the original packet? or the proxy is keeping modifying the destination address(redirecting the request to backend servers even if the session is ongoing ), but not the SSL handshake?
@MrZerged
@MrZerged 3 жыл бұрын
Are we going to talk about the pro’s/con’s of the different LB connection patterns? You totally spiked my interest!
@hnasr
@hnasr 3 жыл бұрын
I think I did right here kzbin.info/www/bejne/l3ywfZp8i92Nj80
@sariksiddiqui6059
@sariksiddiqui6059 3 жыл бұрын
How ,for layer4 proxy,would reverse proxy passthrough request to appropriate server if server is to be decided based on path(ex location in nginx) and not the host(so SNI doesnt come into picture)?Ex host.com/path1 goes to 1.1.1.1 and host.com/path2 to 2.2.2.2
@hnasr
@hnasr 3 жыл бұрын
Siddiqui Sarik you can’t do a path location routing on layer 4 proxying mainly because the content is encrypted.. one limitation to layer 4 proxying..
@sariksiddiqui6059
@sariksiddiqui6059 3 жыл бұрын
@@hnasr thanks,that was my exact doubt
@rickyu1978
@rickyu1978 Ай бұрын
Old video , new comment: I am doing research in to TLS termination on sites like AWS S3. Is there a moment after TLS termination and before Server Side Encryption that the data is in plaintext in memory on the server? Is this prone to some kind of attack? If at any point the data is unencrypted is a vulnerability, what are your thoughts. I search aws s3 website, they dont talk about this. But they do say that data is encrypted at rest. If data is uploaded using multipart upload (for large files) it has to be decrypted on their side using their ssl private key? Load balances that decrypt the data, often need to pass it to other endpoints and when configured AWS services you can choose to do so without TLS, and the end user will never know. (maybe faster processing, cheaper etc)
@boonchusworkbench6784
@boonchusworkbench6784 3 жыл бұрын
I have heard about two approach in the real world, TLS passthrough vs. TLS re-encrypt. What is the use case to apply either side? I still have to understand how to apply when features are available in haproxy.
@hnasr
@hnasr 3 жыл бұрын
Boonchu's workbench I discussed those little bit in the haproxy video I think. Check it out
@NastyWicked
@NastyWicked 3 жыл бұрын
I have a love-hate relationship with proxies, setting them up properly and taking every possible scenario into account is a pain in the ass. TLS passthrough can also be implemented in forward proxies, as I do with squid proxy. Peeking at SNI in TLS client hello and deciding whether to terminate tls, and to reestablish the connection to a specific endpoint requiring SSL/TLS client certificate authentication. All other sites are then either allowed using TLS passthrough if they are whitelisted, while the rest are terminated. And sure enough, I can see every HTTP requesst on the terminated site, while in TLS passthrough you can only see HTTP CONNECT requests for allowed sites and TCP_DENIED for the discarded ones.
@hnasr
@hnasr 3 жыл бұрын
Thanks for sharing! Proxying is difficult and unless you understand the fundamentals you will be lost.. even with that I feel lost sometimes
@palaniappanrm6277
@palaniappanrm6277 3 жыл бұрын
Small doubt. If we have 2 instances running in backend and the reverse proxy does TLS pass through, then it should do some sticky session stuff right so that the TLS connection established between 1 of the backend will be the server always used for the subsequent requests?
@hnasr
@hnasr 3 жыл бұрын
Good question! Correct, it will look at the SNI extension in TLS client hello and forward it to the correct backend matching the domain. I am interested to know what will happen to that once ESNI comes to the picture.
@palaniappanrm6277
@palaniappanrm6277 3 жыл бұрын
@@hnasr yeah ESNI will complicate things further. And my doubt was not having SNI in the headers. A simple architecture with some proxy server which load balances to 2 BE instances. In this case, if TLS is established between client and one instance of BE, all the further requests until the keep alive of TCP connection should be forwarded to the same BE instance right? It can't be forwarded to the other bec the other can't decrypt the data.
@hnasr
@hnasr 3 жыл бұрын
Correct TCP proxying is sticky by nature all requests on same tcp connection should always go to the same backend connection (source port/source address mapping)
@ca7986
@ca7986 3 жыл бұрын
❤️
@soribung4707
@soribung4707 3 жыл бұрын
thanks for your video! could your please take a video about envoy proxy and istio? 😊
@hnasr
@hnasr 3 жыл бұрын
SangHyo Han making a video on Envoy as we speak! Research mode..
@ArunprasadRajkumar
@ArunprasadRajkumar 3 жыл бұрын
Super video! I applauded for ₹40.00 👏
@hnasr
@hnasr 3 жыл бұрын
🙏🙏
@nityadeepika1967
@nityadeepika1967 2 жыл бұрын
Nice ! but TLS passthrough looks like a Layer 7 reverse-proxy (AWS Application Load Balancer or AWS ALB) and TLS termination looks like a layer 4 reverse-proxy (AWS Network load balancer or AWS NLB). But when it comes to looking at the packet, I think both AWS ALB and AWS NLB can see/read the client request. AWS ALB has path based routing, HTTP header based routing, etc., based on which it sends the request to backend server. that way, AWS ALB(Layer 7 LB) can look at the data. And, NLB has an option for TLS termination, so coz of that NLB(layer 4) can also look at the data. Correct me if I'm wrong.
@pieter5466
@pieter5466 Жыл бұрын
11:01 Actual TL:S passthrough. :)
Transport Layer Security (TLS) - Computerphile
15:33
Computerphile
Рет қаралды 470 М.
Is there a Limit to Number of Connections a Backend can handle?
18:43
Hussein Nasser
Рет қаралды 32 М.
OMG🤪 #tiktok #shorts #potapova_blog
00:50
Potapova_blog
Рет қаралды 17 МЛН
1❤️#thankyou #shorts
00:21
あみか部
Рет қаралды 88 МЛН
Alat Seru Penolong untuk Mimpi Indah Bayi!
00:31
Let's GLOW! Indonesian
Рет қаралды 8 МЛН
HTTPS, SSL, TLS & Certificate Authority Explained
43:29
Laith Academy
Рет қаралды 66 М.
Kerberos Authentication Explained | A deep dive
16:52
Destination Certification
Рет қаралды 329 М.
What is a Protocol? (Deepdive)
18:14
LiveOverflow
Рет қаралды 158 М.
Proxy vs Reverse Proxy (Real-world Examples)
5:17
ByteByteGo
Рет қаралды 516 М.
Server Name Indication (SNI) TLS Extension Explained
12:55
Hussein Nasser
Рет қаралды 21 М.
What are Third Party Cookies, How do they work?
16:28
Hussein Nasser
Рет қаралды 15 М.
Proxy vs Reverse Proxy Server Explained
14:18
Hussein Nasser
Рет қаралды 129 М.
Samsung S24 Ultra professional shooting kit #shorts
0:12
Photographer Army
Рет қаралды 32 МЛН
Will the battery emit smoke if it rotates rapidly?
0:11
Meaningful Cartoons 183
Рет қаралды 32 МЛН