security
Read Firewall Configuration
Endpoints
- access-groups
- artifacts
- checks
- projects
- deployments
- domains
- dns
- logDrains
- edge-config
- user
- marketplace
- integrations
- authentication
- projectMembers
- environment
- security
- teams
- webhooks
- aliases
- certs
security
Read Firewall Configuration
Retrieve the specified firewall configuration for a project. The deployed configVersion will be active
GET
/
v1
/
security
/
firewall
/
config
/
{configVersion}
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.security.getFirewallConfig({
projectId: "<id>",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
configVersion: "<value>",
});
// Handle the result
console.log(result);
}
run();
{
"ownerId": "<string>",
"projectKey": "<string>",
"id": "<string>",
"version": 123,
"updatedAt": "<string>",
"firewallEnabled": true,
"crs": {
"sd": {
"active": true,
"action": "deny"
},
"ma": {
"active": true,
"action": "deny"
},
"lfi": {
"active": true,
"action": "deny"
},
"rfi": {
"active": true,
"action": "deny"
},
"rce": {
"active": true,
"action": "deny"
},
"php": {
"active": true,
"action": "deny"
},
"gen": {
"active": true,
"action": "deny"
},
"xss": {
"active": true,
"action": "deny"
},
"sqli": {
"active": true,
"action": "deny"
},
"sf": {
"active": true,
"action": "deny"
},
"java": {
"active": true,
"action": "deny"
}
},
"rules": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"active": true,
"conditionGroup": [
{
"conditions": [
{
"type": "host",
"op": "re",
"neg": true,
"key": "<string>",
"value": "<string>"
}
]
}
],
"action": {
"mitigate": {
"action": "deny",
"rateLimit": {
"algo": "fixed_window",
"window": 123,
"limit": 123,
"keys": [
"<string>"
],
"action": "deny"
},
"redirect": {
"location": "<string>",
"permanent": true
},
"actionDuration": "<string>",
"bypassSystem": true
}
}
}
],
"ips": [
{
"id": "<string>",
"hostname": "<string>",
"ip": "<string>",
"notes": "<string>",
"action": "deny"
}
],
"changes": [
{}
],
"managedRules": {}
}
Authorizations
Default authentication mechanism
Path Parameters
The deployed configVersion for the firewall configuration
Query Parameters
The Team identifier to perform the request on behalf of.
Example:
"team_1a2b3c4d5e6f7g8h9i0j1k2l"
The Team slug to perform the request on behalf of.
Example:
"my-team-url-slug"
Response
200
application/json
If the firewall configuration includes a [custom managed ruleset](https://vercel.com/docs/security/vercel-waf/managed-rulesets), it will include a `crs` item that has the following values: sd: Scanner Detection ma: Multipart Attack lfi: Local File Inclusion Attack rfi: Remote File Inclusion Attack rce: Remote Execution Attack php: PHP Attack gen: Generic Attack xss: XSS Attack sqli: SQL Injection Attack sf: Session Fixation Attack java: Java Attack
Custom Ruleset
Parameter from the incoming traffic.
Available options:
host
, path
, method
, header
, query
, cookie
, target_path
, raw_path
, ip_address
, protocol
, region
, scheme
, environment
, user_agent
, geo_continent
, geo_country
, geo_country_region
, geo_city
, geo_as_number
, ja4_digest
, ja3_digest
, rate_limit_api_id
Operator used to compare the parameter with a value
Available options:
re
, eq
, ex
, inc
, pre
, suf
, sub
, gt
, gte
, lt
, lte
, nex
, ninc
, neq
Available options:
deny
, log
, challenge
, bypass
, rate_limit
, redirect
Available options:
fixed_window
, token_bucket
Available options:
deny
, log
, challenge
, rate_limit
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.security.getFirewallConfig({
projectId: "<id>",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
configVersion: "<value>",
});
// Handle the result
console.log(result);
}
run();
{
"ownerId": "<string>",
"projectKey": "<string>",
"id": "<string>",
"version": 123,
"updatedAt": "<string>",
"firewallEnabled": true,
"crs": {
"sd": {
"active": true,
"action": "deny"
},
"ma": {
"active": true,
"action": "deny"
},
"lfi": {
"active": true,
"action": "deny"
},
"rfi": {
"active": true,
"action": "deny"
},
"rce": {
"active": true,
"action": "deny"
},
"php": {
"active": true,
"action": "deny"
},
"gen": {
"active": true,
"action": "deny"
},
"xss": {
"active": true,
"action": "deny"
},
"sqli": {
"active": true,
"action": "deny"
},
"sf": {
"active": true,
"action": "deny"
},
"java": {
"active": true,
"action": "deny"
}
},
"rules": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"active": true,
"conditionGroup": [
{
"conditions": [
{
"type": "host",
"op": "re",
"neg": true,
"key": "<string>",
"value": "<string>"
}
]
}
],
"action": {
"mitigate": {
"action": "deny",
"rateLimit": {
"algo": "fixed_window",
"window": 123,
"limit": 123,
"keys": [
"<string>"
],
"action": "deny"
},
"redirect": {
"location": "<string>",
"permanent": true
},
"actionDuration": "<string>",
"bypassSystem": true
}
}
}
],
"ips": [
{
"id": "<string>",
"hostname": "<string>",
"ip": "<string>",
"notes": "<string>",
"action": "deny"
}
],
"changes": [
{}
],
"managedRules": {}
}