Published on 00/00/0000
Last updated on 00/00/0000
Published on 00/00/0000
Last updated on 00/00/0000
Share
Share
15 min read
Share
Note that there is a newer/updated FIPS version, FIPS 140-3. FIPS 140-3 testing will begin on September 22, 2020.
You might want to check out how we manage AWS GovCloud Kubernetes clusters with Pipeline
For a guide on how to read an FIPS Validation Listing, follow this linkIn microservices architecture, as its name implies, multiple services (applications) are employed to implement scalable, flexible, fault-tolerant and secure products that serve complex business requirements. The components that such a system comprise are often written in different programming languages using different technologies. Ensuring that each of these components use an FIPS validated cryptographic module can be easily complicated:
Note: as FIPS introduces lots of restrictions on the accepted cipher suites and can introduce cryptographic incompatibilities, the default version of Backyards (now Cisco Service Mesh Manager) is still built with the standard SSL libraries. If you'd like to use an FIPS compliant version of Istio/Backyards (now Cisco Service Mesh Manager), get in touch with us.
BoringSSL is a fork of OpenSSL that is designed to meet Google’s needs.BoringSSL as a whole is not FIPS validated. However, there is a core library (called BoringCrypto) that has been FIPS validated. Google also maintains a Go fork that can use BoringCrypto for cryptographic functions.
The distribution name for a Go+BoringCrypto release has the form < GoVersion>b< BoringCryptoVersion>, where < GoVersion> is the Go version the release is based on, and < BoringCryptoVersion> is an integer that increments each time there is a new release with different BoringCrypto bits.You can use the Go+BoringCrypto distribution as a drop-in replacement, no code changes usually needed for simple compilation. Indeed, it takes more than just a plain re-compile to get our application to make use of the BoringCrypto. The application has to be re-compiled with specific build configuration:
To check whether a given binary is using BoringCrypto, runFurthermore, we made changes in the Istio codebase to make sure that FIPS is enforced properly in each and every binary. Our build has a more strict TLS configuration than FIPS 140-2 requires, and places similar limitations on TLS versions and used ciphers. This required additional changes in the codebase, but it further enhanced application security. Compare the built binaries The compiled binaries can be verified by the aforementionedgo tool nm
on it and check that it has symbols named*_Cfunc__goboringcrypto_*
. The program rsc.io/goversion will report the crypto implementation used by a given binary when invoked with the -crypto flag.
goversion
tool.
If we check the upstream binary of Istiod, for example, we'll find that it uses the standard non-FIPS compliant standard Go crypto:
❯ goversion ./pilot-discovery
pilot-discovery go1.14.2 (standard crypto)
❯ goversion ./pilot-discovery
pilot-discovery go1.14.6b4 (boring crypto) +crypto/tls/fipsonly
Every Istio component the FIPS compliant Backyards distribution deploys uses custom built binaries that are using FIPS 140-2 validated BoringCrypto library.
--define boringssl=fips
build option.
The correctness of the resulting FIPS build can be verified by checking the presence of BoringSSL-FIPS in the --version
output.
Besides the FIPS compliant build of Envoy, we've also made changes in Istio to ensure that the generated Envoy configuration distributed through XDS has strict and compliant TLS settings.
Compare the Envoy builds
The upstream Istio proxy image contains a non-FIPS 140-2 compliant Envoy build:
~ ❯ docker run -ti --rm --entrypoint envoy istio/proxyv2:1.6.7 --version
envoy version: ccae1bd37085ecd78415dc06b50233b3b97e30c0/1.14.4/Clean/RELEASE/BoringSSL
~ ❯ docker run -ti --rm --entrypoint envoy banzaicloud/istio-proxyv2:1.6.7-bzc-fips --version
envoy version: 136ca7b03ff5821697d68b77e7411dbc6bfdd5ef/1.14.4/Clean/RELEASE/BoringSSL-FIPS
If you are interested in cert-manager on Kubernetes, we recently blogged [about > it]({{< relref "/blog/cert-management-on-kubernetes.md" >}}), specifically about [cert management on > Istio]({{< relref "/blog/cert-management-on-istio.md" >}}) as well.Compare the built cert-manager binaries If we check the upstream version of the cert manager controller we'll find that it is uses standard Go crypto:
❯ goversion -crypto ./controller
./controller go1.14.2 (standard crypto)
❯ goversion -crypto ./controller
./controller go1.14.2 (standard crypto)
frontpage
service which serves requests on port 8080. The Istio mesh is configured with strict auto mTLS on both clusters.
Since the most visible aspects of FIPS 140-2 compliance are the TLS settings, the last item in the demo toolbox today is a handy TLS/SSL testing tool called testssl.sh.
❯ kubectl create -f - <<EOF
apiVersion: v1
kind: Pod
metadata:
name: testssl
namespace: default
spec:
containers:
- name: app
image: drwetter/testssl.sh
command: [ "/bin/sh", "-c", "--" ]
args: [ "while true; do sleep 3000; done;" ]
EOF
frontpage
service endpointfrontpage
service on the cluster that uses the non-FIPS compliant build. The workload runs inside an Istio mesh, thus the TLS here is provided by Istio sidecar Envoy proxy.
non FIPS compliant cluster ❯ kubectl exec -ti testssl -- testssl.sh https://frontpage.backyards-demo.svc.cluster.local.:8080
Start 2020-08-06 13:46:47 -->> 10.11.241.177:8080 (frontpage.backyards-demo.svc.cluster.local.) <<--
rDNS (10.11.241.177): frontpage.backyards-demo.svc.cluster.local.
Service detected: certificate-based authentication => skipping all HTTP checks
Testing protocols via sockets except NPN+ALPN
SSLv2 not offered (OK)
SSLv3 not offered (OK)
TLS 1 offered (deprecated)
TLS 1.1 offered (deprecated)
TLS 1.2 offered (OK)
TLS 1.3 offered (OK): final
NPN/SPDY not offered
ALPN/HTTP2 h2 (offered)
Testing cipher categories
NULL ciphers (no encryption) not offered (OK)
Anonymous NULL Ciphers (no authentication) not offered (OK)
Export ciphers (w/o ADH+NULL) not offered (OK)
LOW: 64 Bit + DES, RC[2,4], MD5 (w/o export) not offered (OK)
Triple DES Ciphers / IDEA not offered
Obsoleted CBC ciphers (AES, ARIA etc.) offered
Strong encryption (AEAD ciphers) with no FS offered (OK)
Forward Secrecy strong encryption (AEAD ciphers) offered (OK)
Testing server's cipher preferences
Has server cipher order? yes (OK) -- only for < TLS 1.3
Negotiated protocol TLSv1.3
Negotiated cipher TLS_AES_256_GCM_SHA384, 253 bit ECDH (X25519)
Cipher per protocol
Hexcode Cipher Suite Name (OpenSSL) KeyExch. Encryption Bits Cipher Suite Name (IANA/RFC)
-----------------------------------------------------------------------------------------------------------------------------
SSLv2
-
SSLv3
-
TLSv1 (server order)
xc013 ECDHE-RSA-AES128-SHA ECDH 256 AES 128
x2f AES128-SHA RSA AES 128
xc014 ECDHE-RSA-AES256-SHA ECDH 256 AES 256
x35 AES256-SHA RSA AES 256
TLSv1.1 (server order)
xc013 ECDHE-RSA-AES128-SHA ECDH 256 AES 128
x2f AES128-SHA RSA AES 128
xc014 ECDHE-RSA-AES256-SHA ECDH 256 AES 256
x35 AES256-SHA RSA AES 256
TLSv1.2 (server order)
xcca8 ECDHE-RSA-CHACHA20-POLY1305 ECDH 253 ChaCha20 256
xc02f ECDHE-RSA-AES128-GCM-SHA256 ECDH 253 AESGCM 128
xc013 ECDHE-RSA-AES128-SHA ECDH 253 AES 128
x9c AES128-GCM-SHA256 RSA AESGCM 128
x2f AES128-SHA RSA AES 128
xc030 ECDHE-RSA-AES256-GCM-SHA384 ECDH 253 AESGCM 256
xc014 ECDHE-RSA-AES256-SHA ECDH 253 AES 256
x9d AES256-GCM-SHA384 RSA AESGCM 256
x35 AES256-SHA RSA AES 256
TLSv1.3 (no server order, thus listed by strength)
x1302 TLS_AES_256_GCM_SHA384 ECDH 253 AESGCM 256
x1303 TLS_CHACHA20_POLY1305_SHA256 ECDH 253 ChaCha20 256
x1301 TLS_AES_128_GCM_SHA256 ECDH 253 AESGCM 128
Testing robust forward secrecy (FS) -- omitting Null Authentication/Encryption, 3DES, RC4
FS is offered (OK) TLS_AES_256_GCM_SHA384
TLS_CHACHA20_POLY1305_SHA256
ECDHE-RSA-AES256-GCM-SHA384
ECDHE-RSA-AES256-SHA
ECDHE-RSA-CHACHA20-POLY1305
TLS_AES_128_GCM_SHA256
ECDHE-RSA-AES128-GCM-SHA256
ECDHE-RSA-AES128-SHA
Elliptic curves offered: prime256v1 X25519
FIPS compliant cluster ❯ kubectl exec -ti testssl -- testssl.sh https://frontpage.backyards-demo.svc.cluster.local.:8080
Start 2020-08-06 14:32:22 -->> 10.63.243.56:8080 (frontpage.backyards-demo.svc.cluster.local.) <<--
rDNS (10.63.243.56): frontpage.backyards-demo.svc.cluster.local.
Service detected: certificate-based authentication => skipping all HTTP checks
Testing protocols via sockets except NPN+ALPN
SSLv2 not offered (OK)
SSLv3 not offered (OK)
TLS 1 not offered
TLS 1.1 not offered
TLS 1.2 offered (OK)
TLS 1.3 offered (OK): final
NPN/SPDY not offered
ALPN/HTTP2 h2 (offered)
Testing cipher categories
NULL ciphers (no encryption) not offered (OK)
Anonymous NULL Ciphers (no authentication) not offered (OK)
Export ciphers (w/o ADH+NULL) not offered (OK)
LOW: 64 Bit + DES, RC[2,4], MD5 (w/o export) not offered (OK)
Triple DES Ciphers / IDEA not offered
Obsoleted CBC ciphers (AES, ARIA etc.) not offered
Strong encryption (AEAD ciphers) with no FS offered (OK)
Forward Secrecy strong encryption (AEAD ciphers) offered (OK)
Testing server's cipher preferences
Has server cipher order? yes (OK) -- only for < TLS 1.3
Negotiated protocol TLSv1.3
Negotiated cipher TLS_AES_256_GCM_SHA384, 256 bit ECDH (P-256)
Cipher per protocol
Hexcode Cipher Suite Name (OpenSSL) KeyExch. Encryption Bits Cipher Suite Name (IANA/RFC)
-----------------------------------------------------------------------------------------------------------------------------
SSLv2
-
SSLv3
-
TLSv1
-
TLSv1.1
-
TLSv1.2 (server order)
xc02f ECDHE-RSA-AES128-GCM-SHA256 ECDH 256 AESGCM 128
xc030 ECDHE-RSA-AES256-GCM-SHA384 ECDH 256 AESGCM 256
x9c AES128-GCM-SHA256 RSA AESGCM 128
x9d AES256-GCM-SHA384 RSA AESGCM 256
TLSv1.3 (no server order, thus listed by strength)
x1302 TLS_AES_256_GCM_SHA384 ECDH 256 AESGCM 256
x1303 TLS_CHACHA20_POLY1305_SHA256 ECDH 256 ChaCha20 256
x1301 TLS_AES_128_GCM_SHA256 ECDH 256 AESGCM 128
Testing robust forward secrecy (FS) -- omitting Null Authentication/Encryption, 3DES, RC4
FS is offered (OK) TLS_AES_256_GCM_SHA384
TLS_CHACHA20_POLY1305_SHA256
ECDHE-RSA-AES256-GCM-SHA384
TLS_AES_128_GCM_SHA256
ECDHE-RSA-AES128-GCM-SHA256
Elliptic curves offered: prime256v1
Backyards provides gateway configuration features with Let's Encrypt support utilizing an FIPS 140-2 compliant build of cert-manager, so the same TLS settings apply not just in east-west mTLS communication, but for ingress TLS traffic as well.
Although FIPS 140-2 would allow lower TLS versions under some circumstances, we disabled them for security reasons. TLS 1.0 and 1.1 are out-of-date protocols that do not support modern cryptographic algorithms, and they contain security vulnerabilities that may be exploited by attackers. The IETF is also planning to officially deprecate both protocols. In addition, the vast majority of encrypted Internet traffic is now over TLS 1.2, which was introduced over a decade ago.Allowed FIPS compatible ciphers
There are more ciphers allowed by FIPS 140-2. We only enable GCM ciphers, because only those ciphers can prevent a LUCKY13 timing attackAllowed Elliptic-curve algorithm
Check out Backyards in action on your own clusters! Register for an evaluation version and run a simple install command! If you’d like to use a FIPS 140-2 compliant version of Istio/Backyards, get in touch with us. Or just take a look at some of the Istio features that Backyards automates and simplifies for you, and which we've already blogged about. .
Get emerging insights on emerging technology straight to your inbox.
Outshift is leading the way in building an open, interoperable, agent-first, quantum-safe infrastructure for the future of artificial intelligence.
* No email required
The Shift is Outshift’s exclusive newsletter.
Get the latest news and updates on generative AI, quantum computing, and other groundbreaking innovations shaping the future of technology.