JsChallenge

class oci.waas.models.JsChallenge(**kwargs)

Bases: object

The JavaScript challenge settings. Javascript Challenge is the function to filter abnormal or malicious bots and allow access to real clients.

ACTION_BLOCK = 'BLOCK'

A constant which can be used with the action property of a JsChallenge. This constant has a value of "BLOCK"

ACTION_DETECT = 'DETECT'

A constant which can be used with the action property of a JsChallenge. This constant has a value of "DETECT"

__init__(**kwargs)

Initializes a new JsChallenge object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters:
  • is_enabled (bool) -- The value to assign to the is_enabled property of this JsChallenge.
  • action (str) -- The value to assign to the action property of this JsChallenge. Allowed values for this property are: "DETECT", "BLOCK", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
  • failure_threshold (int) -- The value to assign to the failure_threshold property of this JsChallenge.
  • action_expiration_in_seconds (int) -- The value to assign to the action_expiration_in_seconds property of this JsChallenge.
  • set_http_header (Header) -- The value to assign to the set_http_header property of this JsChallenge.
  • challenge_settings (BlockChallengeSettings) -- The value to assign to the challenge_settings property of this JsChallenge.
action

Gets the action of this JsChallenge. The action to take against requests from detected bots. If unspecified, defaults to DETECT.

Allowed values for this property are: "DETECT", "BLOCK", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.

Returns:The action of this JsChallenge.
Return type:str
action_expiration_in_seconds

Gets the action_expiration_in_seconds of this JsChallenge. The number of seconds between challenges from the same IP address. If unspecified, defaults to 60.

Returns:The action_expiration_in_seconds of this JsChallenge.
Return type:int
challenge_settings

Gets the challenge_settings of this JsChallenge.

Returns:The challenge_settings of this JsChallenge.
Return type:BlockChallengeSettings
failure_threshold

Gets the failure_threshold of this JsChallenge. The number of failed requests before taking action. If unspecified, defaults to 10.

Returns:The failure_threshold of this JsChallenge.
Return type:int
is_enabled

[Required] Gets the is_enabled of this JsChallenge. Enables or disables the JavaScript challenge Web Application Firewall feature.

Returns:The is_enabled of this JsChallenge.
Return type:bool
set_http_header

Gets the set_http_header of this JsChallenge. Adds an additional HTTP header to requests that fail the challenge before being passed to the origin. Only applicable when the action is set to DETECT.

Returns:The set_http_header of this JsChallenge.
Return type:Header