8

Our application hosted on Google App Engine Node.js (Flexible Environment). We are now under review of security inspection and failing on the issue that Google App Engine supports TLS 1.0 and 1.1 versions.

Is there a way to enforce the use of only TLS 1.2? And also block ciphers that are below 128 bit?

alexkom
  • 121
  • 1
  • 6
  • 1
    Potentially of interest: https://stackoverflow.com/questions/42681247/can-google-app-engine-java-support-tls1-0?rq=1 – Dan Cornilescu Jan 23 '18 at 18:44
  • @DanCornilescu, so it seems in the app engine load balancer level and there is no way to control it, right? – alexkom Jan 24 '18 at 08:57
  • 1
    That's my understanding as well. Maybe technically not exactly the load balancer, but somewhere around there, in the edge common infra serving all cloud clients. – Dan Cornilescu Jan 24 '18 at 14:04
  • 1
    I think I found more info [here](https://stackoverflow.com/questions/40853799/is-there-a-way-to-customize-nginx-proxy-in-google-flexible-appengine). It seems that the nginx proxy that serving the request to app engine flex can't be customized. So no way to update the SSL policy – alexkom Jan 24 '18 at 19:12
  • 1
    The explanation in this answer also confirms it: https://stackoverflow.com/a/47617671/4495081 – Dan Cornilescu Jan 24 '18 at 19:17

3 Answers3

2

So I also came up against this problem...and found that GCP weren't that helpful. They'll helpfully restrict at a domain level if a support ticket is put forwards....which resolves the security concern...but you'll still get false positives which need explaining at every penetration test (the GAE shared IPs accept other version of TLS for other domains).

For a nice clean solution; use Cloudflare for your DNS. They essentially act as a middleman/web application firewall. Amongst other things (free certificates, WAF, DDOS mitigation, CDN, HTTPS force, HSTS etc etc etc), you're able to set the minimum TLS version as you wish. Mine is now minimum TLS 1.2, supporting TLS 1.3 if the browser accepts it. I've also essentially only got port 80/443 on GAE connected to cloudflare, with no public access at all, as all traffic goes through cloudflare first. Pretty neat - zero ports open to the public and a fully operations website! The pen test guys just scratched their heads and packed up.

Oh...and FYI - it's free for this level of configuration. Happy security testing ;-)

prout.james
  • 99
  • 1
  • 8
  • There's now a solution for this situation within GCP, which is [serverless NEGs](https://cloud.google.com/load-balancing/docs/negs/serverless-neg-concepts). You'll be able to configure your own endpoint without a shared IP and whatever certs you want. – Jofre Oct 12 '21 at 15:12
  • In 2023, is there a way to set min TLS of 1.2 using GCP *without* the additional cost associated with implementing a static ip and load balancer / forwarding rules? AWS is setting this as standard in their serverless products, so I am surprised Google is still requiring customers to go through this process and incur the additional costs. – beano Jul 24 '23 at 09:00
2

I can confirm that you can make a request to google support and it takes up to 4 weeks to make the change. Not sure why. Hopefully they can speed things up in the future. But alternatively you can handle this logic at the application layer (in middleware) rather than the network layer. See snippet below:

// using NODEJS + TYPESCRIPT 
// disable tls 1.0 and 1.1 weak ciphers
this.app.use((req, res, next) => {
      // const cipher = ((req.socket) as TLSSocket).getCipher()
      const protocol = ((req.socket) as TLSSocket).getProtocol()
      // console.log('cipher: ', cipher);
      // output eg: { name: 'ECDHE-RSA-AES128-GCM-SHA256', version: 'TLSv1/SSLv3' }
      console.log('protocol: ', protocol);
      // output eg: TLSv1.2

      if (protocol === 'TLSv1.2' || protocol === 'TLSv1.3') {
          next();
      } else {
          res.status(426);
          res.send('request requires TLSv1.2 or greater, please upgrade');
      }
  });
Chase Oliphant
  • 379
  • 2
  • 5
0

I've not tried this so I can't guarantee it would work, but it seems like you could use a HTTP(S) Load Balancer. The SSL policies are configurable such that it would likely meet the requirements of your security review.

jcjones1515
  • 471
  • 4
  • 12