Collect Vercel WAF logs
This document explains how to ingest Vercel WAF logs to Google Security Operations using Google Cloud Storage V2.
Vercel WAF is a web application firewall integrated into the Vercel edge network for protecting serverless applications. It inspects incoming HTTP requests at the edge and applies security rules to block malicious traffic before it reaches your application. Because Vercel WAF logs must be exported from the Vercel platform, you must upload those logs to a Google Cloud Storage (GCS) bucket, and then configure a Google SecOps feed to ingest them.
Before you begin
Make sure you have the following prerequisites:
- A Google SecOps instance
- A Google Cloud project with billing enabled
- A Vercel account with access to WAF logs (Pro or Enterprise plan)
- A Vercel API token or Log Drain configured to export WAF logs
Create a Google Cloud Storage bucket
- Go to the Google Cloud Console .
- Select your project or create a new one.
- In the navigation menu, go to Cloud Storage > Buckets.
- Click Create bucket.
-
Provide the following configuration details:
Setting Value Name your bucket Enter a globally unique name (for example, vercel-waf-logs)Location type Choose based on your needs (Region, Dual-region, Multi-region) Location Select the location closest to your Google SecOps instance (for example, us-central1)Storage class Standard (recommended for frequently accessed logs) Access control Uniform (recommended) Protection tools Optional: Enable object versioning or retention policy -
Click Create.
Export Vercel WAF logs to GCS
Vercel provides WAF logs through Log Drains and the Vercel REST API. Configure log export, then upload to GCS.
Option A: Configure Vercel Log Drains (Recommended)
Vercel Log Drains stream logs in real-time to an external endpoint.
- Sign in to the Vercel Dashboard .
- Go to your team settings: Settings > Log Drains.
- Click Add Log Drain.
- Configure the log drain:
- Delivery Format: Select JSON.
- Sources: Select Firewallto include WAF events.
- Environments: Select the environments to monitor (Production, Preview, Development).
- Endpoint: Enter the URL of your intermediate receiver (for example, a Cloud Run function endpoint that writes to GCS).
- Click Add Log Drain.
-
Verify that logs are being delivered to your endpoint.
Option B: Export via Vercel REST API
- Generate a Vercel API token in Settings > Tokens.
-
Use the Vercel REST API to retrieve firewall events:
curl -H "Authorization: Bearer YOUR_VERCEL_TOKEN" \ "https://api.vercel.com/v1/security/firewall/events?teamId=YOUR_TEAM_ID&projectId=YOUR_PROJECT_ID&limit=100" \ -o vercel-waf-events.json
Retrieve the Google SecOps service account
- Go to SIEM Settings > Feeds.
- Click Add New Feed.
- Click Configure a single feed.
- In the Feed namefield, enter a name for the feed (for example,
Vercel WAF Logs). - Select Google Cloud Storage V2as the Source type.
- Select Vercel WAFas the Log type.
-
Click Get Service Account. A unique service account email will be displayed, for example:
chronicle-12345678@chronicle-gcp-prod.iam.gserviceaccount.com -
Copy this email address for use in the next step.
Grant IAM permissions to the Google SecOps service account
The Google SecOps service account needs Storage Object Viewerrole on your GCS bucket.
- Go to Cloud Storage > Buckets.
- Click on your bucket name (for example,
vercel-waf-logs). - Go to the Permissionstab.
- Click Grant access.
- Provide the following configuration details:
- Add principals: Paste the Google SecOps service account email (for example,
chronicle-12345678@chronicle-gcp-prod.iam.gserviceaccount.com). - Assign roles: Select Storage Object Viewer.
- Add principals: Paste the Google SecOps service account email (for example,
-
Click Save.
Configure the Google SecOps feed
- Go to SIEM Settings > Feeds.
- Click Add New Feed.
- Click Configure a single feed.
- In the Feed namefield, enter a name for the feed (for example,
Vercel WAF Logs). - Select Google Cloud Storage V2as the Source type.
- Select Vercel WAFas the Log type.
- Click Next.
-
Specify values for the following input parameters:
-
Storage bucket URL: Enter the GCS bucket URI:
gs://vercel-waf-logs/vercel-waf/- Replace
vercel-waf-logswith your GCS bucket name. - Replace
vercel-wafwith your configured prefix path.
- Replace
-
Source deletion option: Select the deletion option according to your preference:
- Never: Never deletes any files after transfers (recommended for testing).
-
Delete transferred files and empty directories: Deletes files and empty directories after successful transfer.
-
Maximum File Age: Include files modified in the last number of days (default is 180 days).
-
Asset namespace: The asset namespace .
-
Ingestion labels: The label to be applied to the events from this feed.
-
-
Click Next.
-
Review your new feed configuration in the Finalizescreen, and then click Submit.
UDM mapping table
| Log Field | UDM Mapping | Logic |
|---|---|---|
|
record.requestId, record.proxy.timestamp, record.proxy.region, record.proxy.errorCode, record.proxy.vercelCache, record.proxy.pathType, record.proxy.referer, record.proxy.cacheId, record.proxy.wafAction, record.proxy.scheme, record.proxy.userAgent, record.environment
|
additional.fields | Additional event metadata |
| |
metadata.event_type | Type of event |
|
record.deploymentId
|
metadata.product_deployment_id | Product-specific deployment ID |
|
record.id
|
metadata.product_log_id | Product-specific log ID |
|
record.proxy.method
|
network.http.method | HTTP method |
|
record.statusCode
|
network.http.response_code | HTTP response code |
|
record.source
|
principal.asset.hostname | Hostname of the asset associated with the principal |
|
record.host
|
principal.hostname | Hostname of the principal |
|
record.message
|
security_result.description | Description of the security result |
|
record.proxy.wafRule
|
security_result.rule_name | Name of the rule that triggered the security result |
|
record.level
|
security_result.severity | Severity of the security result |
|
record.proxy.wafRule
|
security_result.threat_name | Name of the threat |
|
record.proxy.clientIp
|
target.asset.ip | IP address of the asset |
|
record.projectId
|
target.cloud.project.id | ID of the cloud project |
|
record.projectName
|
target.cloud.project.name | Name of the cloud project |
|
record.proxy.path
|
target.file.full_path | Full path of the file |
|
record.proxy.clientIp
|
target.ip | IP address of the target |
|
record.executionRegion
|
target.location.name | Name of the location |
|
record.proxy.vercelId
|
target.user.userid | User ID of the target user |
| |
metadata.product_name | Product name |
| |
metadata.vendor_name | Vendor name |
Need more help? Get answers from Community members and Google SecOps professionals.

