Get an A on ssllabs.com with VMware Avi / NSX ALB (and keep it that way with SemVer!)

Cryptographic security is an important aspect of hosting any business-critical service.

When hosting a public service secured by TLS, it is important to strike a balance between compatibility (The Availability aspect of CIA), and strong cryptography (the Integrity or Authentication and Confidentiality aspects of CIA). To illustrate, let’s look at the CIA model:

In this case, we need to balance backward compatibility with using good quality cryptography -  here’s a brief and probably soon-to-be-dated overview of what we ought to use and why.

Protocols

This block is fairly easy, as older protocols are worse, right?

TLS 1.3

As a protocol, TLS 1.3 has quite a few great improvements and is fundamentally simpler to manage with fewer knobs and dials. There is a major concern with TLS 1.3 currently - security tooling in the large enterprise hasn’t caught up with this protocol yet as new ciphers like ChaCha20 don’t have hardware-assisted lanes for decryption. Here are some of the new capabilities you’ll like::

Here are some of the things you can do to mitigate the risk if you’re in a large enterprise that performs decryption:

TLS 1.2

TLS 1.2 is like the Toyota Corolla of TLS, it’s run for forever and not everyone maintains it properly.

It can still perform well if properly configured and maintained - we’ll go into more detail on how in the next section. The practices outlined here are good for all editions of TLS.

Generally, TLS 1.0 and 1.1 should not be used. Two OS providers (Windows XP, Android 4, and below) were disturbingly slow to adopt TLS 1.2, so if this is part of your customer base, beware.

Ciphers

This information is much more likely to be dated. I’ll try to keep this short:

Confidentiality

Integrity

Generally, AEAD provides an advantage here - SHA3 isn’t generally available yet but SHA2 variants should be the only thing used. The more bits the better!

Forward Secrecy

Matters of Practice

Before we move into the Avi-specific configuration, I have a recommendation that is true for all platforms:

Semantic Versioning

Cryptography practices change over time - and some of these changes break compatibility. Semantic versioning provides the capability to support three scales of change:

Let’s do it!

Let’s move into an example leveraging NSX ALB (Avi Vantage). Here, I’ll be creating a “first version,” but the practices are the same. First, navigate to Templates -> Security -> SSL/TLS Profile:

TLS Profile Location

TLS Profile

Note: I really like this about Avi Vantage, even if I’m not using it here. The security scores here are accurate, albeit capped out - VMware is probably doing this to encourage use of AEAD ciphers:

Cipher List

…but, I’m somewhat old-school. I like using Apache-style cipher strings because they can apply to anything, and everything will run TLS eventually. Here are the cipher strings I’m using - the first is TLS 1.2, the second is TLS 1.3.

ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384

TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256

Cipher Spec

One gripe I have here is that Avi won’t add the “What If” analysis like F5’s TM-OS does (14+ only).  Conversely, applying this profile is much easier. To do this, open the virtual service, and navigate to the bottom right:

Apply Profile

That’s it! Later on, we’ll provide examples of coverage reporting for these profiles. In a production-like deployment, these services should be managed with release strategies given that versioning is applied.