Google Cloud Loud Balancer SSL Handshake failure - ssl

I have set up a Google Cloud Http(s) Load Balancer with Frontend of Https and Backend of Http. I am getting the following error through Postman for my service:
Error: write EPROTO 140566936757448:error:10000410:SSL routines:OPENSSL_internal:SSLV3_ALERT_HANDSHAKE_FAILURE:../../third_party/boringssl/src/ssl/tls_record.cc:594:SSL alert number 40 140566936757448:error:1000009a:SSL routines:OPENSSL_internal:HANDSHAKE_FAILURE_ON_CLIENT_HELLO:../../third_party/boringssl/src/ssl/handshake.cc:603:
The VM itself works if I call it directly with Http. Is this setup possible or what am I missing?

SSLV3 is not supported by HTTPS load balancer. Please, use a newer (and more secure) version to call your HTTPS load balancer

Related

SSL Client Authentication with Google Cloud Run

I'm trying to move an existing backend over to Google Cloud Run. Some of the endpoints (under a specific subdomain) require SSL Client Authentication. The way this is handled at the moment is on Nginx configuration level:
server {
listen 443 ssl http2;
server_name secure.subdomain.example.com;
[...]
# SSL Client Certificate:
ssl_client_certificate xxx.pem;
ssl_verify_client on;
[...]
location / {
if ($ssl_client_verify != "SUCCESS") { return 403 $ssl_client_verify; }
[...]
}
}
What would be the best approach to handle SSL client certificate authentication with Google Cloud Run? I assume this would need some sort of load balancer on the correct network layer and with support for cloud run?
Of course there is always the option to authenticate in the ExpressJS app, but if possible I would prefer it to happen before even reaching Cloud Run.
What would be the best approach to handle SSL client certificate
authentication with Google Cloud Run?
Cloud Run does not support SSL Client Certificate Authentication. The GFE (Google Front End) proxies requests for Cloud Run applications and does not pass-through requests. The only Google Cloud load balancers that support SSL client certificates are based on Google Maglev.
None of the Google Cloud managed compute services support SSL client certificate authentication (mutual TLS authentication).
Consider using Compute Engine instead of Cloud Run.Then configure Nginx to handle client authentication. For load balancing, use a pass-through load balancer such as External TCP/UDP Network Load Balancer
You can't achieve that with Cloud Run. The SSL connection is terminated at the load balancer side (On an HTTPS load balancer, or on the Cloud Run built-in load balancer). You only receive HTTP traffic to your service.
Indeed, you can add additional security information, in the request header, but you lost the SSL flavor.

Loadbalancing GCP ALERT_HANDSHAKE_FAILURE

Hi im trying to config a HTTPS loadbalancer in GCP but when i made it
show me that:
Error: write EPROTO 140392502987240:error:10000410:SSL routines:OPENSSL_internal:SSLV3_ALERT_HANDSHAKE_FAILURE:../../third_party/boringssl/src/ssl/tls_record.cc:594:SSL alert number 40 140392502987240:error:1000009a:SSL routines:OPENSSL_internal:HANDSHAKE_FAILURE_ON_CLIENT_HELLO:../../third_party/boringssl/src/ssl/handshake.cc:604:
I use GCP default as default politic ssl
And the certificate is valid:
My frontends
But is still not working, i dont know what other thing do.
SSL proxy load balancers and global external HTTP(S) load balancers do not support SSL versions 3.0(SSLV3) or earlier. So, try to use a newer and more secure version to call the HTTPS Load balancer. Check whether the certificate is valid and linked properly with the page.
EDIT:
SSL fatal error, handshake failure 40 indicates the secure connection failed to establish because the client and the server couldn't agree on connection settings. Usually because the client or the server is way too old, only supporting removed protocols/ciphers. Try adding the domain name of the server to connect and a TLS connection will be established.
Example:
$ openssl s_client -connect 104.26.3.5:443 -servername external.example.com

How to deliver websocket traffic from GCP load balancer to websocket server

currently my websocket traffic is delivering from gcp load balancer to nginx to websocket server. am planning to remove one hop so that if i remove nginx. Then how to configure my websocket port (Reserved port) to gcp load balancer so that my websocket traffic will come from gcp load balancer.
Is GCP load balancer support libwebsocket?
Can i configure my own port at GCP load balancer (except 443/80)
I have created a Load Balancer setup today which supports WebSockets with the new TCP SSL Proxy Load Balancer from GCP.
Here's how:
You need to use SSL on the frontend configuration with your SSL
certificate.
Then you need to have a TCP backend configuration pointing to your instance group and correct WebSocket port on your server.
You need to have session affinity enabled on the backend configuration.

How does TLS handshake work in a load balanced system?

We are using rancher docker orchestration tool: it is using HAProxy for enabling load balancing.
I am wondering how how a hanshake is processed if a new HTTPS connection to a service is established.
Is the the handshake done between client and the load balancer (rancher/HAProxy) or will the load balancer just forward the HTTPS requests to the backend service?
It depends how you configure it.
SSL Termination the handshake is done by the load balancer.
SSL pass-through the handshake is done by the backend.

Amazon AWS - EC2 - Load Balancer (ELM) & SSL Questions

Background:
I had 1 instance created for EC2
I had my domain pointing to this instance
I had SSL installed for this instance (things were running great)
Furthermore:
I opted to create a second instance (using custom AMI from first instance)
I create a load balancer (things were working great -- from what i can tell...)
Question:
Why do I need to install the SSL certificate on the load balancer when it seems to have already been working?
I would presume when you say load balancer, you are refering to AWS ELB. If this is no the case, then disregard my answer.
Well the Best practice is to install SSL certs on load balancer and do the SSL termination there. Let the load balacner do SSL encryption/decryption so that your web server can do what they do the BEST...serving hte web pages.
Why do I need to install the SSL certificate on the load balancer
Now, technically You set is fine and you don't have to install SSL on load balancer. But then you have to use TCP Load Balancing feature of AWS ELB where in ELB will simply accespt traffic on 443 and will forward it to Web servers on 443. And then let your web servers do the SSL work.
I think this what you are looking for.