Edge WAF deployment using the Fastly control panel

IMPORTANT

This guide only applies to customers with access to the Next-Gen WAF product in the Fastly control panel. If you have access to the Next-Gen WAF control panel, check out our Edge WAF deployment using the Next-Gen WAF control panel guide.

The Edge WAF deployment method hosts the Next-Gen WAF on Fastly’s Edge Cloud platform via our global network of POPs, integrates with Fastly’s caching layer, and is managed by Fastly. Since security processing happens at the edge, the Next-Gen WAF can inspect all traffic before it enters your origin infrastructure and block attacks close to where they originated. You do not need to make any modifications to your own hosting environment.

Before you begin

The Next-Gen WAF is disabled by default. To purchase and enable the product for your Fastly account, contact sales@fastly.com. Once enabled, users assigned the superuser role can enable the Next-Gen WAF for your CDN services.

Limitations and considerations

When enabling the Next-Gen WAF for your CDN services, keep the following in mind:

  • Adding the Next-Gen WAF to an existing CDN service counts against the service chain limit.
  • The Edge WAF deployment method is only compatible with CDN services that do not use mutual TLS to the origin.
  • Workspaces and CDN services have a one-to-one relationship. A workspace can be linked to only one service, and a service can have only one linked workspace.
  • Only users assigned the superuser role can enable and configure the Edge WAF deployment for CDN services.

How it works

When you enable the Next-Gen WAF for a CDN service, Fastly creates an edge security service in the background, which is responsible for inspecting traffic to your CDN service. The edge security service runs in the vcl_miss and vcl_pass subroutines. Execution priority is set to a high value to enable compatibility with any other VCL snippets that may be in use.

Health checks

The edge security service includes a health check, which skips security processing entirely if the edge security service is unhealthy for any reason. The edge security service is modeled as an origin using the backend type and uses the same health check feature.

The edge security service includes a health check inside the edge_security function. Using the backend.health property, this health check will skip security processing entirely if the edge security service is unhealthy for any reason. The edge security service is modeled as an origin using the backend type and uses the same health check feature.

The health check works by sending a periodic probe every 15 seconds and checking for HTTP status code 200 as an expected response. Should a check indicate an unhealthy service, all security processing will be skipped until the service becomes healthy again. It may take up to 60 seconds for all security processing to be skipped.

Setting up the deployment

To deploy the Next-Gen WAF on an existing CDN service, complete the following steps:

  1. Fastly control panel
  2. Fastly Security API
  1. Log in to the Fastly web interface.
  2. From the Home page, select the appropriate service. You can use the search box to search by ID, name, or domain.
  3. Click Edit configuration and then Security.

    TIP

    You do not need to clone the active version of the service to enable the Next-Gen WAF.

  4. In the Next-Gen WAF card, click the switch to the On position.

  5. Click the pencil Pencil icon to edit the following deployment settings and then click Submit:

    Edit Next-Gen WAF deployment settings

    • From the Workspace menu, select the workspace that you want to link to the service. If your account only has one workspace, this field is read-only.
    • In the % of traffic field, enter the percent of traffic that you want the Next-Gen WAF to inspect. When set to 100, all traffic to your service is inspected. When the value is less than 100, a random sample of the specified percentage is inspected.
  6. (Optional) Use attack tooling to verify that the Next-Gen WAF is monitoring your web application and identifying malicious and anomalous requests.

Configuring the deployment

To update your deployment, complete the following steps:

  1. Fastly control panel
  2. Fastly Security API
  1. Log in to the Fastly web interface.
  2. From the Home page, select the appropriate service. You can use the search box to search by ID, name, or domain.
  3. Click Edit configuration and then Security.

    TIP

    You do not need to clone the active version of the service to edit the Edge WAF deployment.

  4. In the Next-Gen WAF card, set the switch to the On position to enable the Next-Gen WAF for your service or to the Off position to disable the Next-Gen WAF for your service.

  5. If the Next-Gen WAF is enabled, click the pencil Pencil icon to edit the following deployment settings and then click Submit:

    Edit Next-Gen WAF deployment settings

    • From the Workspace menu, select the workspace that you want to link to the service. If your account only has one workspace, this field is read-only.
    • In the % of traffic field, enter the percent of traffic that you want the Next-Gen WAF to inspect. When set to 100, all traffic to your service is inspected. When the value is less than 100, a random sample of the specified percentage is inspected.
  6. (Optional) Use attack tooling to verify that the Next-Gen WAF is monitoring your web application and identifying malicious and anomalous requests.

Disabling the deployment

To disable Edge deployment for your service, complete the following steps:

  1. Fastly control panel
  2. Fastly Security API
  1. Log in to the Fastly web interface.
  2. From the Home page, select the appropriate service. You can use the search box to search by ID, name, or domain.
  3. Click Edit configuration and then Security.

    TIP

    You do not need to clone the active version of the service to disable the Next-Gen WAF.

  4. In the Next-Gen WAF card, click the switch to the Off position.

Was this guide helpful?

Do not use this form to send sensitive information. If you need assistance, contact support. This form is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.