Show / Hide Table of Contents

Class ProtectionSettings

The settings used for protection rules.

Inheritance
object
ProtectionSettings
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Oci.WaasService.Models
Assembly: OCI.DotNetSDK.Waas.dll
Syntax
public class ProtectionSettings

Properties

AllowedHttpMethods

Declaration
[JsonProperty(PropertyName = "allowedHttpMethods", ItemConverterType = typeof(ResponseEnumConverter))]
public List<ProtectionSettings.AllowedHttpMethodsEnum> AllowedHttpMethods { get; set; }
Property Value
Type Description
List<ProtectionSettings.AllowedHttpMethodsEnum>

The list of allowed HTTP methods. If unspecified, default to [OPTIONS, GET, HEAD, POST]. This setting only applies if a corresponding protection rule is enabled, such as the "Restrict HTTP Request Methods" rule (key: 911100).

BlockAction

Declaration
[JsonProperty(PropertyName = "blockAction")]
[JsonConverter(typeof(ResponseEnumConverter))]
public ProtectionSettings.BlockActionEnum? BlockAction { get; set; }
Property Value
Type Description
ProtectionSettings.BlockActionEnum?

If action is set to BLOCK, this specifies how the traffic is blocked when detected as malicious by a protection rule. If unspecified, defaults to SET_RESPONSE_CODE.

BlockErrorPageCode

Declaration
[JsonProperty(PropertyName = "blockErrorPageCode")]
public string BlockErrorPageCode { get; set; }
Property Value
Type Description
string

The error code to show on the error page when action is set to BLOCK, blockAction is set to SHOW_ERROR_PAGE, and the traffic is detected as malicious by a protection rule. If unspecified, defaults to 403.

BlockErrorPageDescription

Declaration
[JsonProperty(PropertyName = "blockErrorPageDescription")]
public string BlockErrorPageDescription { get; set; }
Property Value
Type Description
string

The description text to show on the error page when action is set to BLOCK, blockAction is set to SHOW_ERROR_PAGE, and the traffic is detected as malicious by a protection rule. If unspecified, defaults to Access blocked by website owner. Please contact support.

BlockErrorPageMessage

Declaration
[JsonProperty(PropertyName = "blockErrorPageMessage")]
public string BlockErrorPageMessage { get; set; }
Property Value
Type Description
string

The message to show on the error page when action is set to BLOCK, blockAction is set to SHOW_ERROR_PAGE, and the traffic is detected as malicious by a protection rule. If unspecified, defaults to 'Access to the website is blocked.'

BlockResponseCode

Declaration
[JsonProperty(PropertyName = "blockResponseCode")]
public int? BlockResponseCode { get; set; }
Property Value
Type Description
int?

The response code returned when action is set to BLOCK, blockAction is set to SET_RESPONSE_CODE, and the traffic is detected as malicious by a protection rule. If unspecified, defaults to 403. The list of available response codes: 400, 401, 403, 405, 409, 411, 412, 413, 414, 415, 416, 500, 501, 502, 503, 504, 507.

IsResponseInspected

Declaration
[JsonProperty(PropertyName = "isResponseInspected")]
public bool? IsResponseInspected { get; set; }
Property Value
Type Description
bool?

Inspects the response body of origin responses. Can be used to detect leakage of sensitive data. If unspecified, defaults to false.
Note: Only origin responses with a Content-Type matching a value in mediaTypes will be inspected.

MaxArgumentCount

Declaration
[JsonProperty(PropertyName = "maxArgumentCount")]
public int? MaxArgumentCount { get; set; }
Property Value
Type Description
int?

MaxNameLengthPerArgument

Declaration
[JsonProperty(PropertyName = "maxNameLengthPerArgument")]
public int? MaxNameLengthPerArgument { get; set; }
Property Value
Type Description
int?

The maximum length allowed for each argument name, in characters. Arguements are query parameters or body parameters in a PUT or POST request. If unspecified, defaults to 400. This setting only applies if a corresponding protection rule is enabled, such as the "Values Limits" rule (key: 960208).

MaxResponseSizeInKiB

Declaration
[JsonProperty(PropertyName = "maxResponseSizeInKiB")]
public int? MaxResponseSizeInKiB { get; set; }
Property Value
Type Description
int?

The maximum response size to be fully inspected, in binary kilobytes (KiB). Anything over this limit will be partially inspected. If unspecified, defaults to 1024.

MaxTotalNameLengthOfArguments

Declaration
[JsonProperty(PropertyName = "maxTotalNameLengthOfArguments")]
public int? MaxTotalNameLengthOfArguments { get; set; }
Property Value
Type Description
int?

The maximum length allowed for the sum of the argument name and value, in characters. Arguements are query parameters or body parameters in a PUT or POST request. If unspecified, defaults to 64000. This setting only applies if a corresponding protection rule is enabled, such as the "Total Arguments Limits" rule (key: 960341).

MediaTypes

Declaration
[JsonProperty(PropertyName = "mediaTypes")]
public List<string> MediaTypes { get; set; }
Property Value
Type Description
List<string>

The list of media types to allow for inspection, if isResponseInspected is enabled. Only responses with MIME types in this list will be inspected. If unspecified, defaults to [\"text/html\", \"text/plain\", \"text/xml\"].
Supported MIME types include:
- text/html - text/plain - text/asp - text/css - text/x-script - application/json - text/webviewhtml - text/x-java-source - application/x-javascript - application/javascript - application/ecmascript - text/javascript - text/ecmascript - text/x-script.perl - text/x-script.phyton - application/plain - application/xml - text/xml

RecommendationsPeriodInDays

Declaration
[JsonProperty(PropertyName = "recommendationsPeriodInDays")]
public int? RecommendationsPeriodInDays { get; set; }
Property Value
Type Description
int?

The length of time to analyze traffic traffic, in days. After the analysis period, WafRecommendations will be populated. If unspecified, defaults to 10.
Use GET /waasPolicies/{waasPolicyId}/wafRecommendations to view WAF recommendations.

In this article
Back to top