Julien Vehent on cloud security, risk management and web services engineering.
by Julien Vehent
Over the past few years I’ve followed the rise of the BeyondCorp project, Google’s effort to move away from perimetric network security to identity-based access controls. The core principle of BeyondCorp is to require strong authentication to access resources rather than relying on the source IP a connection originates from. Don’t trust the network, authenticate all accesses, are requirements in a world where your workforce is highly distributed and connects to privileged resources from untrusted networks every day. They are also a defense against office and datacenter networks that are rarely secure enough for the data they have access to. BeyondCorp, and zero trust networks, are good for security. This isn’t new. Most modern organizations have completely moved away from trusting source IPs and rely on authentication to grant access to data. But BeyondCorp goes further by recommending that your entire infrastructure should have a foot on the Internet and protect access using strong authentication. The benefits of this approach are enormous: employees can be fully mobile and continue to access privileged resources, and compromising an internal network is no longer sufficient to compromise the entire organization.
As a concept, this is good. And if you’re hosting on GCP or are willing to proxy your traffic through GCP, you can leverage their Identity and Access Proxy to implement these concepts securely. But what about everyone else? Should you throw away your network security and put all your security in the authentication layer of your applications? Maybe not…
At Mozilla, we’ve long adopted single sign on, first using SAML, nowadays using OpenID Connect (OIDC). Most of our applications, both public facing and internal, require SSO to protect access to privileged resources. We never trust the network and always require strong authentication. And yet, we continue to maintain VPNs to protect our most sensitive admin panels.
“How uncool”, I hear you object, “and here we thought you were all about DevOps and stuff”. And you would be correct, but I’m also pragmatic, and I can’t count the number of times we’ve had authentication bugs that let our red team or security auditors bypass authentication. The truth is this: even highly experienced programmers and operators make mistakes and will let a bug disable or fail to protect parts of that one super sensitive page you never want to leave open to the internet. And I never blame them because SSO/OAuth/OIDC are massively complex technologies that require huge libraries that fail in weird and unexpected ways. As a result, I’ve never reached the point where I fully trust our SSO, and continue to find auth bypass vulnerabilities every other month. Here’s the catch: they never lead to major security incidents because we put all our admin panels behind a good old VPN.
Those VPNs that no one likes to use or maintain (me included) also provide a stable and reliable security layer that simply never fails. They are far from perfect, and we don’t use them to authenticate users or grant access to resources, but we use them to cover our butts when the real authentication layer fails. So far, real world experience continues to support this model.
So, there, you have it: adopt BeyondCorp and zero trust networks, but also consider keeping your most sensitive resources behind a good old VPN (or an SSH jumphost, whatever works for you). VPNs are good at reducing your attack surface and adding an extra layer of protection to your infrastructure. You’ll be thankful to have one the next time you find a bypass in your favorite auth library.tags: