Skip to content

Update security configuration

PATCH
/clusters/{cluster_id}/security
curl --request PATCH \
  --url http://localhost:8000/clusters/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/security \
  --header 'API-Key: <API-Key>' \
  --header 'API-Version: 2026-06-01.beta' \
  --header 'Content-Type: application/json' \
  --data '{ "waf": { "enabled": true, "mode": "detect", "paranoia_level": 1, "preset": "full_crs", "enabled_categories": { "protocol_enforcement": true, "protocol_attacks": true, "local_file_inclusion": true, "remote_file_inclusion": true, "remote_code_execution": true, "php_injection": true, "cross_site_scripting": true, "sql_injection": true, "session_fixation": true, "java_attacks": true, "data_leakage": true, "webshell_detection": true }, "exclusions": { "paths": [ "example" ], "rules": [ { "rule_ids": [ "example" ], "paths": [ "example" ] } ] } }, "bot_management": { "enabled": true, "mode": "detect", "challenge_mode": "none", "whitelisted_agents": [ "example" ], "blacklisted_agents": [ "example" ] }, "geo_blocking": { "enabled": true, "mode": "allowlist", "countries": [ "example" ] }, "rate_limiting": { "enabled": true, "global_rpm": 1, "per_ip_rpm": 1, "endpoint_limits": [ { "path": "example", "rpm": 1 } ] }, "captcha": { "enabled": true, "enabled_realms": [ "example" ] }, "ip_access_control": { "enabled": true, "path_rules": [ { "path": "example", "allowed_ips": [ "example" ], "allowed_cidrs": [ "example" ], "description": "example" } ] } }'

Partially updates the cluster security configuration. Any omitted top-level section (e.g. waf) retains its existing value. Provided top-level sections replace the existing configuration for that section.

Requires a Business or Enterprise plan. Returns 402 when the workspace plan does not include security features.

Required scope: clusters:security:write

cluster_id
required
string format: uuid
API-Version
required
string
Allowed values: 2026-06-01.beta
Media typeapplication/json

Security policy configuration for this cluster.

object
waf
object
enabled
required
boolean
mode
required

Action taken when a security rule matches.

string
Allowed values: detect block
paranoia_level
required

Detection sensitivity. Higher levels add more rules but increase false-positive rates.

integer
>= 1 <= 4
preset
required
string
Allowed values: full_crs owasp_top_10 custom
enabled_categories

Active rule categories. Required when preset is custom.

object
protocol_enforcement
required

Protocol Enforcement (rules 920xxx, ~30–40 rules) — HTTP protocol violations and malformed requests.

boolean
protocol_attacks
required

Protocol Attacks (rules 921xxx, ~25–30 rules) — CRLF injection, HTTP request smuggling, and header attacks.

boolean
local_file_inclusion
required

Local File Inclusion (rules 930xxx, ~15–20 rules) — Path traversal attacks and directory access attempts.

boolean
remote_file_inclusion
required

Remote File Inclusion (rules 931xxx, ~10–15 rules) — Remote URL inclusion and SSRF attacks.

boolean
remote_code_execution
required

Remote Code Execution (rules 932xxx, 60+ rules) — Command injection, shell attacks, and code execution.

boolean
php_injection
required

PHP Injection (rules 933xxx, ~30–40 rules) — PHP function exploitation and serialization attacks.

boolean
cross_site_scripting
required

Cross-Site Scripting (rules 941xxx, ~50–60 rules) — Script injection, event handlers, and DOM-based XSS.

boolean
sql_injection
required

SQL Injection (rules 942xxx, ~55–65 rules) — Database query manipulation and blind SQLi attacks.

boolean
session_fixation
required

Session Fixation (rules 943xxx, ~15–20 rules) — Session manipulation, JWT attacks, and cookie poisoning.

boolean
java_attacks
required

Java/JVM Attacks (rules 944xxx, ~20–30 rules) — Log4Shell, Spring4Shell, and Java deserialization.

boolean
data_leakage
required

Data Leakage Prevention (rules 950–954xxx, 50+ rules) — Credit cards, SSNs, stack traces, and error messages.

boolean
webshell_detection
required

Webshell Detection (rules 955xxx, ~20–30 rules) — Backdoor scripts and malicious shell detection.

boolean
exclusions
object
paths

URL paths exempt from WAF inspection.

Array<string>
rules
Array<object>
object
rule_ids
required

OWASP CRS rule identifiers to disable.

Array<string>
>= 1 items
paths

Restrict this exclusion to specific URL paths. Applies globally when omitted.

Array<string>
bot_management
object
enabled
required
boolean
mode
required

Action taken when a security rule matches.

string
Allowed values: detect block
challenge_mode
required
string
Allowed values: none javascript captcha
whitelisted_agents

User-agent regex patterns to always allow through.

Array<string>
blacklisted_agents

User-agent regex patterns to always block.

Array<string>
geo_blocking
object
enabled
required
boolean
mode
required
string
Allowed values: allowlist blocklist
countries
required

ISO 3166-1 alpha-2 country codes. Overseas territories have their own codes, distinct from their mainland: for example GP (Guadeloupe), MQ (Martinique) and RE (Réunion) are not covered by FR, so an allowlist for France and its overseas territories must list them explicitly.

Array<string>
>= 1 items
rate_limiting
object
enabled
required
boolean
global_rpm

Global requests-per-minute ceiling across all clients.

integer
>= 1
per_ip_rpm

Per-source-IP requests-per-minute ceiling.

integer
>= 1
endpoint_limits
Array<object>
object
path
required

URL path to apply the limit to.

string
>= 1 characters <= 255 characters
rpm
required

Maximum requests per minute for this path.

integer
>= 1
captcha
object
enabled
required
boolean
enabled_realms

Realm IDs where CAPTCHA challenges are presented during the login flow.

Array<string>
ip_access_control
object
enabled

Whether IP access control is enabled. When false, no path rules are enforced.

boolean
path_rules
required
Array<object>
object
path
required

URL path prefix to restrict.

string
>= 1 characters <= 255 characters
allowed_ips

Individual IP addresses (IPv4 or IPv6) to allow.

Array<string>
allowed_cidrs

CIDR ranges to allow.

Array<string>
description
string
<= 255 characters

The request has succeeded.

Media typeapplication/json

Security policy configuration for this cluster.

object
waf
object
enabled
required
boolean
mode
required

Action taken when a security rule matches.

string
Allowed values: detect block
paranoia_level
required

Detection sensitivity. Higher levels add more rules but increase false-positive rates.

integer
>= 1 <= 4
preset
required
string
Allowed values: full_crs owasp_top_10 custom
enabled_categories

Active rule categories. Required when preset is custom.

object
protocol_enforcement
required

Protocol Enforcement (rules 920xxx, ~30–40 rules) — HTTP protocol violations and malformed requests.

boolean
protocol_attacks
required

Protocol Attacks (rules 921xxx, ~25–30 rules) — CRLF injection, HTTP request smuggling, and header attacks.

boolean
local_file_inclusion
required

Local File Inclusion (rules 930xxx, ~15–20 rules) — Path traversal attacks and directory access attempts.

boolean
remote_file_inclusion
required

Remote File Inclusion (rules 931xxx, ~10–15 rules) — Remote URL inclusion and SSRF attacks.

boolean
remote_code_execution
required

Remote Code Execution (rules 932xxx, 60+ rules) — Command injection, shell attacks, and code execution.

boolean
php_injection
required

PHP Injection (rules 933xxx, ~30–40 rules) — PHP function exploitation and serialization attacks.

boolean
cross_site_scripting
required

Cross-Site Scripting (rules 941xxx, ~50–60 rules) — Script injection, event handlers, and DOM-based XSS.

boolean
sql_injection
required

SQL Injection (rules 942xxx, ~55–65 rules) — Database query manipulation and blind SQLi attacks.

boolean
session_fixation
required

Session Fixation (rules 943xxx, ~15–20 rules) — Session manipulation, JWT attacks, and cookie poisoning.

boolean
java_attacks
required

Java/JVM Attacks (rules 944xxx, ~20–30 rules) — Log4Shell, Spring4Shell, and Java deserialization.

boolean
data_leakage
required

Data Leakage Prevention (rules 950–954xxx, 50+ rules) — Credit cards, SSNs, stack traces, and error messages.

boolean
webshell_detection
required

Webshell Detection (rules 955xxx, ~20–30 rules) — Backdoor scripts and malicious shell detection.

boolean
exclusions
object
paths

URL paths exempt from WAF inspection.

Array<string>
rules
Array<object>
object
rule_ids
required

OWASP CRS rule identifiers to disable.

Array<string>
>= 1 items
paths

Restrict this exclusion to specific URL paths. Applies globally when omitted.

Array<string>
bot_management
object
enabled
required
boolean
mode
required

Action taken when a security rule matches.

string
Allowed values: detect block
challenge_mode
required
string
Allowed values: none javascript captcha
whitelisted_agents

User-agent regex patterns to always allow through.

Array<string>
blacklisted_agents

User-agent regex patterns to always block.

Array<string>
geo_blocking
object
enabled
required
boolean
mode
required
string
Allowed values: allowlist blocklist
countries
required

ISO 3166-1 alpha-2 country codes. Overseas territories have their own codes, distinct from their mainland: for example GP (Guadeloupe), MQ (Martinique) and RE (Réunion) are not covered by FR, so an allowlist for France and its overseas territories must list them explicitly.

Array<string>
>= 1 items
rate_limiting
object
enabled
required
boolean
global_rpm

Global requests-per-minute ceiling across all clients.

integer
>= 1
per_ip_rpm

Per-source-IP requests-per-minute ceiling.

integer
>= 1
endpoint_limits
Array<object>
object
path
required

URL path to apply the limit to.

string
>= 1 characters <= 255 characters
rpm
required

Maximum requests per minute for this path.

integer
>= 1
captcha
object
enabled
required
boolean
enabled_realms

Realm IDs where CAPTCHA challenges are presented during the login flow.

Array<string>
ip_access_control
object
enabled

Whether IP access control is enabled. When false, no path rules are enforced.

boolean
path_rules
required
Array<object>
object
path
required

URL path prefix to restrict.

string
>= 1 characters <= 255 characters
allowed_ips

Individual IP addresses (IPv4 or IPv6) to allow.

Array<string>
allowed_cidrs

CIDR ranges to allow.

Array<string>
description
string
<= 255 characters

Example

{
  "waf": {
    "mode": "detect",
    "preset": "full_crs"
  },
  "bot_management": {
    "mode": "detect",
    "challenge_mode": "none"
  },
  "geo_blocking": {
    "mode": "allowlist"
  }
}

Access is unauthorized.

Media typeapplication/problem+json

RFC 9457 Problem Details object.

object
type
required
string format: uri
title
required
string
status
required
integer
detail
required
string
instance
string format: uri

Example generated

{
  "type": "https://example.com",
  "title": "example",
  "status": 1,
  "detail": "example",
  "instance": "https://example.com"
}

Client error

Media typeapplication/problem+json

Returned when a workspace plan quota would be exceeded. required_plan indicates the minimum plan needed to complete the request.

object
type
required
string format: uri
title
required
string
status
required
integer
detail
required
string
instance
string format: uri
current_plan
required
string
required_plan
required
string
code

Machine-readable identifier of the quota that was hit, so a client can tell quotas apart without parsing detail. Known values include cluster_limit (the workspace’s total cluster allowance), cluster_size_quota (the allowance for the requested cluster size) and cluster_size (the requested size is not offered on the plan at all). New values may be added.

string
current_usage

How many of the resource the workspace currently has.

integer
current_limit

Maximum allowed by the current plan. 0 means the plan does not include the resource at all.

integer

Example generated

{
  "type": "https://example.com",
  "title": "example",
  "status": 1,
  "detail": "example",
  "instance": "https://example.com",
  "current_plan": "example",
  "required_plan": "example",
  "code": "example",
  "current_usage": 1,
  "current_limit": 1
}

Access is forbidden.

Media typeapplication/problem+json

RFC 9457 Problem Details object.

object
type
required
string format: uri
title
required
string
status
required
integer
detail
required
string
instance
string format: uri

Example generated

{
  "type": "https://example.com",
  "title": "example",
  "status": 1,
  "detail": "example",
  "instance": "https://example.com"
}

The server cannot find the requested resource.

Media typeapplication/problem+json

RFC 9457 Problem Details object.

object
type
required
string format: uri
title
required
string
status
required
integer
detail
required
string
instance
string format: uri

Example generated

{
  "type": "https://example.com",
  "title": "example",
  "status": 1,
  "detail": "example",
  "instance": "https://example.com"
}

Client error

Media typeapplication/problem+json
object
type
required
string format: uri
title
required
string
status
required
integer
detail
required
string
instance
string format: uri
errors
required
Array<object>
>= 1 items
object
field
required
string
detail
required
string
code
string
value

Example generated

{
  "type": "https://example.com",
  "title": "example",
  "status": 1,
  "detail": "example",
  "instance": "https://example.com",
  "errors": [
    {
      "field": "example",
      "detail": "example",
      "code": "example",
      "value": "example"
    }
  ]
}

Client error

Media typeapplication/problem+json

RFC 9457 Problem Details object.

object
type
required
string format: uri
title
required
string
status
required
integer
detail
required
string
instance
string format: uri

Example generated

{
  "type": "https://example.com",
  "title": "example",
  "status": 1,
  "detail": "example",
  "instance": "https://example.com"
}
Retry-After
integer
RateLimit-Limit
integer
RateLimit-Remaining
integer
RateLimit-Reset
integer
X-RateLimit-Limit-Second
integer
X-RateLimit-Remaining-Second
integer
X-RateLimit-Limit-Minute
integer
X-RateLimit-Remaining-Minute
integer
X-RateLimit-Limit-Hour
integer
X-RateLimit-Remaining-Hour
integer
X-RateLimit-Limit-Day
integer
X-RateLimit-Remaining-Day
integer

Server error

Media typeapplication/problem+json

RFC 9457 Problem Details object.

object
type
required
string format: uri
title
required
string
status
required
integer
detail
required
string
instance
string format: uri

Example generated

{
  "type": "https://example.com",
  "title": "example",
  "status": 1,
  "detail": "example",
  "instance": "https://example.com"
}

Server error

Media typeapplication/problem+json

RFC 9457 Problem Details object.

object
type
required
string format: uri
title
required
string
status
required
integer
detail
required
string
instance
string format: uri

Example generated

{
  "type": "https://example.com",
  "title": "example",
  "status": 1,
  "detail": "example",
  "instance": "https://example.com"
}