Security presets
Presets are ready-made rule sets that the admin UI writes into a security group. Use them to start a new group from a tested baseline, or to add common protections such as an origin allow-list, without writing the rules yourself. This page lists the exact rules each preset writes, so you can also reproduce them with the API.
A group with no rules has no rate limit, no header-entropy limit, no threat blocking and the default proof-of-work. The Recommended preset brings these back. For how rules are evaluated, see Security groups & rules.
How presets work
A preset is a list of ordinary security-group rules. Sentinel doesn't know about presets: the server validates and evaluates preset rules like any others. Every rule a preset writes is named preset:<id>:<part>, for example preset:recommended:base. The admin UI finds an applied preset by the preset:<id>: prefix of its rule names.
The rule names also appear in the GET /v2/inspect rule trace and in the request log's context.rules and context.monitor. Rules carry no other metadata. A preset that takes input (networks, origins or countries) stores it in its rule's condition, and the UI reads it back from there.
There are two kinds:
- Base presets set the group's overall policy: threat blocking, rate limits and how the challenge escalates. A group uses one base preset.
- Add-ons add one protection each, such as exempting your office network or blocking AI crawlers. They are placed before or after the base preset, depending on what they do.
Apply a preset
- Open Security groups and either select Create security group or open an existing group with Edit. New groups open on the Templates tab; for an existing group, select Templates under Rules.
- Optionally check Apply in monitor mode, to try the preset without effect (see Monitor mode). For a widget group, you can also check Memory-hard proof-of-work (Argon2id) (see Memory-hard variants).
- Under Base presets or Add-ons, select Apply next to a preset. Presets that take input show a Networks, Origins or Countries field; the HIS add-on shows a HIS mode choice.
- Save the group. Applying a preset only edits the draft rules; nothing changes until you save.
Applying a preset places its rules as follows:
- A base preset replaces the group's current base preset (including its memory-hard variant), in the same position.
- An add-on replaces an earlier copy of itself. Form fields and Form fields (consumer sign-ups) also replace each other.
- Otherwise the preset goes into its slot, before the first rule of a later slot. Your own rules count by what they do:
acceptrules as slot 1,allowanddenyas slot 2,setrules with onlyclassifier.*entries as slot 3, and every othersetrule after slot 5.
Re-apply, edit and remove
An applied preset shows the Applied badge, plus Argon2id for a memory-hard variant and Monitored or Partly monitored when some of its rules have "monitor": true.
You can edit preset rules on the JSON tab like any other rule. The UI then compares the applied rules with the preset's current definition, ignoring key order and monitor, and shows Differs from template when they don't match: a changed value, an added or removed rule, or a different rule order. Inputs are the exception: the UI reads the networks, origins or countries back from the applied rule, so editing those values keeps the preset current.
- Re-apply rewrites the preset's rules from its definition with the input shown in its field, in the position of the old rules. It discards your other edits to those rules, and takes the monitor setting from the Apply in monitor mode checkbox.
- Remove deletes every rule of the preset (and of its memory-hard variant) from the draft.
- Renaming a rule so it no longer starts with
preset:<id>:detaches it: the UI then treats it as your own rule and no longer finds or replaces it.
Add-ons with a pow.counter follow the base preset that is applied when you apply them. If you later switch the base between PBKDF2 and Argon2id, re-apply such add-ons (Country challenge).
Rule order
Rules run in order, and a later set rule overwrites values from earlier ones. Presets therefore go into fixed slots:
| Slot | Contents | Why there |
|---|---|---|
| 1 | Trusted networks, Verified agents | accept stops evaluation, so nothing after it applies to accepted requests, including the base preset's rate limit. |
| 2 | Allowed origins, Block AI agents, Country block | A request denied before the base preset never reaches its set rules. |
| 3 | Form fields | risk uses the classifier.* settings of earlier rules. |
| 4 | One base preset | Includes the base preset's own gate rule, if it has one. |
| 5 | Country challenge, Shared IPs, HIS | They overwrite values the base preset set. |
Put your own rules after slot 5, unless they are exemptions (accept) or gates (allow, deny). For example, applying Trusted networks, Allowed origins, Form fields, Recommended and HIS to a group that already has one rule of its own gives:
preset:trusted:accept
preset:origins:allow
preset:forms:classifier
preset:recommended:threats
preset:recommended:base
preset:recommended:elevated
preset:recommended:high
preset:his:mode
my-tweakWhich groups see which presets
Only public keys call the widget endpoints, so proof-of-work, code challenge, HIS, header-entropy and classifier.fields settings have no effect in restricted or full groups. See API keys & access levels. The Templates tab offers each preset only to the groups it serves:
| Group access | Presets offered |
|---|---|
public | Every base preset except Backend API (allowed IPs); Verified agents, Allowed origins, Block AI agents, Form fields, Form fields (consumer sign-ups), Country challenge, Shared IPs, HIS |
restricted, full | Backend API (allowed IPs) |
| Any | Trusted networks, Country block |
An applied preset stays listed even if the group's access changes, so you can remove it. The memory-hard checkbox appears when a base preset with a memory-hard variant is offered or applied. The server doesn't enforce this mapping: the API accepts any preset's rules in any group.
Base presets
| Preset | <id> | For | IP lookup | Code challenge | HIS |
|---|---|---|---|---|---|
| Recommended | recommended | Most sites | Yes | When elevated | No |
| Basic | basic | Sites without a local IP database | No | No | No |
| Recommended without code challenge | recommended-nocode | Sites where typing a code is a burden | Yes | No | No |
| Strict | strict | Login and sign-up forms | Yes | When elevated | relaxed, strict when high |
| Lockdown | lockdown | Ongoing attacks, temporarily | Yes | Always | strict |
| Backend API (allowed IPs) | server | restricted/full keys of your backend | No | — | — |
IP lookup means the preset has risk, country, network or IP signal conditions, which resolve the client IP through the [ip_resolver] providers (capped at 1 second per request). With a rate-limited remote provider such as ip-api, prefer Basic. See IP resolvers.
Every widget base preset uses PBKDF2/SHA-256 and starts with the same threats rule. It denies IPs whose threat verdict is block with 403 ACCESS_DENIED, except on /v2/verify, so a visitor who got a challenge before their IP was listed can still submit it:
{
"name": "preset:<id>:threats",
"action": "deny",
"message": "Blocked by threat intelligence.",
"conditions": [
{ "field": "threatVerdict", "operator": "=", "value": ["block"] },
{ "field": "path", "operator": "!=", "value": ["/v2/verify"] }
]
}In the tables below, signals means the signal condition with BOT, CLI, LIBRARY, MALICIOUS, PROXY and TOR. Conditions of elevated and high rules are combined with "conditionsOperator": "or". Each part is one rule named preset:<id>:<part>.
Recommended
For most sites. It blocks listed IPs, rate-limits each device, and gives risky or misbehaving clients a code challenge and a harder proof-of-work. These are its rules, exactly as the UI writes them:
[
{
"name": "preset:recommended:threats",
"action": "deny",
"message": "Blocked by threat intelligence.",
"conditions": [
{ "field": "threatVerdict", "operator": "=", "value": ["block"] },
{ "field": "path", "operator": "!=", "value": ["/v2/verify"] }
]
},
{
"name": "preset:recommended:base",
"action": "set",
"set": [
{ "field": "rateLimit.limits", "value": "50/10m" },
{ "field": "headerEntropy.limit", "value": "10/4h" }
]
},
{
"name": "preset:recommended:elevated",
"action": "set",
"conditionsOperator": "or",
"conditions": [
{ "field": "risk", "operator": ">=", "value": ["4"] },
{ "field": "penalty", "operator": ">", "value": ["2"] },
{ "field": "signal", "operator": "=", "value": ["BOT", "CLI", "LIBRARY", "MALICIOUS", "PROXY", "TOR"] }
],
"set": [
{ "field": "codeChallenge.enabled", "value": "true" },
{ "field": "pow.counter", "value": "1-30000" }
]
},
{
"name": "preset:recommended:high",
"action": "set",
"conditionsOperator": "or",
"conditions": [
{ "field": "risk", "operator": ">=", "value": ["7"] },
{ "field": "penalty", "operator": ">=", "value": ["6"] }
],
"set": [{ "field": "pow.counter", "value": "1-50000" }]
}
]| Part | Applies to | Effect |
|---|---|---|
threats | IPs with threat verdict block, except on /v2/verify | 403 ACCESS_DENIED |
base | Every request | 50 requests per 10 minutes per device (the default key=edk); at most 10 distinct header sets per client IP in 4 hours |
elevated | risk ≥ 4, a penalty above 2, or any of the signals | A code challenge and a counter of 1–30000 (default 1-15000) |
high | risk ≥ 7 or a penalty of 6 or more | A counter of 1–50000, on top of elevated |
Escalation starts with the first request: risk and signal come from the request itself. The penalty adds clients that misbehave over time, such as rate-limit pressure, new header sets and failed verifications.
Basic
Recommended without the IP lookup. It escalates on the penalty and request headers only, to a harder proof-of-work without a code challenge.
| Part | Action | Matches | Sets |
|---|---|---|---|
threats | deny | As above | — |
base | set | Every request | rateLimit.limits 50/10m, headerEntropy.limit 10/4h |
elevated | set | penalty > 2, or signal = CLI, LIBRARY, USER_AGENT_HEADER_MISSING, ACCEPT_LANGUAGE_HEADER_MISSING | pow.counter 1-30000 |
BOT is left out because it is also an IP signal, which needs the lookup. The penalty and the threats rule use Sentinel's KV store and threat lists, not the IP resolvers. Without risk, a new client from a hosting network or a high-risk country isn't escalated until it collects a penalty.
Recommended without code challenge
Recommended with a higher counter instead of a code challenge. Proof-of-work asks nothing of the visitor but time, so it slows automation without friction; a solver farm pays in CPU, though, not in typed codes. Higher counters take noticeably longer on old phones: check the solve time on a low-end device.
| Part | Action | Matches | Sets |
|---|---|---|---|
threats | deny | As above | — |
base | set | Every request | rateLimit.limits 50/10m, headerEntropy.limit 10/4h |
elevated | set | risk >= 4, penalty > 2, or the signals | pow.counter 1-40000 |
high | set | risk >= 7 or penalty >= 6 | pow.counter 1-80000 |
Strict
For login and sign-up forms: tighter limits, HIS, challenges that expire after 5 minutes and earlier escalation.
| Part | Action | Matches | Sets |
|---|---|---|---|
gate | deny, message Too many failed attempts. | penalty >= 8 | — |
threats | deny | As above | — |
base | set | Every request | rateLimit.limits 30/10m,300/1h(key=ip), headerEntropy.limit 6/4h, his.mode relaxed, pow.expires 5m |
elevated | set | risk >= 3, penalty >= 2, network = hosting, or the signals | codeChallenge.enabled true, his.codeChallenge true, pow.counter 1-40000 |
high | set | risk >= 6 or penalty >= 5 | his.mode strict, codeChallenge.length 6-7, codeChallenge.imageDifficulty high, pow.counter 1-80000 |
- The
gatedenies until the penalty expires ([penalty] ttl, default30mafter its last increase; see the configuration reference). The penalty is kept per account and client IP, so the gate also denies other users behind the same NAT or carrier IP. Raise its threshold, or remove the rule, for sites with many such users. network = hostingcatches VPNs and cloud desktops. Their users get the code challenge on every request.
Lockdown
For the duration of an attack. Every visitor gets a code challenge, strict HIS and a heavy proof-of-work, and hosting, proxy and Tor networks are denied. Expect fewer completed forms, and switch back to your previous base preset when the attack ends.
| Part | Action | Matches | Sets |
|---|---|---|---|
gate | deny, message Not available from this network. | network = hosting, proxy, tor | — |
threats | deny | As above | — |
base | set | Every request | rateLimit.limits 10/10m, headerEntropy.limit 5/4h, his.mode strict, codeChallenge.enabled true, codeChallenge.imageDifficulty high, his.codeChallenge true, pow.counter 1-80000, pow.expires 5m |
The gate denies every VPN, proxy and Tor user. An IP without network flags (no provider knew it) passes.
Backend API (allowed IPs)
For restricted or full keys that your backend uses for /v2/classifier, /v2/ip, /v2/threat and the other server endpoints. It takes your backend's networks as input.
[
{
"name": "preset:server:gate",
"action": "allow",
"message": "IP not allowed.",
"conditions": [{ "field": "ip", "operator": "=", "value": ["203.0.113.0/24"] }]
},
{
"name": "preset:server:base",
"action": "set",
"set": [
{ "field": "rateLimit.limits", "value": "600/1m(key=uid)" },
{ "field": "rateLimit.scope", "value": "account" }
]
}
]- The
gatedenies every other IP with403 ACCESS_DENIED(IP not allowed.). - One budget for the whole account. With
key=uidandrateLimit.scopeaccount, the 600 requests per minute are shared by all of the account's server keys and backend IPs, however many IPs your backends scale to. One runaway worker can use up the budget of the others. Akey=uidlimit adds nothing to the penalty. - No
threatsrule, because a backend's own IP can get an automatic threat entry, for example after a burst of429 RATE_LIMITED. - The global per-IP limit still applies.
[rate_limit] global(default100/1mper client IP) counts every request before the rules. Raise it above your backend's request rate per IP, or a single backend IP is limited well below this preset's 600. See the configuration reference.
Memory-hard variants
Each widget base preset has a memory-hard variant on ARGON2ID, applied when Memory-hard proof-of-work (Argon2id) is checked. The variant's id is <id>-memory-hard (preset:strict-memory-hard:base, …), except Recommended's, which is memory-hard (preset:memory-hard:base). The UI derives it from the PBKDF2 preset:
- The preset's first
setrule (base) getspow.algorithmARGON2ID,pow.cost2, and the memory and counter of the first row below, in place of its ownpow.counter.pow.costis left out where the rule would exceed 10 entries (Lockdown), since2is the Argon2id default. - Every other
pow.counteris replaced by thepow.memoryCostandpow.counterof its row.
| PBKDF2 counter | Used by | pow.memoryCost | pow.counter |
|---|---|---|---|
None (default 1-15000) | Every base without a counter | 16384 | 1-400 |
1-30000 | Recommended and Basic elevated, Country challenge | 32768 | 1-500 |
1-40000 | Strict and Recommended without code challenge elevated | 32768 | 1-800 |
1-50000 | Recommended high | 65536 | 1-400 |
1-80000 | Strict and Recommended without code challenge high, Lockdown | 65536 | 1-1000 |
Every counter starts at 1, because a solver that knows a higher minimum skips it. See Proof-of-work.
For example, Recommended's memory-hard base rule is:
{
"name": "preset:memory-hard:base",
"action": "set",
"set": [
{ "field": "rateLimit.limits", "value": "50/10m" },
{ "field": "headerEntropy.limit", "value": "10/4h" },
{ "field": "pow.algorithm", "value": "ARGON2ID" },
{ "field": "pow.cost", "value": "2" },
{ "field": "pow.memoryCost", "value": "16384" },
{ "field": "pow.counter", "value": "1-400" }
]
}- Memory is paid per widget worker. Each worker allocates
pow.memoryCostKiB: at 64 MiB, a widget with 8 workers uses 512 MiB. Lower thehighrule'spow.memoryCostfor sites with many low-end phones. - Sentinel pays one derivation per challenge, and at most
[pow] cpusderivations run at once (default half the available CPUs). See Proof-of-work. - Keep
pow.costin thebaserule. A later rule that setspow.costwithout its ownpow.algorithmmust fit Argon2id (1 to 10 passes); a PBKDF2 cost such as5000is rejected with400 INVALID_RULES.
Add-ons
| Add-on | <id> | Slot | Input | Rules |
|---|---|---|---|---|
| Trusted networks | trusted | 1 | Networks | accept |
| Verified agents | verified-agents | 1 | — | accept |
| Allowed origins | origins | 2 | Origins | allow |
| Block AI agents | block-ai | 2 | — | signed, lists |
| Country block | geo-block | 2 | Countries (default high_risk) | deny |
| Form fields | forms | 3 | — | classifier |
| Form fields (consumer sign-ups) | forms-consumer | 3 | — | classifier |
| Country challenge | geo-challenge | 5 | Countries (default high_risk) | elevated |
| Shared IPs | shared-ip | 5 | — | mobile |
| HIS | his | 5 | HIS mode (default monitor) | mode |
Networks are IP addresses or CIDR ranges; origins may use * for subdomains; countries are ISO codes such as RU or the lists high_risk and eu. Separate values with commas or spaces.
Trusted networks
Exempts your own networks (office, monitoring, your backend) from every later rule. Accepted requests get no rate limit, no threat blocking and the default proof-of-work.
{
"name": "preset:trusted:accept",
"action": "accept",
"conditions": [{ "field": "ip", "operator": "=", "value": ["203.0.113.0/24", "2001:db8::/48"] }]
}Verified agents
Lets search and AI-search crawlers that sign their requests with Web Bot Auth through without escalation. Both conditions must hold: a verified agent that isn't a training crawler or a user-driven fetcher. Accepted agents get no rate limit; a misbehaving agent with a valid signature is limited only by the global [rate_limit]. See Bots & AI agents.
{
"name": "preset:verified-agents:accept",
"action": "accept",
"conditions": [
{ "field": "agent", "operator": "=", "value": ["verified"] },
{ "field": "agent", "operator": "!=", "value": ["ai_training", "user_fetch"] }
]
}Allowed origins
Restricts the group's keys to your sites. A request without Origin and Referer is denied, so native apps and server-side calls with this key need a Trusted networks exemption or their own group. Origin is set by the client: this keeps the key off other websites, but doesn't stop scripts, which can send any header.
{
"name": "preset:origins:allow",
"action": "allow",
"message": "Origin not allowed.",
"conditions": [{ "field": "origin", "operator": "=", "value": ["https://example.com", "https://*.example.com"] }]
}Block AI agents
Denies AI training crawlers and user-driven AI fetchers, by their Web Bot Auth signature and by the threat lists, and any request whose signature doesn't verify. lists only matches when a threat source or entry of kind ai_training lists the IP. Unsigned agents from unlisted IPs pass both rules.
[
{
"name": "preset:block-ai:signed",
"action": "deny",
"message": "Agent denied.",
"conditions": [{ "field": "agent", "operator": "=", "value": ["unverified", "ai_training", "user_fetch"] }]
},
{
"name": "preset:block-ai:lists",
"action": "deny",
"message": "Agent denied.",
"conditions": [{ "field": "threat", "operator": "=", "value": ["ai_training"] }]
}
]Country block
Denies requests from the chosen countries. The country is the client IP's, so a VPN changes it, and an IP without a known country passes.
{
"name": "preset:geo-block:deny",
"action": "deny",
"message": "Not available in your country.",
"conditions": [{ "field": "country", "operator": "=", "value": ["high_risk"] }]
}Form fields
Makes the widget send the form's fields to /v2/verify, so the signed classification includes the email, text, injection and similarity rules. It changes what /v2/verify signs, not who gets a challenge. See Classifier.
{
"name": "preset:forms:classifier",
"action": "set",
"set": [{ "field": "classifier.fields", "value": "true" }]
}Form fields (consumer sign-ups) writes preset:forms-consumer:classifier instead, which also stops scoring free and privacy-relay email addresses, since most consumers use one:
{
"name": "preset:forms-consumer:classifier",
"action": "set",
"set": [
{ "field": "classifier.fields", "value": "true" },
{ "field": "classifier.disableRules", "value": "FREE_PROVIDER PRIVACY_RELAY" }
]
}classifier.disableRules replaces any earlier value, so a disable list of your own later in the group has to repeat these names.
Country challenge
Like Country block, but gives visitors from the chosen countries a code challenge and a harder proof-of-work instead of denying them.
{
"name": "preset:geo-challenge:elevated",
"action": "set",
"conditions": [{ "field": "country", "operator": "=", "value": ["high_risk"] }],
"set": [
{ "field": "codeChallenge.enabled", "value": "true" },
{ "field": "pow.counter", "value": "1-30000" }
]
}- It overrides the base preset's counter for these countries, including a higher
highcounter. Use it with Basic, or raise its counter to match. - With a memory-hard base preset, the UI writes
pow.memoryCost32768andpow.counter1-500instead of the PBKDF2 counter.
Shared IPs
Mobile carriers put many users behind one IP (CGNAT), and each device's headers count against the IP's header-entropy limit. This add-on raises the limit and lowers the penalty on mobile networks. The default rate-limit key edk is per device, so it needs no change. It needs the IP lookup, also with Basic.
{
"name": "preset:shared-ip:mobile",
"action": "set",
"conditions": [{ "field": "network", "operator": "=", "value": ["mobile"] }],
"set": [
{ "field": "headerEntropy.limit", "value": "30/4h" },
{ "field": "headerEntropy.penalty", "value": "0.5" }
]
}HIS
Turns on Human Interaction Signature for every request, in the mode you pick under HIS mode: monitor (the default, score only), relaxed or strict.
{
"name": "preset:his:mode",
"action": "set",
"set": [{ "field": "his.mode", "value": "monitor" }]
}- Start with
monitorand check your visitors' scores before switching torelaxedorstrict, which block widgets before 3.0.0. HISmonitoris a scoring mode; it is unrelated to the rule-level monitor mode. - It overwrites the base preset's
his.mode, including Strict's escalation tostrictin itshighrule and Lockdown'sstrict. It is meant for base presets without HIS. - Code challenges aren't scored. Add
his.codeChallengeyourself for that; it needs widget 3.6.0 or later.
Monitor mode
Any preset can be tried before it acts. With Apply in monitor mode checked, every rule of the preset gets "monitor": true. Monitored rules are evaluated but have no effect, and the request log records which of them fired. The rule names stay the same, so the UI still recognizes the preset and shows it as Monitored. See Monitor mode.
{
"name": "preset:strict:gate",
"action": "deny",
"monitor": true,
"message": "Too many failed attempts.",
"conditions": [{ "field": "penalty", "operator": ">=", "value": ["8"] }]
}- Apply the preset with Apply in monitor mode checked, and save the group.
- Set Request logging to Verification or All on the group's API keys. Only logged requests are counted. See Managing API keys.
- After a few days, open the group's Activity tab. It counts, per preset rule, how many requests it would have denied, allowed or escalated. With the API, use the
monitorbreakdown ofPOST /v2/request-logs/_statswith the group'ssecurityGroupId; preset rule names are the same in every group, so without the filter the counts mix groups. - Go live with Turn on preset on the Activity tab, or re-apply the preset with Apply in monitor mode unchecked, and save. Monitored rules are validated as if they were live, so the list saves unchanged.
- Counts, not costs. A monitored
elevatedorhighrule counts the requests that would have escalated, not the solve time or lost form submissions. - Each rule is measured against the live rules. Monitored
setentries aren't applied, so a monitored Form fields add-on doesn't change what a monitored base preset'srisksees. A request that a monitored gate would have denied still runs the rules after it. - Rules without conditions aren't counted. They apply to every request, so the
baserule's rate limit and header-entropy limit can't be measured this way.
Apply presets with the API
Because presets are plain rules, you reproduce one by sending its rules to PATCH /v2/security-groups/<id> with an admin session. An update replaces the whole list, so send the group's other rules too, in slot order. Keep the preset:<id>:<part> names: the admin UI then recognizes the preset, and shows Differs from template if the rules don't match its definition.
curl -X PATCH 'https://sentinel.example.com/v2/security-groups/sgr_…' \
-H 'Authorization: Bearer <jwt>' \
-H 'Content-Type: application/json' \
-d @recommended.jsonHere recommended.json holds a rules array with the four rules from Recommended. The response returns the saved group:
{
"data": {
"id": "sgr_…",
"name": "Website",
"access": "public",
"rules": [
{ "name": "preset:recommended:threats", "action": "deny", … },
{ "name": "preset:recommended:base", "action": "set", … },
{ "name": "preset:recommended:elevated", "action": "set", … },
{ "name": "preset:recommended:high", "action": "set", … }
],
…
}
}Invalid rules are rejected with 400 INVALID_RULES. See the API reference and Errors.