Update WAAS Host Policy
PUT/api/v33.02/policies/firewall/app/host
x-prisma-cloud-target-env: {"permission":"policyWAAS"}
Updates the WAAS policy for hosts. All rules in the policy are updated in a single shot.
To invoke this endpoint in the Console UI:
- Navigate to Defend > WAAS > Host.
- Click + Add rule and enter the new rule information.
- Click the Add new app button to move to the configuration window.
- Configure the application with at least one endpoint, and click the Save button.
Adding and maintaining rules for a WAAS app involves populating a large and complex JSON request body. We recommend the following process:
- Manually define your app's policy via the Console UI as described here.
- Use the Export button on Defend > WAAS to export the app's policy rules to a JSON file.
- Use the exported file as a template to modify, then either import the file back in using the Import button, or use it as the basis for defining the rules to include in this endpoint's payload.
cURL Request
Refer to the following example cURL command that overwrites all rules in your current policy with a new policy that has a single rule:
$ curl 'https://<CONSOLE>/api/v<VERSION>/policies/firewall/app/host' \
-k \
-X PUT \
-u <USER> \
-H 'Content-Type: application/json' \
-d \
'{
"_id":"hostAppFirewall",
"rules":[
{
"name":"My Rule",
"notes":"My Notes 4",
"collections":[
{
"name":"All"
}
],
"applicationsSpec":[
{
"banDurationMinutes":5,
"certificate":{
"encrypted":""
},
"dosConfig":{
"effect":"disable"
},
"apiSpec":{
"description":"test",
"endpoints":[
{
"host":"*",
"basePath":"*",
"exposedPort":0,
"internalPort":1,
"tls":false,
"http2":false
}
],
"effect":"disable",
"fallbackEffect":"disable"
},
"botProtectionSpec":{
"userDefinedBots":[
],
"knownBotProtectionsSpec":{
"searchEngineCrawlers":"disable",
"businessAnalytics":"disable",
"educational":"disable",
"news":"disable",
"financial":"disable",
"contentFeedClients":"disable",
"archiving":"disable",
"careerSearch":"disable",
"mediaSearch":"disable"
},
"unknownBotProtectionSpec":{
"generic":"disable",
"webAutomationTools":"disable",
"webScrapers":"disable",
"apiLibraries":"disable",
"httpLibraries":"disable",
"botImpersonation":"disable",
"browserImpersonation":"disable",
"requestAnomalies":{
"threshold":9,
"effect":"disable"
}
},
"sessionValidation":"disable",
"interstitialPage":false,
"jsInjectionSpec":{
"enabled":false,
"timeoutEffect":"disable"
}
},
"networkControls":{
"advancedProtectionEffect":"alert",
"deniedSubnetsEffect":"alert",
"deniedCountriesEffect":"alert",
"allowedCountriesEffect":"alert"
},
"body":{
"inspectionSizeBytes":131072
},
"intelGathering":{
"infoLeakageEffect":"disable",
"removeFingerprintsEnabled":true
},
"maliciousUpload":{
"effect":"disable",
"allowedFileTypes":[
],
"allowedExtensions":[
]
},
"csrfEnabled":true,
"clickjackingEnabled":true,
"sqli":{
"effect":"alert",
"exceptionFields":[
]
},
"xss":{
"effect":"alert",
"exceptionFields":[
]
},
"attackTools":{
"effect":"alert",
"exceptionFields":[
]
},
"shellshock":{
"effect":"alert",
"exceptionFields":[
]
},
"malformedReq":{
"effect":"alert",
"exceptionFields":[
]
},
"cmdi":{
"effect":"alert",
"exceptionFields":[
]
},
"lfi":{
"effect":"alert",
"exceptionFields":[
]
},
"codeInjection":{
"effect":"alert",
"exceptionFields":[
]
},
"remoteHostForwarding":{
}
}
],
"expandDetails":true
}
],
"minPort":30000,
"maxPort":31000
}'
Note: No response will be returned upon successful execution.
Request
Responses
- 200
- default
OK