Fastly
Overview
The Fastly integration connects the Praetorian Guard Platform (PGP) with both Fastly's content delivery network (CDN) and its Next-Gen WAF (NGWAF) to discover domain names, backend addresses, and service configurations that are part of your external attack surface.
Content delivery networks and web application firewalls often sit in front of your applications, and the domains and origin servers configured in them may not appear in other asset discovery sources. This integration closes that visibility gap by pulling data directly from the Fastly API, giving your security team a complete picture of externally accessible services behind Fastly infrastructure.
Note: This integration is currently in beta. It is available upon request and may not appear in the integrations list for all accounts.
What the Integration Does
The Fastly integration provides two independently configurable modules:
- Asset Discovery (CDN and WAF) — Enumerates all Fastly CDN services to discover associated domain names, then queries the Next-Gen WAF product API to discover WAF-protected domains and their backend origin addresses (hostnames and IPs). Each discovered item is imported as an asset into PGP.
- WAF Whitelisting — Intended to automatically whitelist Guard static IP ranges in Fastly WAF rules so that scanning traffic is not blocked. This module is not yet implemented and will have no effect if enabled.
The integration uses the official Fastly Go SDK for all API communication. It does not make raw HTTP requests.
All asset discovery operations are strictly read-only. PGP does not create, modify, or delete any Fastly services, domains, or configurations.
CDN Asset Discovery
When asset discovery is enabled, the integration enumerates your Fastly CDN services to discover domain names.
How It Works
- List services — The integration paginates through all Fastly services in your account, fetching 100 services per page.
- Get service details — For each service, it retrieves the full service detail, which includes the active version and its associated domains.
- Extract domains — From the active version of each service, domain names are extracted and sent to PGP as assets.
Pagination retrieves up to 100 services per page with a safety limit of 100 pages (10,000 services maximum). If a service's details cannot be retrieved (e.g., due to permissions), the integration logs a warning and continues to the next service.
WAF Asset Discovery
The integration also discovers assets protected by Fastly's Next-Gen WAF (NGWAF). This runs automatically as part of asset discovery and does not require a separate configuration toggle.
How It Works
- List WAF-enabled services — The integration queries the Fastly NGWAF product API to retrieve the IDs of all services that have the Next-Gen WAF product enabled.
- Get service details — For each WAF-enabled service, it retrieves the service detail to extract domains and backend configurations from the active version.
- Extract domains — Domain names from the active version of each WAF service are sent to PGP as assets.
- Extract backend addresses — For each WAF service, the integration lists all configured backends and extracts their addresses. It checks four fields per backend:
address,hostname,ipv4, andipv6. - Deduplicate — Backend addresses are deduplicated within each backend entry (e.g., if
addressandhostnamecontain the same value, it is only emitted once). - Filter private IPs — Private IP addresses (RFC 1918, link-local, etc.) are excluded using Go's standard library
net.ParseIPandip.IsPrivate(). Only publicly routable IPs and domain names are imported as assets.
If a WAF service's details or backends cannot be retrieved, the integration logs a warning and continues to the next service. If backend enumeration fails for a service, its domains are still imported.
Prerequisites
Before setting up the Fastly integration, ensure you have:
- A Fastly account with at least one configured service
- A Fastly API token with the appropriate scope:
- For asset discovery only:
global:readscope (read-only) - For asset discovery and WAF whitelisting:
globalscope (read-write)
- For asset discovery only:
- An Engineer role on the Fastly account (required for the token to have the necessary permissions)
Creating a Fastly API Token
- Sign in to the Fastly Management Console.
- Navigate to Account > Personal API tokens (or Automation tokens for service accounts).
- Click Create Token.
- Set the Scope to
global:readfor read-only asset discovery, orglobalif you also plan to enable WAF whitelisting in the future. - Optionally set an expiration date for the token.
- Click Create Token and copy the generated token immediately. It will not be shown again.
Setup
- In PGP, navigate to the Integrations page.
- Find Fastly under the Content Delivery Solutions category.
- Fill in the fields described below.
- Click Save. PGP will validate that the token scope matches the enabled modules before saving.
Field Reference
Note: At least one module (Asset Discovery or WAF Whitelisting) must be enabled. The integration will return an error if both are disabled.