AccessRule

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

Bases: object

A content access rule. An access rule specifies an action to take if a set of criteria is matched by a request.

Attributes

ACTION_ALLOW A constant which can be used with the action property of a AccessRule.
ACTION_BLOCK A constant which can be used with the action property of a AccessRule.
ACTION_BYPASS A constant which can be used with the action property of a AccessRule.
ACTION_DETECT A constant which can be used with the action property of a AccessRule.
ACTION_REDIRECT A constant which can be used with the action property of a AccessRule.
ACTION_SHOW_CAPTCHA A constant which can be used with the action property of a AccessRule.
BLOCK_ACTION_SET_RESPONSE_CODE A constant which can be used with the block_action property of a AccessRule.
BLOCK_ACTION_SHOW_ERROR_PAGE A constant which can be used with the block_action property of a AccessRule.
BYPASS_CHALLENGES_CAPTCHA A constant which can be used with the bypass_challenges property of a AccessRule.
BYPASS_CHALLENGES_DEVICE_FINGERPRINT_CHALLENGE A constant which can be used with the bypass_challenges property of a AccessRule.
BYPASS_CHALLENGES_HUMAN_INTERACTION_CHALLENGE A constant which can be used with the bypass_challenges property of a AccessRule.
BYPASS_CHALLENGES_JS_CHALLENGE A constant which can be used with the bypass_challenges property of a AccessRule.
REDIRECT_RESPONSE_CODE_FOUND A constant which can be used with the redirect_response_code property of a AccessRule.
REDIRECT_RESPONSE_CODE_MOVED_PERMANENTLY A constant which can be used with the redirect_response_code property of a AccessRule.
action [Required] Gets the action of this AccessRule.
block_action Gets the block_action of this AccessRule.
block_error_page_code Gets the block_error_page_code of this AccessRule.
block_error_page_description Gets the block_error_page_description of this AccessRule.
block_error_page_message Gets the block_error_page_message of this AccessRule.
block_response_code Gets the block_response_code of this AccessRule.
bypass_challenges Gets the bypass_challenges of this AccessRule.
captcha_footer Gets the captcha_footer of this AccessRule.
captcha_header Gets the captcha_header of this AccessRule.
captcha_submit_label Gets the captcha_submit_label of this AccessRule.
captcha_title Gets the captcha_title of this AccessRule.
criteria [Required] Gets the criteria of this AccessRule.
name [Required] Gets the name of this AccessRule.
redirect_response_code Gets the redirect_response_code of this AccessRule.
redirect_url Gets the redirect_url of this AccessRule.
response_header_manipulation Gets the response_header_manipulation of this AccessRule.

Methods

__init__(**kwargs) Initializes a new AccessRule object with values from keyword arguments.
ACTION_ALLOW = 'ALLOW'

A constant which can be used with the action property of a AccessRule. This constant has a value of “ALLOW”

ACTION_BLOCK = 'BLOCK'

A constant which can be used with the action property of a AccessRule. This constant has a value of “BLOCK”

ACTION_BYPASS = 'BYPASS'

A constant which can be used with the action property of a AccessRule. This constant has a value of “BYPASS”

ACTION_DETECT = 'DETECT'

A constant which can be used with the action property of a AccessRule. This constant has a value of “DETECT”

ACTION_REDIRECT = 'REDIRECT'

A constant which can be used with the action property of a AccessRule. This constant has a value of “REDIRECT”

ACTION_SHOW_CAPTCHA = 'SHOW_CAPTCHA'

A constant which can be used with the action property of a AccessRule. This constant has a value of “SHOW_CAPTCHA”

BLOCK_ACTION_SET_RESPONSE_CODE = 'SET_RESPONSE_CODE'

A constant which can be used with the block_action property of a AccessRule. This constant has a value of “SET_RESPONSE_CODE”

BLOCK_ACTION_SHOW_ERROR_PAGE = 'SHOW_ERROR_PAGE'

A constant which can be used with the block_action property of a AccessRule. This constant has a value of “SHOW_ERROR_PAGE”

BYPASS_CHALLENGES_CAPTCHA = 'CAPTCHA'

A constant which can be used with the bypass_challenges property of a AccessRule. This constant has a value of “CAPTCHA”

BYPASS_CHALLENGES_DEVICE_FINGERPRINT_CHALLENGE = 'DEVICE_FINGERPRINT_CHALLENGE'

A constant which can be used with the bypass_challenges property of a AccessRule. This constant has a value of “DEVICE_FINGERPRINT_CHALLENGE”

BYPASS_CHALLENGES_HUMAN_INTERACTION_CHALLENGE = 'HUMAN_INTERACTION_CHALLENGE'

A constant which can be used with the bypass_challenges property of a AccessRule. This constant has a value of “HUMAN_INTERACTION_CHALLENGE”

BYPASS_CHALLENGES_JS_CHALLENGE = 'JS_CHALLENGE'

A constant which can be used with the bypass_challenges property of a AccessRule. This constant has a value of “JS_CHALLENGE”

REDIRECT_RESPONSE_CODE_FOUND = 'FOUND'

A constant which can be used with the redirect_response_code property of a AccessRule. This constant has a value of “FOUND”

REDIRECT_RESPONSE_CODE_MOVED_PERMANENTLY = 'MOVED_PERMANENTLY'

A constant which can be used with the redirect_response_code property of a AccessRule. This constant has a value of “MOVED_PERMANENTLY”

__init__(**kwargs)

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

Parameters:
  • name (str) – The value to assign to the name property of this AccessRule.
  • criteria (list[oci.waas.models.AccessRuleCriteria]) – The value to assign to the criteria property of this AccessRule.
  • action (str) – The value to assign to the action property of this AccessRule. Allowed values for this property are: “ALLOW”, “DETECT”, “BLOCK”, “BYPASS”, “REDIRECT”, “SHOW_CAPTCHA”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
  • block_action (str) – The value to assign to the block_action property of this AccessRule. Allowed values for this property are: “SET_RESPONSE_CODE”, “SHOW_ERROR_PAGE”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
  • block_response_code (int) – The value to assign to the block_response_code property of this AccessRule.
  • block_error_page_message (str) – The value to assign to the block_error_page_message property of this AccessRule.
  • block_error_page_code (str) – The value to assign to the block_error_page_code property of this AccessRule.
  • block_error_page_description (str) – The value to assign to the block_error_page_description property of this AccessRule.
  • bypass_challenges (list[str]) – The value to assign to the bypass_challenges property of this AccessRule. Allowed values for items in this list are: “JS_CHALLENGE”, “DEVICE_FINGERPRINT_CHALLENGE”, “HUMAN_INTERACTION_CHALLENGE”, “CAPTCHA”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
  • redirect_url (str) – The value to assign to the redirect_url property of this AccessRule.
  • redirect_response_code (str) – The value to assign to the redirect_response_code property of this AccessRule. Allowed values for this property are: “MOVED_PERMANENTLY”, “FOUND”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
  • captcha_title (str) – The value to assign to the captcha_title property of this AccessRule.
  • captcha_header (str) – The value to assign to the captcha_header property of this AccessRule.
  • captcha_footer (str) – The value to assign to the captcha_footer property of this AccessRule.
  • captcha_submit_label (str) – The value to assign to the captcha_submit_label property of this AccessRule.
  • response_header_manipulation (list[oci.waas.models.HeaderManipulationAction]) – The value to assign to the response_header_manipulation property of this AccessRule.
action

[Required] Gets the action of this AccessRule. The action to take when the access criteria are met for a rule. If unspecified, defaults to ALLOW.

  • ALLOW: Takes no action, just logs the request.
  • DETECT: Takes no action, but creates an alert for the request.
  • BLOCK: Blocks the request by returning specified response code or showing error page.
  • BYPASS: Bypasses some or all challenges.
  • REDIRECT: Redirects the request to the specified URL. These fields are required when REDIRECT is selected: redirectUrl, redirectResponseCode.
  • SHOW_CAPTCHA: Show a CAPTCHA Challenge page instead of the requested page.

Regardless of action, no further rules are processed once a rule is matched.

Allowed values for this property are: “ALLOW”, “DETECT”, “BLOCK”, “BYPASS”, “REDIRECT”, “SHOW_CAPTCHA”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns:The action of this AccessRule.
Return type:str
block_action

Gets the block_action of this AccessRule. The method used to block requests if action is set to BLOCK and the access criteria are met. If unspecified, defaults to SET_RESPONSE_CODE.

Allowed values for this property are: “SET_RESPONSE_CODE”, “SHOW_ERROR_PAGE”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns:The block_action of this AccessRule.
Return type:str
block_error_page_code

Gets the block_error_page_code of this AccessRule. The error code to show on the error page when action is set to BLOCK, blockAction is set to SHOW_ERROR_PAGE, and the access criteria are met. If unspecified, defaults to ‘Access rules’.

Returns:The block_error_page_code of this AccessRule.
Return type:str
block_error_page_description

Gets the block_error_page_description of this AccessRule. The description text to show on the error page when action is set to BLOCK, blockAction is set to SHOW_ERROR_PAGE, and the access criteria are met. If unspecified, defaults to ‘Access blocked by website owner. Please contact support.’

Returns:The block_error_page_description of this AccessRule.
Return type:str
block_error_page_message

Gets the block_error_page_message of this AccessRule. The message to show on the error page when action is set to BLOCK, blockAction is set to SHOW_ERROR_PAGE, and the access criteria are met. If unspecified, defaults to ‘Access to the website is blocked.’

Returns:The block_error_page_message of this AccessRule.
Return type:str
block_response_code

Gets the block_response_code of this AccessRule. The response status code to return when action is set to BLOCK, blockAction is set to SET_RESPONSE_CODE, and the access criteria are met. If unspecified, defaults to 403. The list of available response codes: 200, 201, 202, 204, 206, 300, 301, 302, 303, 304, 307, 400, 401, 403, 404, 405, 408, 409, 411, 412, 413, 414, 415, 416, 422, 444, 494, 495, 496, 497, 499, 500, 501, 502, 503, 504, 507.

Returns:The block_response_code of this AccessRule.
Return type:int
bypass_challenges

Gets the bypass_challenges of this AccessRule. The list of challenges to bypass when action is set to BYPASS. If unspecified or empty, all challenges are bypassed.

  • JS_CHALLENGE: Bypasses JavaScript Challenge.
  • DEVICE_FINGERPRINT_CHALLENGE: Bypasses Device Fingerprint Challenge.
  • HUMAN_INTERACTION_CHALLENGE: Bypasses Human Interaction Challenge.
  • CAPTCHA: Bypasses CAPTCHA Challenge.

Allowed values for items in this list are: “JS_CHALLENGE”, “DEVICE_FINGERPRINT_CHALLENGE”, “HUMAN_INTERACTION_CHALLENGE”, “CAPTCHA”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns:The bypass_challenges of this AccessRule.
Return type:list[str]

Gets the captcha_footer of this AccessRule. The text to show in the footer when showing a CAPTCHA challenge when action is set to SHOW_CAPTCHA and the request is challenged.

Returns:The captcha_footer of this AccessRule.
Return type:str
captcha_header

Gets the captcha_header of this AccessRule. The text to show in the header when showing a CAPTCHA challenge when action is set to SHOW_CAPTCHA and the request is challenged.

Returns:The captcha_header of this AccessRule.
Return type:str
captcha_submit_label

Gets the captcha_submit_label of this AccessRule. The text to show on the label of the CAPTCHA challenge submit button when action is set to SHOW_CAPTCHA and the request is challenged.

Returns:The captcha_submit_label of this AccessRule.
Return type:str
captcha_title

Gets the captcha_title of this AccessRule. The title used when showing a CAPTCHA challenge when action is set to SHOW_CAPTCHA and the request is challenged.

Returns:The captcha_title of this AccessRule.
Return type:str
criteria

[Required] Gets the criteria of this AccessRule. The list of access rule criteria. The rule would be applied only for the requests that matched all the listed conditions.

Returns:The criteria of this AccessRule.
Return type:list[oci.waas.models.AccessRuleCriteria]
name

[Required] Gets the name of this AccessRule. The unique name of the access rule.

Returns:The name of this AccessRule.
Return type:str
redirect_response_code

Gets the redirect_response_code of this AccessRule. The response status code to return when action is set to REDIRECT.

  • MOVED_PERMANENTLY: Used for designating the permanent movement of a page (numerical code - 301).
  • FOUND: Used for designating the temporary movement of a page (numerical code - 302).

Allowed values for this property are: “MOVED_PERMANENTLY”, “FOUND”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns:The redirect_response_code of this AccessRule.
Return type:str
redirect_url

Gets the redirect_url of this AccessRule. The target to which the request should be redirected, represented as a URI reference. Required when action is REDIRECT.

Returns:The redirect_url of this AccessRule.
Return type:str
response_header_manipulation

Gets the response_header_manipulation of this AccessRule. An object that represents an action to apply to an HTTP response headers if all rule criteria will be matched regardless of action value.

Returns:The response_header_manipulation of this AccessRule.
Return type:list[oci.waas.models.HeaderManipulationAction]