SmartWebSecurity WAF API, gRPC: WafProfileService.Create
- gRPC request
- CreateWafProfileRequest
- WafProfileRule
- WafProfileExclusionRule
- Condition
- AuthorityMatcher
- StringMatcher
- HttpMethodMatcher
- RequestUriMatcher
- QueryMatcher
- HeaderMatcher
- IpMatcher
- IpRangesMatcher
- GeoIpMatcher
- ExcludeRules
- CoreRuleSet
- RuleSet
- AnalyzeRequestBody
- operation.Operation
- CreateWafProfileMetadata
- WafProfile
- WafProfileRule
- WafProfileExclusionRule
- Condition
- AuthorityMatcher
- StringMatcher
- HttpMethodMatcher
- RequestUriMatcher
- QueryMatcher
- HeaderMatcher
- IpMatcher
- IpRangesMatcher
- GeoIpMatcher
- ExcludeRules
- CoreRuleSet
- RuleSet
- AnalyzeRequestBody
Creates a WAF profile in the specified folder using the data specified in the request.
gRPC request
rpc Create (CreateWafProfileRequest) returns (operation.Operation)
CreateWafProfileRequest
{
"folderId": "string",
"name": "string",
"description": "string",
"labels": "string",
"rules": [
{
"ruleId": "string",
"isEnabled": "bool",
"isBlocking": "bool"
}
],
"exclusionRules": [
{
"name": "string",
"description": "string",
"condition": {
"authority": {
"authorities": [
{
// Includes only one of the fields `exactMatch`, `exactNotMatch`, `prefixMatch`, `prefixNotMatch`, `pireRegexMatch`, `pireRegexNotMatch`
"exactMatch": "string",
"exactNotMatch": "string",
"prefixMatch": "string",
"prefixNotMatch": "string",
"pireRegexMatch": "string",
"pireRegexNotMatch": "string"
// end of the list of possible fields
}
]
},
"httpMethod": {
"httpMethods": [
{
// Includes only one of the fields `exactMatch`, `exactNotMatch`, `prefixMatch`, `prefixNotMatch`, `pireRegexMatch`, `pireRegexNotMatch`
"exactMatch": "string",
"exactNotMatch": "string",
"prefixMatch": "string",
"prefixNotMatch": "string",
"pireRegexMatch": "string",
"pireRegexNotMatch": "string"
// end of the list of possible fields
}
]
},
"requestUri": {
"path": {
// Includes only one of the fields `exactMatch`, `exactNotMatch`, `prefixMatch`, `prefixNotMatch`, `pireRegexMatch`, `pireRegexNotMatch`
"exactMatch": "string",
"exactNotMatch": "string",
"prefixMatch": "string",
"prefixNotMatch": "string",
"pireRegexMatch": "string",
"pireRegexNotMatch": "string"
// end of the list of possible fields
},
"queries": [
{
"key": "string",
"value": {
// Includes only one of the fields `exactMatch`, `exactNotMatch`, `prefixMatch`, `prefixNotMatch`, `pireRegexMatch`, `pireRegexNotMatch`
"exactMatch": "string",
"exactNotMatch": "string",
"prefixMatch": "string",
"prefixNotMatch": "string",
"pireRegexMatch": "string",
"pireRegexNotMatch": "string"
// end of the list of possible fields
}
}
]
},
"headers": [
{
"name": "string",
"value": {
// Includes only one of the fields `exactMatch`, `exactNotMatch`, `prefixMatch`, `prefixNotMatch`, `pireRegexMatch`, `pireRegexNotMatch`
"exactMatch": "string",
"exactNotMatch": "string",
"prefixMatch": "string",
"prefixNotMatch": "string",
"pireRegexMatch": "string",
"pireRegexNotMatch": "string"
// end of the list of possible fields
}
}
],
"sourceIp": {
"ipRangesMatch": {
"ipRanges": [
"string"
]
},
"ipRangesNotMatch": {
"ipRanges": [
"string"
]
},
"geoIpMatch": {
"locations": [
"string"
]
},
"geoIpNotMatch": {
"locations": [
"string"
]
}
}
},
"excludeRules": {
"excludeAll": "bool",
"ruleIds": [
"string"
]
},
"logExcluded": "bool"
}
],
// Includes only one of the fields `coreRuleSet`
"coreRuleSet": {
"inboundAnomalyScore": "int64",
"paranoiaLevel": "int64",
"ruleSet": {
"name": "string",
"version": "string"
}
},
// end of the list of possible fields
"analyzeRequestBody": {
"isEnabled": "bool",
"sizeLimit": "int64",
"sizeLimitAction": "Action"
}
}
Field |
Description |
folderId |
string ID of the folder to create a WAF profile in. |
name |
string Name of the WAF profile. The name is unique within the folder. 1-50 characters long. |
description |
string Optional description of the WAF profile. |
labels |
string Labels as |
rules[] |
Settings for each rule in rule set. |
exclusionRules[] |
List of exclusion rules. See Rules. |
coreRuleSet |
Core rule set settings. See Basic rule set for details. Includes only one of the fields |
analyzeRequestBody |
Parameters for request body analyzer. |
WafProfileRule
WafProfileRule object. Determines settings for each rule_id in rule set.
Field |
Description |
ruleId |
string Required field. Rule ID. |
isEnabled |
bool Determines is it rule enabled or not. |
isBlocking |
bool Determines is it rule blocking or not. |
WafProfileExclusionRule
A WafProfileExclusionRule object. See Exclusion rules.
Field |
Description |
name |
string Required field. Name of exclusion rule. |
description |
string Optional description of the rule. 0-512 characters long. |
condition |
The condition for matching traffic. |
excludeRules |
Required field. Exclude rules. |
logExcluded |
bool Records the fact that an exception rule is triggered. |
Condition
Condition object. AND semantics implied.
See documentation for matchers description.
Field |
Description |
authority |
Match authority (Host header). |
httpMethod |
Match HTTP method. |
requestUri |
Match Request URI. |
headers[] |
Match HTTP headers. |
sourceIp |
Match IP. |
AuthorityMatcher
AuthorityMatcher object.
Field |
Description |
authorities[] |
List of authorities. OR semantics implied. |
StringMatcher
StringMatcher object.
Field |
Description |
exactMatch |
string Includes only one of the fields |
exactNotMatch |
string Includes only one of the fields |
prefixMatch |
string Includes only one of the fields |
prefixNotMatch |
string Includes only one of the fields |
pireRegexMatch |
string Includes only one of the fields |
pireRegexNotMatch |
string Includes only one of the fields |
HttpMethodMatcher
HttpMethodMatcher object.
Field |
Description |
httpMethods[] |
List of HTTP methods. OR semantics implied. |
RequestUriMatcher
RequestUriMatcher object. AND semantics implied.
Field |
Description |
path |
Path of the URI RFC3986 |
queries[] |
List of query matchers. AND semantics implied. |
QueryMatcher
QueryMatcher object.
Field |
Description |
key |
string Required field. Key of the query parameter. |
value |
Required field. Value of the query parameter. |
HeaderMatcher
HeaderMatcher object.
Field |
Description |
name |
string Required field. Name of header (case insensitive). |
value |
Required field. Value of the header. |
IpMatcher
IpMatcher object. AND semantics implied.
Field |
Description |
ipRangesMatch |
|
ipRangesNotMatch |
|
geoIpMatch |
|
geoIpNotMatch |
IpRangesMatcher
IpRangesMatcher object.
Field |
Description |
ipRanges[] |
string List of IP ranges. OR semantics implied. |
GeoIpMatcher
GeoIpMatcher object.
Field |
Description |
locations[] |
string ISO 3166-1 alpha 2. OR semantics implied. |
ExcludeRules
Determines list of excluded rules.
Field |
Description |
excludeAll |
bool Set this option true to exclude all rules. |
ruleIds[] |
string List of rules to exclude. |
CoreRuleSet
Field |
Description |
inboundAnomalyScore |
int64 Anomaly score. |
paranoiaLevel |
int64 Paranoia level. |
ruleSet |
Required field. Rule set. |
RuleSet
A RuleSet object. Determines name and version of rule set.
Field |
Description |
name |
string Required field. Name of rule set. |
version |
string Required field. Version of rule set. |
AnalyzeRequestBody
Field |
Description |
isEnabled |
bool Possible to turn analyzer on and turn if off. |
sizeLimit |
int64 Maximum size of body to pass to analyzer. In kilobytes. |
sizeLimitAction |
enum Action Action to perform if maximum size of body exceeded.
|
operation.Operation
{
"id": "string",
"description": "string",
"createdAt": "google.protobuf.Timestamp",
"createdBy": "string",
"modifiedAt": "google.protobuf.Timestamp",
"done": "bool",
"metadata": {
"wafProfileId": "string"
},
// Includes only one of the fields `error`, `response`
"error": "google.rpc.Status",
"response": {
"id": "string",
"folderId": "string",
"cloudId": "string",
"name": "string",
"description": "string",
"labels": "string",
"createdAt": "google.protobuf.Timestamp",
"rules": [
{
"ruleId": "string",
"isEnabled": "bool",
"isBlocking": "bool"
}
],
"exclusionRules": [
{
"name": "string",
"description": "string",
"condition": {
"authority": {
"authorities": [
{
// Includes only one of the fields `exactMatch`, `exactNotMatch`, `prefixMatch`, `prefixNotMatch`, `pireRegexMatch`, `pireRegexNotMatch`
"exactMatch": "string",
"exactNotMatch": "string",
"prefixMatch": "string",
"prefixNotMatch": "string",
"pireRegexMatch": "string",
"pireRegexNotMatch": "string"
// end of the list of possible fields
}
]
},
"httpMethod": {
"httpMethods": [
{
// Includes only one of the fields `exactMatch`, `exactNotMatch`, `prefixMatch`, `prefixNotMatch`, `pireRegexMatch`, `pireRegexNotMatch`
"exactMatch": "string",
"exactNotMatch": "string",
"prefixMatch": "string",
"prefixNotMatch": "string",
"pireRegexMatch": "string",
"pireRegexNotMatch": "string"
// end of the list of possible fields
}
]
},
"requestUri": {
"path": {
// Includes only one of the fields `exactMatch`, `exactNotMatch`, `prefixMatch`, `prefixNotMatch`, `pireRegexMatch`, `pireRegexNotMatch`
"exactMatch": "string",
"exactNotMatch": "string",
"prefixMatch": "string",
"prefixNotMatch": "string",
"pireRegexMatch": "string",
"pireRegexNotMatch": "string"
// end of the list of possible fields
},
"queries": [
{
"key": "string",
"value": {
// Includes only one of the fields `exactMatch`, `exactNotMatch`, `prefixMatch`, `prefixNotMatch`, `pireRegexMatch`, `pireRegexNotMatch`
"exactMatch": "string",
"exactNotMatch": "string",
"prefixMatch": "string",
"prefixNotMatch": "string",
"pireRegexMatch": "string",
"pireRegexNotMatch": "string"
// end of the list of possible fields
}
}
]
},
"headers": [
{
"name": "string",
"value": {
// Includes only one of the fields `exactMatch`, `exactNotMatch`, `prefixMatch`, `prefixNotMatch`, `pireRegexMatch`, `pireRegexNotMatch`
"exactMatch": "string",
"exactNotMatch": "string",
"prefixMatch": "string",
"prefixNotMatch": "string",
"pireRegexMatch": "string",
"pireRegexNotMatch": "string"
// end of the list of possible fields
}
}
],
"sourceIp": {
"ipRangesMatch": {
"ipRanges": [
"string"
]
},
"ipRangesNotMatch": {
"ipRanges": [
"string"
]
},
"geoIpMatch": {
"locations": [
"string"
]
},
"geoIpNotMatch": {
"locations": [
"string"
]
}
}
},
"excludeRules": {
"excludeAll": "bool",
"ruleIds": [
"string"
]
},
"logExcluded": "bool"
}
],
// Includes only one of the fields `coreRuleSet`
"coreRuleSet": {
"inboundAnomalyScore": "int64",
"paranoiaLevel": "int64",
"ruleSet": {
"name": "string",
"version": "string"
}
},
// end of the list of possible fields
"analyzeRequestBody": {
"isEnabled": "bool",
"sizeLimit": "int64",
"sizeLimitAction": "Action"
}
}
// end of the list of possible fields
}
An Operation resource. For more information, see Operation.
Field |
Description |
id |
string ID of the operation. |
description |
string Description of the operation. 0-256 characters long. |
createdAt |
Creation timestamp. |
createdBy |
string ID of the user or service account who initiated the operation. |
modifiedAt |
The time when the Operation resource was last modified. |
done |
bool If the value is |
metadata |
Service-specific metadata associated with the operation. |
error |
The error result of the operation in case of failure or cancellation. Includes only one of the fields The operation result. |
response |
The normal response of the operation in case of success. Includes only one of the fields The operation result. |
CreateWafProfileMetadata
Field |
Description |
wafProfileId |
string ID of the WAF profile that is being created. |
WafProfile
Field |
Description |
id |
string Required field. ID of the WAF profile. |
folderId |
string Required field. ID of the folder that the WAF profile belongs to. |
cloudId |
string Required field. ID of the cloud that the WAF profile belongs to. |
name |
string Required field. Name of the WAF profile. The name is unique within the folder. 1-50 characters long. |
description |
string Optional description of the WAF profile. |
labels |
string Labels as |
createdAt |
Creation timestamp in RFC3339 |
rules[] |
Settings for each rule in rule set. |
exclusionRules[] |
List of exclusion rules. See Rules. |
coreRuleSet |
Core rule set settings. See Basic rule set for details. Includes only one of the fields |
analyzeRequestBody |
Parameters for request body analyzer. |
WafProfileRule
WafProfileRule object. Determines settings for each rule_id in rule set.
Field |
Description |
ruleId |
string Required field. Rule ID. |
isEnabled |
bool Determines is it rule enabled or not. |
isBlocking |
bool Determines is it rule blocking or not. |
WafProfileExclusionRule
A WafProfileExclusionRule object. See Exclusion rules.
Field |
Description |
name |
string Required field. Name of exclusion rule. |
description |
string Optional description of the rule. 0-512 characters long. |
condition |
The condition for matching traffic. |
excludeRules |
Required field. Exclude rules. |
logExcluded |
bool Records the fact that an exception rule is triggered. |
Condition
Condition object. AND semantics implied.
See documentation for matchers description.
Field |
Description |
authority |
Match authority (Host header). |
httpMethod |
Match HTTP method. |
requestUri |
Match Request URI. |
headers[] |
Match HTTP headers. |
sourceIp |
Match IP. |
AuthorityMatcher
AuthorityMatcher object.
Field |
Description |
authorities[] |
List of authorities. OR semantics implied. |
StringMatcher
StringMatcher object.
Field |
Description |
exactMatch |
string Includes only one of the fields |
exactNotMatch |
string Includes only one of the fields |
prefixMatch |
string Includes only one of the fields |
prefixNotMatch |
string Includes only one of the fields |
pireRegexMatch |
string Includes only one of the fields |
pireRegexNotMatch |
string Includes only one of the fields |
HttpMethodMatcher
HttpMethodMatcher object.
Field |
Description |
httpMethods[] |
List of HTTP methods. OR semantics implied. |
RequestUriMatcher
RequestUriMatcher object. AND semantics implied.
Field |
Description |
path |
Path of the URI RFC3986 |
queries[] |
List of query matchers. AND semantics implied. |
QueryMatcher
QueryMatcher object.
Field |
Description |
key |
string Required field. Key of the query parameter. |
value |
Required field. Value of the query parameter. |
HeaderMatcher
HeaderMatcher object.
Field |
Description |
name |
string Required field. Name of header (case insensitive). |
value |
Required field. Value of the header. |
IpMatcher
IpMatcher object. AND semantics implied.
Field |
Description |
ipRangesMatch |
|
ipRangesNotMatch |
|
geoIpMatch |
|
geoIpNotMatch |
IpRangesMatcher
IpRangesMatcher object.
Field |
Description |
ipRanges[] |
string List of IP ranges. OR semantics implied. |
GeoIpMatcher
GeoIpMatcher object.
Field |
Description |
locations[] |
string ISO 3166-1 alpha 2. OR semantics implied. |
ExcludeRules
Determines list of excluded rules.
Field |
Description |
excludeAll |
bool Set this option true to exclude all rules. |
ruleIds[] |
string List of rules to exclude. |
CoreRuleSet
Field |
Description |
inboundAnomalyScore |
int64 Anomaly score. |
paranoiaLevel |
int64 Paranoia level. |
ruleSet |
Required field. Rule set. |
RuleSet
A RuleSet object. Determines name and version of rule set.
Field |
Description |
name |
string Required field. Name of rule set. |
version |
string Required field. Version of rule set. |
AnalyzeRequestBody
Field |
Description |
isEnabled |
bool Possible to turn analyzer on and turn if off. |
sizeLimit |
int64 Maximum size of body to pass to analyzer. In kilobytes. |
sizeLimitAction |
enum Action Action to perform if maximum size of body exceeded.
|