How to: Modify Bot Signature Enablement¶
In this example we show how to enable bot signatures using the default bot configuration:
{
"policy": {
"name": "bot_defense_policy",
"template": {
"name": "POLICY_TEMPLATE_RATING_BASED"
},
"applicationLanguage": "utf-8",
"enforcementMode": "blocking",
"bot-defense": {
"settings": {
"isEnabled": true
}
}
}
}
The default actions for classes are: detect
for trusted-bot
, alarm
for untrusted-bot
, and block
for malicious-bot
. In this example, we enabled bot defense and specified that we want to raise a violation for trusted-bot
, and block for untrusted-bot
.
{
"policy": {
"name": "bot_defense_policy",
"template": {
"name": "POLICY_TEMPLATE_COMPREHENSIVE"
},
"applicationLanguage": "utf-8",
"enforcementMode": "blocking",
"bot-defense": {
"settings": {
"isEnabled": true
},
"mitigations": {
"classes": [
{
"name": "trusted-bot",
"action": "alarm"
},
{
"name": "untrusted-bot",
"action": "block"
},
{
"name": "malicious-bot",
"action": "block"
}
]
}
}
}
}
In this example, we override the action for a specific signature (python-requests)
{
"policy": {
"name": "bot_defense_policy",
"template": {
"name": "POLICY_TEMPLATE_WAF_BASE"
},
"applicationLanguage": "utf-8",
"enforcementMode": "blocking",
"bot-defense": {
"settings": {
"isEnabled": true
},
"mitigations": {
"signatures": [
{
"action": "ignore",
"name": "python-requests"
}
]
}
}
}
}