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>",
});
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>",
"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
}
},
"description": "<string>"
}
],
"ips": [
{
"id": "<string>",
"hostname": "<string>",
"ip": "<string>",
"action": "deny",
"notes": "<string>"
}
],
"changes": [
{}
],
"managedRules": {
"bot_protection": {
"active": true,
"action": "deny",
"updatedAt": "<string>",
"userId": "<string>",
"username": "<string>"
},
"ai_bots": {
"active": true,
"action": "deny",
"updatedAt": "<string>",
"userId": "<string>",
"username": "<string>"
},
"owasp": {
"active": true,
"action": "deny",
"updatedAt": "<string>",
"userId": "<string>",
"username": "<string>"
}
},
"botIdEnabled": true
}Retrieve the specified firewall configuration for a project. The deployed configVersion will be active
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>",
});
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>",
"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
}
},
"description": "<string>"
}
],
"ips": [
{
"id": "<string>",
"hostname": "<string>",
"ip": "<string>",
"action": "deny",
"notes": "<string>"
}
],
"changes": [
{}
],
"managedRules": {
"bot_protection": {
"active": true,
"action": "deny",
"updatedAt": "<string>",
"userId": "<string>",
"username": "<string>"
},
"ai_bots": {
"active": true,
"action": "deny",
"updatedAt": "<string>",
"userId": "<string>",
"username": "<string>"
},
"owasp": {
"active": true,
"action": "deny",
"updatedAt": "<string>",
"userId": "<string>",
"username": "<string>"
}
},
"botIdEnabled": true
}Default authentication mechanism
The deployed configVersion for the firewall configuration
The Team identifier to perform the request on behalf of.
"team_1a2b3c4d5e6f7g8h9i0j1k2l"
The Team slug to perform the request on behalf of.
"my-team-url-slug"
If the firewall configuration includes a custom managed ruleset, 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
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Parameter from the incoming traffic.
host, path, method, header, query, cookie, target_path, route, 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, server_action re, eq, ex, inc, pre, suf, sub, gt, gte, lt, lte, nex, ninc, neq Show child attributes
Show child attributes
deny, log, challenge, bypass, rate_limit, redirect Show child attributes
fixed_window, token_bucket deny, log, challenge, rate_limit Show child attributes