facebook noscript

VGS + Web Application Firewall: Part 2

July 1, 2021
VGS + Web Application Firewall Part 2

VGS + WAF = <3

“VGS + Web Application Firewall: Part 1” discussed the need for enterprises to invest in a Web Application Firewall, or WAF, as part of a defense-in-depth security strategy. This follow-up blog explores where to position your WAF, specifically in relation to your VGS proxy, so it can best protect your applications and enterprise. The goal is to educate and empower you to secure your systems against the widest possible array of vulnerabilities and attacks.

WAF Placement

One of the most important configuration questions you will face is whether to place your WAF in front of VGS or behind. Whichever placement you choose, there will be benefits, drawbacks, and tradeoffs. Fortunately, the VGS proxy protocol is both secure and flexible, allowing you to tailor your architecture in a way that best suits your needs.

A good way to approach this question is to consider exactly how you want your clients to interact with your backend. You know your enterprise and web apps best, and only you can fine-tune all of the options to their ideal state. That said, in the end, a major determinant will be which type of WAF you choose: network, host, or cloud-based.

VGS First

Network - and host-based WAFs are on-premises, co-located with your backend. In this scenario, your WAF is your primary ingress, and you are already familiar with its role in protecting your backend services. Therefore, we recommend that you maintain this architecture, as you can easily route your traffic through the VGS proxy first.

Diagram 1

By putting VGS first, you take advantage of numerous VGS security features. This includes our default capability to rate-limit traffic, which significantly helps to minimize the harmful effects of a denial-of-service and is typically a feature for which WAF providers add a surcharge. Furthermore, VGS provides other types of traffic restrictions, such as IP whitelisting, in which only specific, pre-authorized source IP addresses have the right to access your backend.

WAF First

Now let’s consider a cloud- or SaaS-based WAF. In this scenario, your WAF is the edge ingress, has initial access to the unredacted web requests, and restricts traffic before it routes to VGS. Thus, VGS sits behind your WAF but in front of your backend. This architecture has some significant design advantages -- as well as some important caveats.

Diagram 2

First, VGS customers should take advantage of our IP whitelisting feature. Depending on your cloud WAF implementation, the request routing to VGS may be known, or it could be hidden. This could happen, for example, when the route is configured with a DNS CNAME (and even if you do not use a CNAME, your tenant DNS is not expected to be a secret). Thus, whitelisting is an important part of securing your APIs, as specifying your WAF egress IPs helps to ensure that your WAF is not easily bypassed. Most WAF providers provide easy access to their egress IPs (e.g. Cloudflare).

Second, placing your WAF first is a smart choice for VGS clients because VGS currently does not have the capacity of a global content delivery network (CDN). SSL termination points that are physically closer to the end user dramatically improve connection speeds. A global CDN can improve user experience via faster initial connections and SSL handshakes that normally require multiple back and forth request and response messages, which can lead to significant latency.

Third, if your WAF sits in front of VGS, your WAF must process the web requests first and perform the rate limiting. The simple reason is that VGS cannot determine the original source of the requests. Therefore, you should inform VGS, so that we can disable this tenant feature. This is necessary to avoid a VGS rate limit against the WAF (which would include the traffic of all your clients combined).

Fourth, when your WAF is in front of VGS, your WAF vendor is now within your compliance scope. Because the WAF must perform SSL termination, your WAF provider will see the sensitive contents of your web requests before VGS has had a chance to alias them. However, there are many great cloud-based WAF providers with strong compliance certifications, so make sure you choose one aligned with your organization’s compliance goals.

Better Visibility = Increased Security

Whichever configuration you choose, the goal is the same: better visibility into your web requests and increased security for your enterprise.

If you have an on-prem WAF (and VGS processes your web requests first), VGS will provide you with an accurate source IP in the X-Real-IP request header. Please ensure that your on-prem WAF or other ingress does not replace this field with a VGS egress IP. Additionally, VGS provides the X-Forward-For in the header, but this must be used with caution, as an attacker can append new, incorrect values to this field.

If your WAF sits in front of VGS, and proxies web requests through VGS, please note that VGS appends the X-Real-IP from your upstream WAF. You can configure your WAF to inject an alternate header, such as X-Forward-For. However, you should only do so if your WAF is capable of ignoring user-supplied values; remember that an attacker may try to hide their origin by specifying an incorrect or fake value in this field. An alternative, if the WAF provides the capability, is to use a new and unique header.

We hope that you have found this blog on VGS + WAF integration helpful. When used in tandem, there are numerous potential advantages for your enterprise. Remember that security is a journey, not a destination, and there is always more to do!

If you have any questions, or would like to request a demo, please contact us.

Mike Jensen Mike Jensen

Staff Application Security Engineer

Ken Geers Kenneth Geers, PhD

Information Security Analyst at VGS

Share

You Might also be interested in...

How Zero Data Reduces the Impact of Ransomware2

How Zero Data Reduces the Impact of Ransomware

Mike Jensen
Kenneth Geers, PhD
July 8, 2021

VGS + Web Application Firewall Part 1

VGS + Web Application Firewall: Part 1

Kenneth Geers, PhD
Mike Jensen
June 17, 2021

TOP 1001

Four VGS Customers Included in Forbes' Fintech 50

Stefan Slattery June 10, 2021