oracle.oci.oci_waas_waf_config – Manage a WafConfig resource in Oracle Cloud Infrastructure

Note

This plugin is part of the oracle.oci collection (version 4.11.0).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install oracle.oci.

To use it in a playbook, specify: oracle.oci.oci_waas_waf_config.

New in version 2.9.0: of oracle.oci

Synopsis

  • This module allows the user to update a WafConfig resource in Oracle Cloud Infrastructure

Requirements

The below requirements are needed on the host that executes this module.

Parameters

Parameter Choices/Defaults Comments
access_rules
list / elements=dictionary
The access rules applied to the Web Application Firewall. Used for defining custom access policies with the combination of `ALLOW`, `DETECT`, and `BLOCK` rules, based on different criteria.
This parameter is updatable.
action
string / required
    Choices:
  • ALLOW
  • DETECT
  • BLOCK
  • BYPASS
  • REDIRECT
  • SHOW_CAPTCHA
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.
This parameter is updatable.
block_action
string
    Choices:
  • SET_RESPONSE_CODE
  • SHOW_ERROR_PAGE
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`.
This parameter is updatable.
block_error_page_code
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 access criteria are met. If unspecified, defaults to 'Access rules'.
This parameter is updatable.
block_error_page_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 access criteria are met. If unspecified, defaults to 'Access blocked by website owner. Please contact support.'
This parameter is updatable.
block_error_page_message
string
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.'
This parameter is updatable.
block_response_code
integer
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`.
This parameter is updatable.
bypass_challenges
list / elements=string
    Choices:
  • JS_CHALLENGE
  • DEVICE_FINGERPRINT_CHALLENGE
  • HUMAN_INTERACTION_CHALLENGE
  • CAPTCHA
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.
This parameter is updatable.
captcha_footer
string
The text to show in the footer when showing a CAPTCHA challenge when `action` is set to `SHOW_CAPTCHA` and the request is challenged.
This parameter is updatable.
captcha_header
string
The text to show in the header when showing a CAPTCHA challenge when `action` is set to `SHOW_CAPTCHA` and the request is challenged.
This parameter is updatable.
captcha_submit_label
string
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.
This parameter is updatable.
captcha_title
string
The title used when showing a CAPTCHA challenge when `action` is set to `SHOW_CAPTCHA` and the request is challenged.
This parameter is updatable.
criteria
list / elements=dictionary / required
The list of access rule criteria. The rule would be applied only for the requests that matched all the listed conditions.
condition
string / required
    Choices:
  • URL_IS
  • URL_IS_NOT
  • URL_STARTS_WITH
  • URL_PART_ENDS_WITH
  • URL_PART_CONTAINS
  • URL_REGEX
  • URL_DOES_NOT_MATCH_REGEX
  • URL_DOES_NOT_START_WITH
  • URL_PART_DOES_NOT_CONTAIN
  • URL_PART_DOES_NOT_END_WITH
  • IP_IS
  • IP_IS_NOT
  • IP_IN_LIST
  • IP_NOT_IN_LIST
  • HTTP_HEADER_CONTAINS
  • HTTP_METHOD_IS
  • HTTP_METHOD_IS_NOT
  • COUNTRY_IS
  • COUNTRY_IS_NOT
  • USER_AGENT_IS
  • USER_AGENT_IS_NOT
The criteria the access rule and JavaScript Challenge uses to determine if action should be taken on a request. - **URL_IS:** Matches if the concatenation of request URL path and query is identical to the contents of the `value` field. URL must start with a `/`. - **URL_IS_NOT:** Matches if the concatenation of request URL path and query is not identical to the contents of the `value` field. URL must start with a `/`. - **URL_STARTS_WITH:** Matches if the concatenation of request URL path and query starts with the contents of the `value` field. URL must start with a `/`. - **URL_PART_ENDS_WITH:** Matches if the concatenation of request URL path and query ends with the contents of the `value` field. - **URL_PART_CONTAINS:** Matches if the concatenation of request URL path and query contains the contents of the `value` field. - **URL_REGEX:** Matches if the concatenation of request URL path and query is described by the regular expression in the value field. The value must be a valid regular expression recognized by the PCRE library in Nginx (https://www.pcre.org). - **URL_DOES_NOT_MATCH_REGEX:** Matches if the concatenation of request URL path and query is not described by the regular expression in the `value` field. The value must be a valid regular expression recognized by the PCRE library in Nginx (https://www.pcre.org). - **URL_DOES_NOT_START_WITH:** Matches if the concatenation of request URL path and query does not start with the contents of the `value` field. - **URL_PART_DOES_NOT_CONTAIN:** Matches if the concatenation of request URL path and query does not contain the contents of the `value` field. - **URL_PART_DOES_NOT_END_WITH:** Matches if the concatenation of request URL path and query does not end with the contents of the `value` field. - **IP_IS:** Matches if the request originates from one of the IP addresses contained in the defined address list. The `value` in this case is string with one or multiple IPs or CIDR notations separated by new line symbol \n *Example:* "1.1.1.1\n1.1.1.2\n1.2.2.1/30" - **IP_IS_NOT:** Matches if the request does not originate from any of the IP addresses contained in the defined address list. The `value` in this case is string with one or multiple IPs or CIDR notations separated by new line symbol \n *Example:* "1.1.1.1\n1.1.1.2\n1.2.2.1/30" - **IP_IN_LIST:** Matches if the request originates from one of the IP addresses contained in the referenced address list. The `value` in this case is OCID of the address list. - **IP_NOT_IN_LIST:** Matches if the request does not originate from any IP address contained in the referenced address list. The `value` field in this case is OCID of the address list. - **HTTP_HEADER_CONTAINS:** The HTTP_HEADER_CONTAINS criteria is defined using a compound value separated by a colon: a header field name and a header field value. `host:test.example.com` is an example of a criteria value where `host` is the header field name and `test.example.com` is the header field value. A request matches when the header field name is a case insensitive match and the header field value is a case insensitive, substring match. *Example:* With a criteria value of `host:test.example.com`, where `host` is the name of the field and `test.example.com` is the value of the host field, a request with the header values, `Host: www.test.example.com` will match, where as a request with header values of `host: www.example.com` or `host: test.sub.example.com` will not match. - **HTTP_METHOD_IS:** Matches if the request method is identical to one of the values listed in field. The `value` in this case is string with one or multiple HTTP methods separated by new line symbol \n The list of available methods: `GET`, `HEAD`, `POST`, `PUT`, `DELETE`, `CONNECT`, `OPTIONS`, `TRACE`, `PATCH`
*Example:* "GET\nPOST"
- **HTTP_METHOD_IS_NOT:** Matches if the request is not identical to any of the contents of the `value` field. The `value` in this case is string with one or multiple HTTP methods separated by new line symbol \n The list of available methods: `GET`, `HEAD`, `POST`, `PUT`, `DELETE`, `CONNECT`, `OPTIONS`, `TRACE`, `PATCH`
*Example:* "GET\nPOST"
- **COUNTRY_IS:** Matches if the request originates from one of countries in the `value` field. The `value` in this case is string with one or multiple countries separated by new line symbol \n Country codes are in ISO 3166-1 alpha-2 format. For a list of codes, see ISO's website. *Example:* "AL\nDZ\nAM" - **COUNTRY_IS_NOT:** Matches if the request does not originate from any of countries in the `value` field. The `value` in this case is string with one or multiple countries separated by new line symbol \n Country codes are in ISO 3166-1 alpha-2 format. For a list of codes, see ISO's website. *Example:* "AL\nDZ\nAM" - **USER_AGENT_IS:** Matches if the requesting user agent is identical to the contents of the `value` field. *Example:* `Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0` - **USER_AGENT_IS_NOT:** Matches if the requesting user agent is not identical to the contents of the `value` field. *Example:* `Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0`
This parameter is updatable.
is_case_sensitive
boolean
    Choices:
  • no
  • yes
When enabled, the condition will be matched with case-sensitive rules.
This parameter is updatable.
value
string / required
The criteria value.
This parameter is updatable.
name
string / required
The unique name of the access rule.
This parameter is updatable.
redirect_response_code
string
    Choices:
  • MOVED_PERMANENTLY
  • FOUND
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).
This parameter is updatable.
redirect_url
string
The target to which the request should be redirected, represented as a URI reference. Required when `action` is `REDIRECT`.
This parameter is updatable.
response_header_manipulation
list / elements=dictionary
An object that represents an action to apply to an HTTP response headers if all rule criteria will be matched regardless of `action` value.
action
string / required
    Choices:
  • EXTEND_HTTP_RESPONSE_HEADER
  • ADD_HTTP_RESPONSE_HEADER
  • REMOVE_HTTP_RESPONSE_HEADER
This parameter is updatable.
header
string / required
A header field name that conforms to RFC 7230.
Example: `example_header_name`
This parameter is updatable.
value
string
A header field value that conforms to RFC 7230.
Example: `example_value`
This parameter is updatable.
Required when action is one of ['ADD_HTTP_RESPONSE_HEADER', 'EXTEND_HTTP_RESPONSE_HEADER']
address_rate_limiting
dictionary
The IP address rate limiting settings used to limit the number of requests from an address.
This parameter is updatable.
allowed_rate_per_address
integer
The number of allowed requests per second from one IP address. If unspecified, defaults to `1`.
This parameter is updatable.
block_response_code
integer
The response status code returned when a request is blocked. If unspecified, defaults to `503`. The list of available response codes: `400`, `401`, `403`, `404`, `405`, `408`, `409`, `411`, `412`, `413`, `414`, `415`, `416`, `422`, `494`, `495`, `496`, `497`, `499`, `500`, `501`, `502`, `503`, `504`, `507`.
This parameter is updatable.
is_enabled
boolean / required
    Choices:
  • no
  • yes
Enables or disables the address rate limiting Web Application Firewall feature.
This parameter is updatable.
max_delayed_count_per_address
integer
The maximum number of requests allowed to be queued before subsequent requests are dropped. If unspecified, defaults to `10`.
This parameter is updatable.
api_user
string
The OCID of the user, on whose behalf, OCI APIs are invoked. If not set, then the value of the OCI_USER_ID environment variable, if any, is used. This option is required if the user is not specified through a configuration file (See config_file_location). To get the user's OCID, please refer https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm.
api_user_fingerprint
string
Fingerprint for the key pair being used. If not set, then the value of the OCI_USER_FINGERPRINT environment variable, if any, is used. This option is required if the key fingerprint is not specified through a configuration file (See config_file_location). To get the key pair's fingerprint value please refer https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm.
api_user_key_file
string
Full path and filename of the private key (in PEM format). If not set, then the value of the OCI_USER_KEY_FILE variable, if any, is used. This option is required if the private key is not specified through a configuration file (See config_file_location). If the key is encrypted with a pass-phrase, the api_user_key_pass_phrase option must also be provided.
api_user_key_pass_phrase
string
Passphrase used by the key referenced in api_user_key_file, if it is encrypted. If not set, then the value of the OCI_USER_KEY_PASS_PHRASE variable, if any, is used. This option is required if the key passphrase is not specified through a configuration file (See config_file_location).
auth_purpose
string
    Choices:
  • service_principal
The auth purpose which can be used in conjunction with 'auth_type=instance_principal'. The default auth_purpose for instance_principal is None.
auth_type
string
    Choices:
  • api_key ←
  • instance_principal
  • instance_obo_user
  • resource_principal
The type of authentication to use for making API requests. By default auth_type="api_key" based authentication is performed and the API key (see api_user_key_file) in your config file will be used. If this 'auth_type' module option is not specified, the value of the OCI_ANSIBLE_AUTH_TYPE, if any, is used. Use auth_type="instance_principal" to use instance principal based authentication when running ansible playbooks within an OCI compute instance.
caching_rules
list / elements=dictionary
A list of caching rules applied to the web application.
This parameter is updatable.
action
string / required
    Choices:
  • CACHE
  • BYPASS_CACHE
The action to take when the criteria of a caching rule are met. - **CACHE:** Caches requested content when the criteria of the rule are met.
- **BYPASS_CACHE:** Allows requests to bypass the cache and be directed to the origin when the criteria of the rule is met.
This parameter is updatable.
caching_duration
string
The duration to cache content for the caching rule, specified in ISO 8601 extended format. Supported units: seconds, minutes, hours, days, weeks, months. The maximum value that can be set for any unit is `99`. Mixing of multiple units is not supported. Only applies when the `action` is set to `CACHE`. Example: `PT1H`
This parameter is updatable.
client_caching_duration
string
The duration to cache content in the user's browser, specified in ISO 8601 extended format. Supported units: seconds, minutes, hours, days, weeks, months. The maximum value that can be set for any unit is `99`. Mixing of multiple units is not supported. Only applies when the `action` is set to `CACHE`. Example: `PT1H`
This parameter is updatable.
criteria
list / elements=dictionary / required
The array of the rule criteria with condition and value. The caching rule would be applied for the requests that matched any of the listed conditions.
condition
string / required
    Choices:
  • URL_IS
  • URL_STARTS_WITH
  • URL_PART_ENDS_WITH
  • URL_PART_CONTAINS
The condition of the caching rule criteria. - **URL_IS:** Matches if the concatenation of request URL path and query is identical to the contents of the `value` field.
- **URL_STARTS_WITH:** Matches if the concatenation of request URL path and query starts with the contents of the `value` field.
- **URL_PART_ENDS_WITH:** Matches if the concatenation of request URL path and query ends with the contents of the `value` field.
- **URL_PART_CONTAINS:** Matches if the concatenation of request URL path and query contains the contents of the `value` field.
URLs must start with a `/`. URLs can't contain restricted double slashes `//`. URLs can't contain the restricted `'` `&` `?` symbols. Resources to cache can only be specified by a URL, any query parameters are ignored.
This parameter is updatable.
value
string / required
The value of the caching rule criteria.
This parameter is updatable.
is_client_caching_enabled
boolean
    Choices:
  • no
  • yes
Enables or disables client caching. Browsers use the `Cache-Control` header value for caching content locally in the browser. This setting overrides the addition of a `Cache- Control` header in responses.
This parameter is updatable.
key
string
The unique key for the caching rule.
This parameter is updatable.
name
string / required
The name of the caching rule.
This parameter is updatable.
captchas
list / elements=dictionary
A list of CAPTCHA challenge settings. These are used to challenge requests with a CAPTCHA to block bots.
This parameter is updatable.
failure_message
string / required
The text to show when incorrect CAPTCHA text is entered. If unspecified, defaults to `The CAPTCHA was incorrect. Try again.`
This parameter is updatable.
footer_text
string
The text to show in the footer when showing a CAPTCHA challenge. If unspecified, defaults to 'Enter the letters and numbers as they are shown in the image above.'
This parameter is updatable.
header_text
string
The text to show in the header when showing a CAPTCHA challenge. If unspecified, defaults to 'We have detected an increased number of attempts to access this website. To help us keep this site secure, please let us know that you are not a robot by entering the text from the image below.'
This parameter is updatable.
session_expiration_in_seconds
integer / required
The amount of time before the CAPTCHA expires, in seconds. If unspecified, defaults to `300`.
This parameter is updatable.
submit_label
string / required
The text to show on the label of the CAPTCHA challenge submit button. If unspecified, defaults to `Yes, I am human`.
This parameter is updatable.
title
string / required
The title used when displaying a CAPTCHA challenge. If unspecified, defaults to `Are you human?`
This parameter is updatable.
url
string / required
The unique URL path at which to show the CAPTCHA challenge.
This parameter is updatable.
cert_bundle
string
The full path to a CA certificate bundle to be used for SSL verification. This will override the default CA certificate bundle. If not set, then the value of the OCI_ANSIBLE_CERT_BUNDLE variable, if any, is used.
config_file_location
string
Path to configuration file. If not set then the value of the OCI_CONFIG_FILE environment variable, if any, is used. Otherwise, defaults to ~/.oci/config.
config_profile_name
string
The profile to load from the config file referenced by config_file_location. If not set, then the value of the OCI_CONFIG_PROFILE environment variable, if any, is used. Otherwise, defaults to the "DEFAULT" profile in config_file_location.
custom_protection_rules
list / elements=dictionary
A list of the custom protection rule OCIDs and their actions.
This parameter is updatable.
action
string
    Choices:
  • DETECT
  • BLOCK
The action to take when the custom protection rule is triggered. `DETECT` - Logs the request when the criteria of the custom protection rule are met. `BLOCK` - Blocks the request when the criteria of the custom protection rule are met.
This parameter is updatable.
exclusions
list / elements=dictionary
exclusions
list / elements=string
This parameter is updatable.
target
string
    Choices:
  • REQUEST_COOKIES
  • REQUEST_COOKIE_NAMES
  • ARGS
  • ARGS_NAMES
The target of the exclusion.
This parameter is updatable.
id
string
The OCID of the custom protection rule.
This parameter is updatable.
device_fingerprint_challenge
dictionary
The device fingerprint challenge settings. Used to detect unique devices based on the device fingerprint information collected in order to block bots.
This parameter is updatable.
action
string
    Choices:
  • DETECT
  • BLOCK
The action to take on requests from detected bots. If unspecified, defaults to `DETECT`.
This parameter is updatable.
action_expiration_in_seconds
integer
The number of seconds between challenges for the same IP address. If unspecified, defaults to `60`.
This parameter is updatable.
challenge_settings
dictionary
block_action
string
    Choices:
  • SET_RESPONSE_CODE
  • SHOW_ERROR_PAGE
  • SHOW_CAPTCHA
The method used to block requests that fail the challenge, if `action` is set to `BLOCK`. If unspecified, defaults to `SHOW_ERROR_PAGE`.
This parameter is updatable.
block_error_page_code
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 request is blocked. If unspecified, defaults to `403`.
This parameter is updatable.
block_error_page_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 request is blocked. If unspecified, defaults to `Access blocked by website owner. Please contact support.`
This parameter is updatable.
block_error_page_message
string
The message to show on the error page when `action` is set to `BLOCK`, `blockAction` is set to `SHOW_ERROR_PAGE`, and the request is blocked. If unspecified, defaults to `Access to the website is blocked`.
This parameter is updatable.
block_response_code
integer
The response status code to return when `action` is set to `BLOCK`, `blockAction` is set to `SET_RESPONSE_CODE` or `SHOW_ERROR_PAGE`, and the request is blocked. 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`.
This parameter is updatable.
captcha_footer
string
The text to show in the footer when showing a CAPTCHA challenge when `action` is set to `BLOCK`, `blockAction` is set to `SHOW_CAPTCHA`, and the request is blocked. If unspecified, default to `Enter the letters and numbers as they are shown in image above`.
This parameter is updatable.
captcha_header
string
The text to show in the header when showing a CAPTCHA challenge when `action` is set to `BLOCK`, `blockAction` is set to `SHOW_CAPTCHA`, and the request is blocked. If unspecified, defaults to `We have detected an increased number of attempts to access this webapp. To help us keep this webapp secure, please let us know that you are not a robot by entering the text from captcha below.`
This parameter is updatable.
captcha_submit_label
string
The text to show on the label of the CAPTCHA challenge submit button when `action` is set to `BLOCK`, `blockAction` is set to `SHOW_CAPTCHA`, and the request is blocked. If unspecified, defaults to `Yes, I am human`.
This parameter is updatable.
captcha_title
string
The title used when showing a CAPTCHA challenge when `action` is set to `BLOCK`, `blockAction` is set to `SHOW_CAPTCHA`, and the request is blocked. If unspecified, defaults to `Are you human?`
This parameter is updatable.
failure_threshold
integer
The number of failed requests allowed before taking action. If unspecified, defaults to `10`.
This parameter is updatable.
failure_threshold_expiration_in_seconds
integer
The number of seconds before the failure threshold resets. If unspecified, defaults to `60`.
This parameter is updatable.
is_enabled
boolean / required
    Choices:
  • no
  • yes
Enables or disables the device fingerprint challenge Web Application Firewall feature.
This parameter is updatable.
max_address_count
integer
The maximum number of IP addresses permitted with the same device fingerprint. If unspecified, defaults to `20`.
This parameter is updatable.
max_address_count_expiration_in_seconds
integer
The number of seconds before the maximum addresses count resets. If unspecified, defaults to `60`.
This parameter is updatable.
good_bots
list / elements=dictionary
A list of bots allowed to access the web application.
This parameter is updatable.
description
string
The description of the bot.
This parameter is updatable.
is_enabled
boolean / required
    Choices:
  • no
  • yes
Enables or disables the bot.
This parameter is updatable.
key
string / required
The unique key for the bot.
This parameter is updatable.
name
string
The bot name.
This parameter is updatable.
human_interaction_challenge
dictionary
The human interaction challenge settings. Used to look for natural human interactions such as mouse movements, time on site, and page scrolling to identify bots.
This parameter is updatable.
action
string
    Choices:
  • DETECT
  • BLOCK
The action to take against requests from detected bots. If unspecified, defaults to `DETECT`.
This parameter is updatable.
action_expiration_in_seconds
integer
The number of seconds between challenges for the same IP address. If unspecified, defaults to `60`.
This parameter is updatable.
challenge_settings
dictionary
block_action
string
    Choices:
  • SET_RESPONSE_CODE
  • SHOW_ERROR_PAGE
  • SHOW_CAPTCHA
The method used to block requests that fail the challenge, if `action` is set to `BLOCK`. If unspecified, defaults to `SHOW_ERROR_PAGE`.
This parameter is updatable.
block_error_page_code
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 request is blocked. If unspecified, defaults to `403`.
This parameter is updatable.
block_error_page_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 request is blocked. If unspecified, defaults to `Access blocked by website owner. Please contact support.`
This parameter is updatable.
block_error_page_message
string
The message to show on the error page when `action` is set to `BLOCK`, `blockAction` is set to `SHOW_ERROR_PAGE`, and the request is blocked. If unspecified, defaults to `Access to the website is blocked`.
This parameter is updatable.
block_response_code
integer
The response status code to return when `action` is set to `BLOCK`, `blockAction` is set to `SET_RESPONSE_CODE` or `SHOW_ERROR_PAGE`, and the request is blocked. 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`.
This parameter is updatable.
captcha_footer
string
The text to show in the footer when showing a CAPTCHA challenge when `action` is set to `BLOCK`, `blockAction` is set to `SHOW_CAPTCHA`, and the request is blocked. If unspecified, default to `Enter the letters and numbers as they are shown in image above`.
This parameter is updatable.
captcha_header
string
The text to show in the header when showing a CAPTCHA challenge when `action` is set to `BLOCK`, `blockAction` is set to `SHOW_CAPTCHA`, and the request is blocked. If unspecified, defaults to `We have detected an increased number of attempts to access this webapp. To help us keep this webapp secure, please let us know that you are not a robot by entering the text from captcha below.`
This parameter is updatable.
captcha_submit_label
string
The text to show on the label of the CAPTCHA challenge submit button when `action` is set to `BLOCK`, `blockAction` is set to `SHOW_CAPTCHA`, and the request is blocked. If unspecified, defaults to `Yes, I am human`.
This parameter is updatable.
captcha_title
string
The title used when showing a CAPTCHA challenge when `action` is set to `BLOCK`, `blockAction` is set to `SHOW_CAPTCHA`, and the request is blocked. If unspecified, defaults to `Are you human?`
This parameter is updatable.
failure_threshold
integer
The number of failed requests before taking action. If unspecified, defaults to `10`.
This parameter is updatable.
failure_threshold_expiration_in_seconds
integer
The number of seconds before the failure threshold resets. If unspecified, defaults to `60`.
This parameter is updatable.
interaction_threshold
integer
The number of interactions required to pass the challenge. If unspecified, defaults to `3`.
This parameter is updatable.
is_enabled
boolean / required
    Choices:
  • no
  • yes
Enables or disables the human interaction challenge Web Application Firewall feature.
This parameter is updatable.
is_nat_enabled
boolean
    Choices:
  • no
  • yes
When enabled, the user is identified not only by the IP address but also by an unique additional hash, which prevents blocking visitors with shared IP addresses.
This parameter is updatable.
recording_period_in_seconds
integer
The number of seconds to record the interactions from the user. If unspecified, defaults to `15`.
This parameter is updatable.
set_http_header
dictionary
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`.
name
string / required
The name of the header.
This parameter is updatable.
value
string / required
The value of the header.
This parameter is updatable.
js_challenge
dictionary
The JavaScript challenge settings. Used to challenge requests with a JavaScript challenge and take the action if a browser has no JavaScript support in order to block bots.
This parameter is updatable.
action
string
    Choices:
  • DETECT
  • BLOCK
The action to take against requests from detected bots. If unspecified, defaults to `DETECT`.
This parameter is updatable.
action_expiration_in_seconds
integer
The number of seconds between challenges from the same IP address. If unspecified, defaults to `60`.
This parameter is updatable.
are_redirects_challenged
boolean
    Choices:
  • no
  • yes
When enabled, redirect responses from the origin will also be challenged. This will change HTTP 301/302 responses from origin to HTTP 200 with an HTML body containing JavaScript page redirection.
This parameter is updatable.
challenge_settings
dictionary
block_action
string
    Choices:
  • SET_RESPONSE_CODE
  • SHOW_ERROR_PAGE
  • SHOW_CAPTCHA
The method used to block requests that fail the challenge, if `action` is set to `BLOCK`. If unspecified, defaults to `SHOW_ERROR_PAGE`.
This parameter is updatable.
block_error_page_code
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 request is blocked. If unspecified, defaults to `403`.
This parameter is updatable.
block_error_page_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 request is blocked. If unspecified, defaults to `Access blocked by website owner. Please contact support.`
This parameter is updatable.
block_error_page_message
string
The message to show on the error page when `action` is set to `BLOCK`, `blockAction` is set to `SHOW_ERROR_PAGE`, and the request is blocked. If unspecified, defaults to `Access to the website is blocked`.
This parameter is updatable.
block_response_code
integer
The response status code to return when `action` is set to `BLOCK`, `blockAction` is set to `SET_RESPONSE_CODE` or `SHOW_ERROR_PAGE`, and the request is blocked. 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`.
This parameter is updatable.
captcha_footer
string
The text to show in the footer when showing a CAPTCHA challenge when `action` is set to `BLOCK`, `blockAction` is set to `SHOW_CAPTCHA`, and the request is blocked. If unspecified, default to `Enter the letters and numbers as they are shown in image above`.
This parameter is updatable.
captcha_header
string
The text to show in the header when showing a CAPTCHA challenge when `action` is set to `BLOCK`, `blockAction` is set to `SHOW_CAPTCHA`, and the request is blocked. If unspecified, defaults to `We have detected an increased number of attempts to access this webapp. To help us keep this webapp secure, please let us know that you are not a robot by entering the text from captcha below.`
This parameter is updatable.
captcha_submit_label
string
The text to show on the label of the CAPTCHA challenge submit button when `action` is set to `BLOCK`, `blockAction` is set to `SHOW_CAPTCHA`, and the request is blocked. If unspecified, defaults to `Yes, I am human`.
This parameter is updatable.
captcha_title
string
The title used when showing a CAPTCHA challenge when `action` is set to `BLOCK`, `blockAction` is set to `SHOW_CAPTCHA`, and the request is blocked. If unspecified, defaults to `Are you human?`
This parameter is updatable.
criteria
list / elements=dictionary
When defined, the JavaScript Challenge would be applied only for the requests that matched all the listed conditions.
condition
string / required
    Choices:
  • URL_IS
  • URL_IS_NOT
  • URL_STARTS_WITH
  • URL_PART_ENDS_WITH
  • URL_PART_CONTAINS
  • URL_REGEX
  • URL_DOES_NOT_MATCH_REGEX
  • URL_DOES_NOT_START_WITH
  • URL_PART_DOES_NOT_CONTAIN
  • URL_PART_DOES_NOT_END_WITH
  • IP_IS
  • IP_IS_NOT
  • IP_IN_LIST
  • IP_NOT_IN_LIST
  • HTTP_HEADER_CONTAINS
  • HTTP_METHOD_IS
  • HTTP_METHOD_IS_NOT
  • COUNTRY_IS
  • COUNTRY_IS_NOT
  • USER_AGENT_IS
  • USER_AGENT_IS_NOT
The criteria the access rule and JavaScript Challenge uses to determine if action should be taken on a request. - **URL_IS:** Matches if the concatenation of request URL path and query is identical to the contents of the `value` field. URL must start with a `/`. - **URL_IS_NOT:** Matches if the concatenation of request URL path and query is not identical to the contents of the `value` field. URL must start with a `/`. - **URL_STARTS_WITH:** Matches if the concatenation of request URL path and query starts with the contents of the `value` field. URL must start with a `/`. - **URL_PART_ENDS_WITH:** Matches if the concatenation of request URL path and query ends with the contents of the `value` field. - **URL_PART_CONTAINS:** Matches if the concatenation of request URL path and query contains the contents of the `value` field. - **URL_REGEX:** Matches if the concatenation of request URL path and query is described by the regular expression in the value field. The value must be a valid regular expression recognized by the PCRE library in Nginx (https://www.pcre.org). - **URL_DOES_NOT_MATCH_REGEX:** Matches if the concatenation of request URL path and query is not described by the regular expression in the `value` field. The value must be a valid regular expression recognized by the PCRE library in Nginx (https://www.pcre.org). - **URL_DOES_NOT_START_WITH:** Matches if the concatenation of request URL path and query does not start with the contents of the `value` field. - **URL_PART_DOES_NOT_CONTAIN:** Matches if the concatenation of request URL path and query does not contain the contents of the `value` field. - **URL_PART_DOES_NOT_END_WITH:** Matches if the concatenation of request URL path and query does not end with the contents of the `value` field. - **IP_IS:** Matches if the request originates from one of the IP addresses contained in the defined address list. The `value` in this case is string with one or multiple IPs or CIDR notations separated by new line symbol \n *Example:* "1.1.1.1\n1.1.1.2\n1.2.2.1/30" - **IP_IS_NOT:** Matches if the request does not originate from any of the IP addresses contained in the defined address list. The `value` in this case is string with one or multiple IPs or CIDR notations separated by new line symbol \n *Example:* "1.1.1.1\n1.1.1.2\n1.2.2.1/30" - **IP_IN_LIST:** Matches if the request originates from one of the IP addresses contained in the referenced address list. The `value` in this case is OCID of the address list. - **IP_NOT_IN_LIST:** Matches if the request does not originate from any IP address contained in the referenced address list. The `value` field in this case is OCID of the address list. - **HTTP_HEADER_CONTAINS:** The HTTP_HEADER_CONTAINS criteria is defined using a compound value separated by a colon: a header field name and a header field value. `host:test.example.com` is an example of a criteria value where `host` is the header field name and `test.example.com` is the header field value. A request matches when the header field name is a case insensitive match and the header field value is a case insensitive, substring match. *Example:* With a criteria value of `host:test.example.com`, where `host` is the name of the field and `test.example.com` is the value of the host field, a request with the header values, `Host: www.test.example.com` will match, where as a request with header values of `host: www.example.com` or `host: test.sub.example.com` will not match. - **HTTP_METHOD_IS:** Matches if the request method is identical to one of the values listed in field. The `value` in this case is string with one or multiple HTTP methods separated by new line symbol \n The list of available methods: `GET`, `HEAD`, `POST`, `PUT`, `DELETE`, `CONNECT`, `OPTIONS`, `TRACE`, `PATCH`
*Example:* "GET\nPOST"
- **HTTP_METHOD_IS_NOT:** Matches if the request is not identical to any of the contents of the `value` field. The `value` in this case is string with one or multiple HTTP methods separated by new line symbol \n The list of available methods: `GET`, `HEAD`, `POST`, `PUT`, `DELETE`, `CONNECT`, `OPTIONS`, `TRACE`, `PATCH`
*Example:* "GET\nPOST"
- **COUNTRY_IS:** Matches if the request originates from one of countries in the `value` field. The `value` in this case is string with one or multiple countries separated by new line symbol \n Country codes are in ISO 3166-1 alpha-2 format. For a list of codes, see ISO's website. *Example:* "AL\nDZ\nAM" - **COUNTRY_IS_NOT:** Matches if the request does not originate from any of countries in the `value` field. The `value` in this case is string with one or multiple countries separated by new line symbol \n Country codes are in ISO 3166-1 alpha-2 format. For a list of codes, see ISO's website. *Example:* "AL\nDZ\nAM" - **USER_AGENT_IS:** Matches if the requesting user agent is identical to the contents of the `value` field. *Example:* `Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0` - **USER_AGENT_IS_NOT:** Matches if the requesting user agent is not identical to the contents of the `value` field. *Example:* `Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0`
This parameter is updatable.
is_case_sensitive
boolean
    Choices:
  • no
  • yes
When enabled, the condition will be matched with case-sensitive rules.
This parameter is updatable.
value
string / required
The criteria value.
This parameter is updatable.
failure_threshold
integer
The number of failed requests before taking action. If unspecified, defaults to `10`.
This parameter is updatable.
is_enabled
boolean / required
    Choices:
  • no
  • yes
Enables or disables the JavaScript challenge Web Application Firewall feature.
This parameter is updatable.
is_nat_enabled
boolean
    Choices:
  • no
  • yes
When enabled, the user is identified not only by the IP address but also by an unique additional hash, which prevents blocking visitors with shared IP addresses.
This parameter is updatable.
set_http_header
dictionary
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`.
name
string / required
The name of the header.
This parameter is updatable.
value
string / required
The value of the header.
This parameter is updatable.
origin
string
The key in the map of origins referencing the origin used for the Web Application Firewall. The origin must already be included in `Origins`. Required when creating the `WafConfig` resource, but not on update.
This parameter is updatable.
origin_groups
list / elements=string
The map of origin groups and their keys used to associate origins to the `wafConfig`. Origin groups allow you to apply weights to groups of origins for load balancing purposes. Origins with higher weights will receive larger proportions of client requests. To add additional origins to your WAAS policy, update the `origins` field of a `UpdateWaasPolicy` request.
This parameter is updatable.
protection_rules
list / elements=dictionary
A list of the protection rules and their details.
This parameter is updatable.
action
string
    Choices:
  • OFF
  • DETECT
  • BLOCK
The action to take when the traffic is detected as malicious. If unspecified, defaults to `OFF`.
This parameter is updatable.
description
string
The description of the protection rule.
This parameter is updatable.
exclusions
list / elements=dictionary
exclusions
list / elements=string
This parameter is updatable.
target
string
    Choices:
  • REQUEST_COOKIES
  • REQUEST_COOKIE_NAMES
  • ARGS
  • ARGS_NAMES
The target of the exclusion.
This parameter is updatable.
key
string
The unique key of the protection rule.
This parameter is updatable.
labels
list / elements=string
The list of labels for the protection rule.
**Note:** Protection rules with a `ResponseBody` label will have no effect unless `isResponseInspected` is true.
This parameter is updatable.
mod_security_rule_ids
list / elements=string
The list of the ModSecurity rule IDs that apply to this protection rule. For more information about ModSecurity's open source WAF rules, see Mod Security's documentation.
This parameter is updatable.
name
string
The name of the protection rule.
This parameter is updatable.
protection_settings
dictionary
The settings to apply to protection rules.
This parameter is updatable.
allowed_http_methods
list / elements=string
    Choices:
  • OPTIONS
  • GET
  • HEAD
  • POST
  • PUT
  • DELETE
  • TRACE
  • CONNECT
  • PATCH
  • PROPFIND
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).
This parameter is updatable.
block_action
string
    Choices:
  • SHOW_ERROR_PAGE
  • SET_RESPONSE_CODE
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`.
This parameter is updatable.
block_error_page_code
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`.
This parameter is updatable.
block_error_page_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.`
This parameter is updatable.
block_error_page_message
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.'
This parameter is updatable.
block_response_code
integer
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`.
This parameter is updatable.
is_response_inspected
boolean
    Choices:
  • no
  • yes
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.
This parameter is updatable.
max_argument_count
integer
The maximum number of arguments allowed to be passed to your application before an action is taken. Arguements are query parameters or body parameters in a PUT or POST request. If unspecified, defaults to `255`. This setting only applies if a corresponding protection rule is enabled, such as the "Number of Arguments Limits" rule (key: 960335).
Example: If `maxArgumentCount` to `2` for the Max Number of Arguments protection rule (key: 960335), the following requests would be blocked: `GET /myapp/path?query=one&query=two&query=three` `POST /myapp/path` with Body `{"argument1":"one","argument2":"two","argument3":"three"}`
This parameter is updatable.
max_name_length_per_argument
integer
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).
This parameter is updatable.
max_response_size_in_ki_b
integer
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`.
This parameter is updatable.
max_total_name_length_of_arguments
integer
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).
This parameter is updatable.
media_types
list / elements=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
This parameter is updatable.
recommendations_period_in_days
integer
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.
This parameter is updatable.
region
string
The Oracle Cloud Infrastructure region to use for all OCI API requests. If not set, then the value of the OCI_REGION variable, if any, is used. This option is required if the region is not specified through a configuration file (See config_file_location). Please refer to https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm for more information on OCI regions.
state
string
    Choices:
  • present ←
The state of the WafConfig.
Use state=present to update an existing a WafConfig.
tenancy
string
OCID of your tenancy. If not set, then the value of the OCI_TENANCY variable, if any, is used. This option is required if the tenancy OCID is not specified through a configuration file (See config_file_location). To get the tenancy OCID, please refer https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm
threat_feeds
list / elements=dictionary
A list of threat intelligence feeds and the actions to apply to known malicious traffic based on internet intelligence.
This parameter is updatable.
action
string
    Choices:
  • OFF
  • DETECT
  • BLOCK
The action to take when traffic is flagged as malicious by data from the threat intelligence feed. If unspecified, defaults to `OFF`.
This parameter is updatable.
description
string
The description of the threat intelligence feed.
This parameter is updatable.
key
string
The unique key of the threat intelligence feed.
This parameter is updatable.
name
string
The name of the threat intelligence feed.
This parameter is updatable.
waas_policy_id
string / required
The OCID of the WAAS policy.

aliases: id
wait
boolean
    Choices:
  • no
  • yes ←
Whether to wait for create or delete operation to complete.
wait_timeout
integer
Time, in seconds, to wait when wait=yes. Defaults to 1200 for most of the services but some services might have a longer wait timeout.
whitelists
list / elements=dictionary
A list of IP addresses that bypass the Web Application Firewall.
This parameter is updatable.
address_lists
list / elements=string
A list of OCID of IP address lists to include in the whitelist.
This parameter is updatable.
addresses
list / elements=string
A set of IP addresses or CIDR notations to include in the whitelist.
This parameter is updatable.
name
string / required
The unique name of the whitelist.
This parameter is updatable.

Examples

- name: Update waf_config
  oci_waas_waf_config:
    # required
    waas_policy_id: "ocid1.waaspolicy.oc1..xxxxxxEXAMPLExxxxxx"

    # optional
    access_rules:
    - # required
      name: name_example
      criteria:
      - # required
        condition: URL_IS
        value: value_example

        # optional
        is_case_sensitive: true
      action: ALLOW

      # optional
      block_action: SET_RESPONSE_CODE
      block_response_code: 56
      block_error_page_message: block_error_page_message_example
      block_error_page_code: block_error_page_code_example
      block_error_page_description: block_error_page_description_example
      bypass_challenges: [ "JS_CHALLENGE" ]
      redirect_url: redirect_url_example
      redirect_response_code: MOVED_PERMANENTLY
      captcha_title: captcha_title_example
      captcha_header: captcha_header_example
      captcha_footer: captcha_footer_example
      captcha_submit_label: captcha_submit_label_example
      response_header_manipulation:
      - # required
        value: value_example
        action: EXTEND_HTTP_RESPONSE_HEADER
        header: header_example
    address_rate_limiting:
      # required
      is_enabled: true

      # optional
      allowed_rate_per_address: 56
      max_delayed_count_per_address: 56
      block_response_code: 56
    captchas:
    - # required
      url: url_example
      session_expiration_in_seconds: 56
      title: title_example
      failure_message: failure_message_example
      submit_label: submit_label_example

      # optional
      header_text: header_text_example
      footer_text: footer_text_example
    device_fingerprint_challenge:
      # required
      is_enabled: true

      # optional
      action: DETECT
      failure_threshold: 56
      action_expiration_in_seconds: 56
      failure_threshold_expiration_in_seconds: 56
      max_address_count: 56
      max_address_count_expiration_in_seconds: 56
      challenge_settings:
        # optional
        block_action: SET_RESPONSE_CODE
        block_response_code: 56
        block_error_page_message: block_error_page_message_example
        block_error_page_description: block_error_page_description_example
        block_error_page_code: block_error_page_code_example
        captcha_title: captcha_title_example
        captcha_header: captcha_header_example
        captcha_footer: captcha_footer_example
        captcha_submit_label: captcha_submit_label_example
    good_bots:
    - # required
      key: key_example
      is_enabled: true

      # optional
      name: name_example
      description: description_example
    human_interaction_challenge:
      # required
      is_enabled: true

      # optional
      action: DETECT
      failure_threshold: 56
      action_expiration_in_seconds: 56
      failure_threshold_expiration_in_seconds: 56
      interaction_threshold: 56
      recording_period_in_seconds: 56
      set_http_header:
        # required
        name: name_example
        value: value_example
      challenge_settings:
        # optional
        block_action: SET_RESPONSE_CODE
        block_response_code: 56
        block_error_page_message: block_error_page_message_example
        block_error_page_description: block_error_page_description_example
        block_error_page_code: block_error_page_code_example
        captcha_title: captcha_title_example
        captcha_header: captcha_header_example
        captcha_footer: captcha_footer_example
        captcha_submit_label: captcha_submit_label_example
      is_nat_enabled: true
    js_challenge:
      # required
      is_enabled: true

      # optional
      action: DETECT
      failure_threshold: 56
      action_expiration_in_seconds: 56
      set_http_header:
        # required
        name: name_example
        value: value_example
      challenge_settings:
        # optional
        block_action: SET_RESPONSE_CODE
        block_response_code: 56
        block_error_page_message: block_error_page_message_example
        block_error_page_description: block_error_page_description_example
        block_error_page_code: block_error_page_code_example
        captcha_title: captcha_title_example
        captcha_header: captcha_header_example
        captcha_footer: captcha_footer_example
        captcha_submit_label: captcha_submit_label_example
      are_redirects_challenged: true
      criteria:
      - # required
        condition: URL_IS
        value: value_example

        # optional
        is_case_sensitive: true
      is_nat_enabled: true
    origin: origin_example
    caching_rules:
    - # required
      name: name_example
      action: CACHE
      criteria:
      - # required
        condition: URL_IS
        value: value_example

      # optional
      key: key_example
      caching_duration: caching_duration_example
      is_client_caching_enabled: true
      client_caching_duration: client_caching_duration_example
    custom_protection_rules:
    - # optional
      id: "ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx"
      action: DETECT
      exclusions:
      - # optional
        target: REQUEST_COOKIES
        exclusions: [ "exclusions_example" ]
    origin_groups: [ "origin_groups_example" ]
    protection_rules:
    - # optional
      key: key_example
      mod_security_rule_ids: [ "mod_security_rule_ids_example" ]
      name: name_example
      description: description_example
      action: OFF
      labels: [ "labels_example" ]
      exclusions:
      - # optional
        target: REQUEST_COOKIES
        exclusions: [ "exclusions_example" ]
    protection_settings:
      # optional
      block_action: SHOW_ERROR_PAGE
      block_response_code: 56
      block_error_page_message: block_error_page_message_example
      block_error_page_code: block_error_page_code_example
      block_error_page_description: block_error_page_description_example
      max_argument_count: 56
      max_name_length_per_argument: 56
      max_total_name_length_of_arguments: 56
      recommendations_period_in_days: 56
      is_response_inspected: true
      max_response_size_in_ki_b: 56
      allowed_http_methods: [ "OPTIONS" ]
      media_types: [ "media_types_example" ]
    threat_feeds:
    - # optional
      key: key_example
      name: name_example
      action: OFF
      description: description_example
    whitelists:
    - # required
      name: name_example

      # optional
      addresses: [ "addresses_example" ]
      address_lists: [ "address_lists_example" ]

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
waf_config
complex
on success
Details of the WafConfig resource acted upon by the current operation

Sample:
{'access_rules': [{'action': 'ALLOW', 'block_action': 'SET_RESPONSE_CODE', 'block_error_page_code': 'block_error_page_code_example', 'block_error_page_description': 'block_error_page_description_example', 'block_error_page_message': 'block_error_page_message_example', 'block_response_code': 56, 'bypass_challenges': [], 'captcha_footer': 'captcha_footer_example', 'captcha_header': 'captcha_header_example', 'captcha_submit_label': 'captcha_submit_label_example', 'captcha_title': 'captcha_title_example', 'criteria': [{'condition': 'URL_IS', 'is_case_sensitive': True, 'value': 'value_example'}], 'name': 'name_example', 'redirect_response_code': 'MOVED_PERMANENTLY', 'redirect_url': 'redirect_url_example', 'response_header_manipulation': [{'action': 'EXTEND_HTTP_RESPONSE_HEADER', 'header': 'header_example', 'value': 'value_example'}]}], 'address_rate_limiting': {'allowed_rate_per_address': 56, 'block_response_code': 56, 'is_enabled': True, 'max_delayed_count_per_address': 56}, 'caching_rules': [{'action': 'CACHE', 'caching_duration': 'caching_duration_example', 'client_caching_duration': 'client_caching_duration_example', 'criteria': [{'condition': 'URL_IS', 'value': 'value_example'}], 'is_client_caching_enabled': True, 'key': 'key_example', 'name': 'name_example'}], 'captchas': [{'failure_message': 'failure_message_example', 'footer_text': 'footer_text_example', 'header_text': 'header_text_example', 'session_expiration_in_seconds': 56, 'submit_label': 'submit_label_example', 'title': 'title_example', 'url': 'url_example'}], 'custom_protection_rules': [{'action': 'DETECT', 'exclusions': [{'exclusions': [], 'target': 'REQUEST_COOKIES'}], 'id': 'ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx'}], 'device_fingerprint_challenge': {'action': 'DETECT', 'action_expiration_in_seconds': 56, 'challenge_settings': {'block_action': 'SET_RESPONSE_CODE', 'block_error_page_code': 'block_error_page_code_example', 'block_error_page_description': 'block_error_page_description_example', 'block_error_page_message': 'block_error_page_message_example', 'block_response_code': 56, 'captcha_footer': 'captcha_footer_example', 'captcha_header': 'captcha_header_example', 'captcha_submit_label': 'captcha_submit_label_example', 'captcha_title': 'captcha_title_example'}, 'failure_threshold': 56, 'failure_threshold_expiration_in_seconds': 56, 'is_enabled': True, 'max_address_count': 56, 'max_address_count_expiration_in_seconds': 56}, 'good_bots': [{'description': 'description_example', 'is_enabled': True, 'key': 'key_example', 'name': 'name_example'}], 'human_interaction_challenge': {'action': 'DETECT', 'action_expiration_in_seconds': 56, 'challenge_settings': {'block_action': 'SET_RESPONSE_CODE', 'block_error_page_code': 'block_error_page_code_example', 'block_error_page_description': 'block_error_page_description_example', 'block_error_page_message': 'block_error_page_message_example', 'block_response_code': 56, 'captcha_footer': 'captcha_footer_example', 'captcha_header': 'captcha_header_example', 'captcha_submit_label': 'captcha_submit_label_example', 'captcha_title': 'captcha_title_example'}, 'failure_threshold': 56, 'failure_threshold_expiration_in_seconds': 56, 'interaction_threshold': 56, 'is_enabled': True, 'is_nat_enabled': True, 'recording_period_in_seconds': 56, 'set_http_header': {'name': 'name_example', 'value': 'value_example'}}, 'js_challenge': {'action': 'DETECT', 'action_expiration_in_seconds': 56, 'are_redirects_challenged': True, 'challenge_settings': {'block_action': 'SET_RESPONSE_CODE', 'block_error_page_code': 'block_error_page_code_example', 'block_error_page_description': 'block_error_page_description_example', 'block_error_page_message': 'block_error_page_message_example', 'block_response_code': 56, 'captcha_footer': 'captcha_footer_example', 'captcha_header': 'captcha_header_example', 'captcha_submit_label': 'captcha_submit_label_example', 'captcha_title': 'captcha_title_example'}, 'criteria': [{'condition': 'URL_IS', 'is_case_sensitive': True, 'value': 'value_example'}], 'failure_threshold': 56, 'is_enabled': True, 'is_nat_enabled': True, 'set_http_header': {'name': 'name_example', 'value': 'value_example'}}, 'origin': 'origin_example', 'origin_groups': [], 'protection_rules': [{'action': 'OFF', 'description': 'description_example', 'exclusions': [{'exclusions': [], 'target': 'REQUEST_COOKIES'}], 'key': 'key_example', 'labels': [], 'mod_security_rule_ids': [], 'name': 'name_example'}], 'protection_settings': {'allowed_http_methods': [], 'block_action': 'SHOW_ERROR_PAGE', 'block_error_page_code': 'block_error_page_code_example', 'block_error_page_description': 'block_error_page_description_example', 'block_error_page_message': 'block_error_page_message_example', 'block_response_code': 56, 'is_response_inspected': True, 'max_argument_count': 56, 'max_name_length_per_argument': 56, 'max_response_size_in_ki_b': 56, 'max_total_name_length_of_arguments': 56, 'media_types': [], 'recommendations_period_in_days': 56}, 'threat_feeds': [{'action': 'OFF', 'description': 'description_example', 'key': 'key_example', 'name': 'name_example'}], 'whitelists': [{'address_lists': [], 'addresses': [], 'name': 'name_example'}]}
 
access_rules
complex
on success
The access rules applied to the Web Application Firewall. Used for defining custom access policies with the combination of `ALLOW`, `DETECT`, and `BLOCK` rules, based on different criteria.

   
action
string
on success
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.

Sample:
ALLOW
   
block_action
string
on success
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`.

Sample:
SET_RESPONSE_CODE
   
block_error_page_code
string
on success
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'.

Sample:
block_error_page_code_example
   
block_error_page_description
string
on success
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.'

Sample:
block_error_page_description_example
   
block_error_page_message
string
on success
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.'

Sample:
block_error_page_message_example
   
block_response_code
integer
on success
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`.

Sample:
56
   
bypass_challenges
list / elements=string
on success
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.

    captcha_footer
string
on success
The text to show in the footer when showing a CAPTCHA challenge when `action` is set to `SHOW_CAPTCHA` and the request is challenged.

Sample:
captcha_footer_example
   
captcha_header
string
on success
The text to show in the header when showing a CAPTCHA challenge when `action` is set to `SHOW_CAPTCHA` and the request is challenged.

Sample:
captcha_header_example
   
captcha_submit_label
string
on success
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.

Sample:
captcha_submit_label_example
   
captcha_title
string
on success
The title used when showing a CAPTCHA challenge when `action` is set to `SHOW_CAPTCHA` and the request is challenged.

Sample:
captcha_title_example
   
criteria
complex
on success
The list of access rule criteria. The rule would be applied only for the requests that matched all the listed conditions.

     
condition
string
on success
The criteria the access rule and JavaScript Challenge uses to determine if action should be taken on a request. - **URL_IS:** Matches if the concatenation of request URL path and query is identical to the contents of the `value` field. URL must start with a `/`. - **URL_IS_NOT:** Matches if the concatenation of request URL path and query is not identical to the contents of the `value` field. URL must start with a `/`. - **URL_STARTS_WITH:** Matches if the concatenation of request URL path and query starts with the contents of the `value` field. URL must start with a `/`. - **URL_PART_ENDS_WITH:** Matches if the concatenation of request URL path and query ends with the contents of the `value` field. - **URL_PART_CONTAINS:** Matches if the concatenation of request URL path and query contains the contents of the `value` field. - **URL_REGEX:** Matches if the concatenation of request URL path and query is described by the regular expression in the value field. The value must be a valid regular expression recognized by the PCRE library in Nginx (https://www.pcre.org). - **URL_DOES_NOT_MATCH_REGEX:** Matches if the concatenation of request URL path and query is not described by the regular expression in the `value` field. The value must be a valid regular expression recognized by the PCRE library in Nginx (https://www.pcre.org). - **URL_DOES_NOT_START_WITH:** Matches if the concatenation of request URL path and query does not start with the contents of the `value` field. - **URL_PART_DOES_NOT_CONTAIN:** Matches if the concatenation of request URL path and query does not contain the contents of the `value` field. - **URL_PART_DOES_NOT_END_WITH:** Matches if the concatenation of request URL path and query does not end with the contents of the `value` field. - **IP_IS:** Matches if the request originates from one of the IP addresses contained in the defined address list. The `value` in this case is string with one or multiple IPs or CIDR notations separated by new line symbol \n *Example:* "1.1.1.1\n1.1.1.2\n1.2.2.1/30" - **IP_IS_NOT:** Matches if the request does not originate from any of the IP addresses contained in the defined address list. The `value` in this case is string with one or multiple IPs or CIDR notations separated by new line symbol \n *Example:* "1.1.1.1\n1.1.1.2\n1.2.2.1/30" - **IP_IN_LIST:** Matches if the request originates from one of the IP addresses contained in the referenced address list. The `value` in this case is OCID of the address list. - **IP_NOT_IN_LIST:** Matches if the request does not originate from any IP address contained in the referenced address list. The `value` field in this case is OCID of the address list. - **HTTP_HEADER_CONTAINS:** The HTTP_HEADER_CONTAINS criteria is defined using a compound value separated by a colon: a header field name and a header field value. `host:test.example.com` is an example of a criteria value where `host` is the header field name and `test.example.com` is the header field value. A request matches when the header field name is a case insensitive match and the header field value is a case insensitive, substring match. *Example:* With a criteria value of `host:test.example.com`, where `host` is the name of the field and `test.example.com` is the value of the host field, a request with the header values, `Host: www.test.example.com` will match, where as a request with header values of `host: www.example.com` or `host: test.sub.example.com` will not match. - **HTTP_METHOD_IS:** Matches if the request method is identical to one of the values listed in field. The `value` in this case is string with one or multiple HTTP methods separated by new line symbol \n The list of available methods: `GET`, `HEAD`, `POST`, `PUT`, `DELETE`, `CONNECT`, `OPTIONS`, `TRACE`, `PATCH`
*Example:* "GET\nPOST"
- **HTTP_METHOD_IS_NOT:** Matches if the request is not identical to any of the contents of the `value` field. The `value` in this case is string with one or multiple HTTP methods separated by new line symbol \n The list of available methods: `GET`, `HEAD`, `POST`, `PUT`, `DELETE`, `CONNECT`, `OPTIONS`, `TRACE`, `PATCH`
*Example:* "GET\nPOST"
- **COUNTRY_IS:** Matches if the request originates from one of countries in the `value` field. The `value` in this case is string with one or multiple countries separated by new line symbol \n Country codes are in ISO 3166-1 alpha-2 format. For a list of codes, see ISO's website. *Example:* "AL\nDZ\nAM" - **COUNTRY_IS_NOT:** Matches if the request does not originate from any of countries in the `value` field. The `value` in this case is string with one or multiple countries separated by new line symbol \n Country codes are in ISO 3166-1 alpha-2 format. For a list of codes, see ISO's website. *Example:* "AL\nDZ\nAM" - **USER_AGENT_IS:** Matches if the requesting user agent is identical to the contents of the `value` field. *Example:* `Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0` - **USER_AGENT_IS_NOT:** Matches if the requesting user agent is not identical to the contents of the `value` field. *Example:* `Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0`

Sample:
URL_IS
     
is_case_sensitive
boolean
on success
When enabled, the condition will be matched with case-sensitive rules.

Sample:
True
     
value
string
on success
The criteria value.

Sample:
value_example
   
name
string
on success
The unique name of the access rule.

Sample:
name_example
   
redirect_response_code
string
on success
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).

Sample:
MOVED_PERMANENTLY
   
redirect_url
string
on success
The target to which the request should be redirected, represented as a URI reference. Required when `action` is `REDIRECT`.

Sample:
redirect_url_example
   
response_header_manipulation
complex
on success
An object that represents an action to apply to an HTTP response headers if all rule criteria will be matched regardless of `action` value.

     
action
string
on success

Sample:
EXTEND_HTTP_RESPONSE_HEADER
     
header
string
on success
A header field name that conforms to RFC 7230.
Example: `example_header_name`

Sample:
header_example
     
value
string
on success
A header field value that conforms to RFC 7230.
Example: `example_value`

Sample:
value_example
 
address_rate_limiting
complex
on success
The IP address rate limiting settings used to limit the number of requests from an address.

   
allowed_rate_per_address
integer
on success
The number of allowed requests per second from one IP address. If unspecified, defaults to `1`.

Sample:
56
   
block_response_code
integer
on success
The response status code returned when a request is blocked. If unspecified, defaults to `503`. The list of available response codes: `400`, `401`, `403`, `404`, `405`, `408`, `409`, `411`, `412`, `413`, `414`, `415`, `416`, `422`, `494`, `495`, `496`, `497`, `499`, `500`, `501`, `502`, `503`, `504`, `507`.

Sample:
56
   
is_enabled
boolean
on success
Enables or disables the address rate limiting Web Application Firewall feature.

Sample:
True
   
max_delayed_count_per_address
integer
on success
The maximum number of requests allowed to be queued before subsequent requests are dropped. If unspecified, defaults to `10`.

Sample:
56
 
caching_rules
complex
on success
A list of caching rules applied to the web application.

   
action
string
on success
The action to take when the criteria of a caching rule are met. - **CACHE:** Caches requested content when the criteria of the rule are met.
- **BYPASS_CACHE:** Allows requests to bypass the cache and be directed to the origin when the criteria of the rule is met.

Sample:
CACHE
   
caching_duration
string
on success
The duration to cache content for the caching rule, specified in ISO 8601 extended format. Supported units: seconds, minutes, hours, days, weeks, months. The maximum value that can be set for any unit is `99`. Mixing of multiple units is not supported. Only applies when the `action` is set to `CACHE`. Example: `PT1H`

Sample:
caching_duration_example
   
client_caching_duration
string
on success
The duration to cache content in the user's browser, specified in ISO 8601 extended format. Supported units: seconds, minutes, hours, days, weeks, months. The maximum value that can be set for any unit is `99`. Mixing of multiple units is not supported. Only applies when the `action` is set to `CACHE`. Example: `PT1H`

Sample:
client_caching_duration_example
   
criteria
complex
on success
The array of the rule criteria with condition and value. The caching rule would be applied for the requests that matched any of the listed conditions.

     
condition
string
on success
The condition of the caching rule criteria. - **URL_IS:** Matches if the concatenation of request URL path and query is identical to the contents of the `value` field.
- **URL_STARTS_WITH:** Matches if the concatenation of request URL path and query starts with the contents of the `value` field.
- **URL_PART_ENDS_WITH:** Matches if the concatenation of request URL path and query ends with the contents of the `value` field.
- **URL_PART_CONTAINS:** Matches if the concatenation of request URL path and query contains the contents of the `value` field.
URLs must start with a `/`. URLs can't contain restricted double slashes `//`. URLs can't contain the restricted `'` `&` `?` symbols. Resources to cache can only be specified by a URL, any query parameters are ignored.

Sample:
URL_IS
     
value
string
on success
The value of the caching rule criteria.

Sample:
value_example
   
is_client_caching_enabled
boolean
on success
Enables or disables client caching. Browsers use the `Cache-Control` header value for caching content locally in the browser. This setting overrides the addition of a `Cache-Control` header in responses.

Sample:
True
   
key
string
on success
The unique key for the caching rule.

Sample:
key_example
   
name
string
on success
The name of the caching rule.

Sample:
name_example
 
captchas
complex
on success
A list of CAPTCHA challenge settings. These are used to challenge requests with a CAPTCHA to block bots.

   
failure_message
string
on success
The text to show when incorrect CAPTCHA text is entered. If unspecified, defaults to `The CAPTCHA was incorrect. Try again.`

Sample:
failure_message_example
   
footer_text
string
on success
The text to show in the footer when showing a CAPTCHA challenge. If unspecified, defaults to 'Enter the letters and numbers as they are shown in the image above.'

Sample:
footer_text_example
   
header_text
string
on success
The text to show in the header when showing a CAPTCHA challenge. If unspecified, defaults to 'We have detected an increased number of attempts to access this website. To help us keep this site secure, please let us know that you are not a robot by entering the text from the image below.'

Sample:
header_text_example
   
session_expiration_in_seconds
integer
on success
The amount of time before the CAPTCHA expires, in seconds. If unspecified, defaults to `300`.

Sample:
56
   
submit_label
string
on success
The text to show on the label of the CAPTCHA challenge submit button. If unspecified, defaults to `Yes, I am human`.

Sample:
submit_label_example
   
title
string
on success
The title used when displaying a CAPTCHA challenge. If unspecified, defaults to `Are you human?`

Sample:
title_example
   
url
string
on success
The unique URL path at which to show the CAPTCHA challenge.

Sample:
url_example
 
custom_protection_rules
complex
on success
A list of the custom protection rule OCIDs and their actions.

   
action
string
on success
The action to take when the custom protection rule is triggered. `DETECT` - Logs the request when the criteria of the custom protection rule are met. `BLOCK` - Blocks the request when the criteria of the custom protection rule are met.

Sample:
DETECT
   
exclusions
complex
on success

     
exclusions
list / elements=string
on success

     
target
string
on success
The target of the exclusion.

Sample:
REQUEST_COOKIES
   
id
string
on success
The OCID of the custom protection rule.

Sample:
ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx
 
device_fingerprint_challenge
complex
on success
The device fingerprint challenge settings. Used to detect unique devices based on the device fingerprint information collected in order to block bots.

   
action
string
on success
The action to take on requests from detected bots. If unspecified, defaults to `DETECT`.

Sample:
DETECT
   
action_expiration_in_seconds
integer
on success
The number of seconds between challenges for the same IP address. If unspecified, defaults to `60`.

Sample:
56
   
challenge_settings
complex
on success

     
block_action
string
on success
The method used to block requests that fail the challenge, if `action` is set to `BLOCK`. If unspecified, defaults to `SHOW_ERROR_PAGE`.

Sample:
SET_RESPONSE_CODE
     
block_error_page_code
string
on success
The error code to show on the error page when `action` is set to `BLOCK`, `blockAction` is set to `SHOW_ERROR_PAGE` and the request is blocked. If unspecified, defaults to `403`.

Sample:
block_error_page_code_example
     
block_error_page_description
string
on success
The description text to show on the error page when `action` is set to `BLOCK`, `blockAction` is set to `SHOW_ERROR_PAGE`, and the request is blocked. If unspecified, defaults to `Access blocked by website owner. Please contact support.`

Sample:
block_error_page_description_example
     
block_error_page_message
string
on success
The message to show on the error page when `action` is set to `BLOCK`, `blockAction` is set to `SHOW_ERROR_PAGE`, and the request is blocked. If unspecified, defaults to `Access to the website is blocked`.

Sample:
block_error_page_message_example
     
block_response_code
integer
on success
The response status code to return when `action` is set to `BLOCK`, `blockAction` is set to `SET_RESPONSE_CODE` or `SHOW_ERROR_PAGE`, and the request is blocked. 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`.

Sample:
56
      captcha_footer
string
on success
The text to show in the footer when showing a CAPTCHA challenge when `action` is set to `BLOCK`, `blockAction` is set to `SHOW_CAPTCHA`, and the request is blocked. If unspecified, default to `Enter the letters and numbers as they are shown in image above`.

Sample:
captcha_footer_example
     
captcha_header
string
on success
The text to show in the header when showing a CAPTCHA challenge when `action` is set to `BLOCK`, `blockAction` is set to `SHOW_CAPTCHA`, and the request is blocked. If unspecified, defaults to `We have detected an increased number of attempts to access this webapp. To help us keep this webapp secure, please let us know that you are not a robot by entering the text from captcha below.`

Sample:
captcha_header_example
     
captcha_submit_label
string
on success
The text to show on the label of the CAPTCHA challenge submit button when `action` is set to `BLOCK`, `blockAction` is set to `SHOW_CAPTCHA`, and the request is blocked. If unspecified, defaults to `Yes, I am human`.

Sample:
captcha_submit_label_example
     
captcha_title
string
on success
The title used when showing a CAPTCHA challenge when `action` is set to `BLOCK`, `blockAction` is set to `SHOW_CAPTCHA`, and the request is blocked. If unspecified, defaults to `Are you human?`

Sample:
captcha_title_example
   
failure_threshold
integer
on success
The number of failed requests allowed before taking action. If unspecified, defaults to `10`.

Sample:
56
   
failure_threshold_expiration_in_seconds
integer
on success
The number of seconds before the failure threshold resets. If unspecified, defaults to `60`.

Sample:
56
   
is_enabled
boolean
on success
Enables or disables the device fingerprint challenge Web Application Firewall feature.

Sample:
True
   
max_address_count
integer
on success
The maximum number of IP addresses permitted with the same device fingerprint. If unspecified, defaults to `20`.

Sample:
56
   
max_address_count_expiration_in_seconds
integer
on success
The number of seconds before the maximum addresses count resets. If unspecified, defaults to `60`.

Sample:
56
 
good_bots
complex
on success
A list of bots allowed to access the web application.

   
description
string
on success
The description of the bot.

Sample:
description_example
   
is_enabled
boolean
on success
Enables or disables the bot.

Sample:
True
   
key
string
on success
The unique key for the bot.

Sample:
key_example
   
name
string
on success
The bot name.

Sample:
name_example
 
human_interaction_challenge
complex
on success
The human interaction challenge settings. Used to look for natural human interactions such as mouse movements, time on site, and page scrolling to identify bots.

   
action
string
on success
The action to take against requests from detected bots. If unspecified, defaults to `DETECT`.

Sample:
DETECT
   
action_expiration_in_seconds
integer
on success
The number of seconds between challenges for the same IP address. If unspecified, defaults to `60`.

Sample:
56
   
challenge_settings
complex
on success

     
block_action
string
on success
The method used to block requests that fail the challenge, if `action` is set to `BLOCK`. If unspecified, defaults to `SHOW_ERROR_PAGE`.

Sample:
SET_RESPONSE_CODE
     
block_error_page_code
string
on success
The error code to show on the error page when `action` is set to `BLOCK`, `blockAction` is set to `SHOW_ERROR_PAGE` and the request is blocked. If unspecified, defaults to `403`.

Sample:
block_error_page_code_example
     
block_error_page_description
string
on success
The description text to show on the error page when `action` is set to `BLOCK`, `blockAction` is set to `SHOW_ERROR_PAGE`, and the request is blocked. If unspecified, defaults to `Access blocked by website owner. Please contact support.`

Sample:
block_error_page_description_example
     
block_error_page_message
string
on success
The message to show on the error page when `action` is set to `BLOCK`, `blockAction` is set to `SHOW_ERROR_PAGE`, and the request is blocked. If unspecified, defaults to `Access to the website is blocked`.

Sample:
block_error_page_message_example
     
block_response_code
integer
on success
The response status code to return when `action` is set to `BLOCK`, `blockAction` is set to `SET_RESPONSE_CODE` or `SHOW_ERROR_PAGE`, and the request is blocked. 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`.

Sample:
56
      captcha_footer
string
on success
The text to show in the footer when showing a CAPTCHA challenge when `action` is set to `BLOCK`, `blockAction` is set to `SHOW_CAPTCHA`, and the request is blocked. If unspecified, default to `Enter the letters and numbers as they are shown in image above`.

Sample:
captcha_footer_example
     
captcha_header
string
on success
The text to show in the header when showing a CAPTCHA challenge when `action` is set to `BLOCK`, `blockAction` is set to `SHOW_CAPTCHA`, and the request is blocked. If unspecified, defaults to `We have detected an increased number of attempts to access this webapp. To help us keep this webapp secure, please let us know that you are not a robot by entering the text from captcha below.`

Sample:
captcha_header_example
     
captcha_submit_label
string
on success
The text to show on the label of the CAPTCHA challenge submit button when `action` is set to `BLOCK`, `blockAction` is set to `SHOW_CAPTCHA`, and the request is blocked. If unspecified, defaults to `Yes, I am human`.

Sample:
captcha_submit_label_example
     
captcha_title
string
on success
The title used when showing a CAPTCHA challenge when `action` is set to `BLOCK`, `blockAction` is set to `SHOW_CAPTCHA`, and the request is blocked. If unspecified, defaults to `Are you human?`

Sample:
captcha_title_example
   
failure_threshold
integer
on success
The number of failed requests before taking action. If unspecified, defaults to `10`.

Sample:
56
   
failure_threshold_expiration_in_seconds
integer
on success
The number of seconds before the failure threshold resets. If unspecified, defaults to `60`.

Sample:
56
   
interaction_threshold
integer
on success
The number of interactions required to pass the challenge. If unspecified, defaults to `3`.

Sample:
56
   
is_enabled
boolean
on success
Enables or disables the human interaction challenge Web Application Firewall feature.

Sample:
True
   
is_nat_enabled
boolean
on success
When enabled, the user is identified not only by the IP address but also by an unique additional hash, which prevents blocking visitors with shared IP addresses.

Sample:
True
   
recording_period_in_seconds
integer
on success
The number of seconds to record the interactions from the user. If unspecified, defaults to `15`.

Sample:
56
   
set_http_header
complex
on success
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`.

     
name
string
on success
The name of the header.

Sample:
name_example
     
value
string
on success
The value of the header.

Sample:
value_example
 
js_challenge
complex
on success
The JavaScript challenge settings. Used to challenge requests with a JavaScript challenge and take the action if a browser has no JavaScript support in order to block bots.

   
action
string
on success
The action to take against requests from detected bots. If unspecified, defaults to `DETECT`.

Sample:
DETECT
   
action_expiration_in_seconds
integer
on success
The number of seconds between challenges from the same IP address. If unspecified, defaults to `60`.

Sample:
56
   
are_redirects_challenged
boolean
on success
When enabled, redirect responses from the origin will also be challenged. This will change HTTP 301/302 responses from origin to HTTP 200 with an HTML body containing JavaScript page redirection.

Sample:
True
   
challenge_settings
complex
on success

     
block_action
string
on success
The method used to block requests that fail the challenge, if `action` is set to `BLOCK`. If unspecified, defaults to `SHOW_ERROR_PAGE`.

Sample:
SET_RESPONSE_CODE
     
block_error_page_code
string
on success
The error code to show on the error page when `action` is set to `BLOCK`, `blockAction` is set to `SHOW_ERROR_PAGE` and the request is blocked. If unspecified, defaults to `403`.

Sample:
block_error_page_code_example
     
block_error_page_description
string
on success
The description text to show on the error page when `action` is set to `BLOCK`, `blockAction` is set to `SHOW_ERROR_PAGE`, and the request is blocked. If unspecified, defaults to `Access blocked by website owner. Please contact support.`

Sample:
block_error_page_description_example
     
block_error_page_message
string
on success
The message to show on the error page when `action` is set to `BLOCK`, `blockAction` is set to `SHOW_ERROR_PAGE`, and the request is blocked. If unspecified, defaults to `Access to the website is blocked`.

Sample:
block_error_page_message_example
     
block_response_code
integer
on success
The response status code to return when `action` is set to `BLOCK`, `blockAction` is set to `SET_RESPONSE_CODE` or `SHOW_ERROR_PAGE`, and the request is blocked. 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`.

Sample:
56
      captcha_footer
string
on success
The text to show in the footer when showing a CAPTCHA challenge when `action` is set to `BLOCK`, `blockAction` is set to `SHOW_CAPTCHA`, and the request is blocked. If unspecified, default to `Enter the letters and numbers as they are shown in image above`.

Sample:
captcha_footer_example
     
captcha_header
string
on success
The text to show in the header when showing a CAPTCHA challenge when `action` is set to `BLOCK`, `blockAction` is set to `SHOW_CAPTCHA`, and the request is blocked. If unspecified, defaults to `We have detected an increased number of attempts to access this webapp. To help us keep this webapp secure, please let us know that you are not a robot by entering the text from captcha below.`

Sample:
captcha_header_example
     
captcha_submit_label
string
on success
The text to show on the label of the CAPTCHA challenge submit button when `action` is set to `BLOCK`, `blockAction` is set to `SHOW_CAPTCHA`, and the request is blocked. If unspecified, defaults to `Yes, I am human`.

Sample:
captcha_submit_label_example
     
captcha_title
string
on success
The title used when showing a CAPTCHA challenge when `action` is set to `BLOCK`, `blockAction` is set to `SHOW_CAPTCHA`, and the request is blocked. If unspecified, defaults to `Are you human?`

Sample:
captcha_title_example
   
criteria
complex
on success
When defined, the JavaScript Challenge would be applied only for the requests that matched all the listed conditions.

     
condition
string
on success
The criteria the access rule and JavaScript Challenge uses to determine if action should be taken on a request. - **URL_IS:** Matches if the concatenation of request URL path and query is identical to the contents of the `value` field. URL must start with a `/`. - **URL_IS_NOT:** Matches if the concatenation of request URL path and query is not identical to the contents of the `value` field. URL must start with a `/`. - **URL_STARTS_WITH:** Matches if the concatenation of request URL path and query starts with the contents of the `value` field. URL must start with a `/`. - **URL_PART_ENDS_WITH:** Matches if the concatenation of request URL path and query ends with the contents of the `value` field. - **URL_PART_CONTAINS:** Matches if the concatenation of request URL path and query contains the contents of the `value` field. - **URL_REGEX:** Matches if the concatenation of request URL path and query is described by the regular expression in the value field. The value must be a valid regular expression recognized by the PCRE library in Nginx (https://www.pcre.org). - **URL_DOES_NOT_MATCH_REGEX:** Matches if the concatenation of request URL path and query is not described by the regular expression in the `value` field. The value must be a valid regular expression recognized by the PCRE library in Nginx (https://www.pcre.org). - **URL_DOES_NOT_START_WITH:** Matches if the concatenation of request URL path and query does not start with the contents of the `value` field. - **URL_PART_DOES_NOT_CONTAIN:** Matches if the concatenation of request URL path and query does not contain the contents of the `value` field. - **URL_PART_DOES_NOT_END_WITH:** Matches if the concatenation of request URL path and query does not end with the contents of the `value` field. - **IP_IS:** Matches if the request originates from one of the IP addresses contained in the defined address list. The `value` in this case is string with one or multiple IPs or CIDR notations separated by new line symbol \n *Example:* "1.1.1.1\n1.1.1.2\n1.2.2.1/30" - **IP_IS_NOT:** Matches if the request does not originate from any of the IP addresses contained in the defined address list. The `value` in this case is string with one or multiple IPs or CIDR notations separated by new line symbol \n *Example:* "1.1.1.1\n1.1.1.2\n1.2.2.1/30" - **IP_IN_LIST:** Matches if the request originates from one of the IP addresses contained in the referenced address list. The `value` in this case is OCID of the address list. - **IP_NOT_IN_LIST:** Matches if the request does not originate from any IP address contained in the referenced address list. The `value` field in this case is OCID of the address list. - **HTTP_HEADER_CONTAINS:** The HTTP_HEADER_CONTAINS criteria is defined using a compound value separated by a colon: a header field name and a header field value. `host:test.example.com` is an example of a criteria value where `host` is the header field name and `test.example.com` is the header field value. A request matches when the header field name is a case insensitive match and the header field value is a case insensitive, substring match. *Example:* With a criteria value of `host:test.example.com`, where `host` is the name of the field and `test.example.com` is the value of the host field, a request with the header values, `Host: www.test.example.com` will match, where as a request with header values of `host: www.example.com` or `host: test.sub.example.com` will not match. - **HTTP_METHOD_IS:** Matches if the request method is identical to one of the values listed in field. The `value` in this case is string with one or multiple HTTP methods separated by new line symbol \n The list of available methods: `GET`, `HEAD`, `POST`, `PUT`, `DELETE`, `CONNECT`, `OPTIONS`, `TRACE`, `PATCH`
*Example:* "GET\nPOST"
- **HTTP_METHOD_IS_NOT:** Matches if the request is not identical to any of the contents of the `value` field. The `value` in this case is string with one or multiple HTTP methods separated by new line symbol \n The list of available methods: `GET`, `HEAD`, `POST`, `PUT`, `DELETE`, `CONNECT`, `OPTIONS`, `TRACE`, `PATCH`
*Example:* "GET\nPOST"
- **COUNTRY_IS:** Matches if the request originates from one of countries in the `value` field. The `value` in this case is string with one or multiple countries separated by new line symbol \n Country codes are in ISO 3166-1 alpha-2 format. For a list of codes, see ISO's website. *Example:* "AL\nDZ\nAM" - **COUNTRY_IS_NOT:** Matches if the request does not originate from any of countries in the `value` field. The `value` in this case is string with one or multiple countries separated by new line symbol \n Country codes are in ISO 3166-1 alpha-2 format. For a list of codes, see ISO's website. *Example:* "AL\nDZ\nAM" - **USER_AGENT_IS:** Matches if the requesting user agent is identical to the contents of the `value` field. *Example:* `Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0` - **USER_AGENT_IS_NOT:** Matches if the requesting user agent is not identical to the contents of the `value` field. *Example:* `Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0`

Sample:
URL_IS
     
is_case_sensitive
boolean
on success
When enabled, the condition will be matched with case-sensitive rules.

Sample:
True
     
value
string
on success
The criteria value.

Sample:
value_example
   
failure_threshold
integer
on success
The number of failed requests before taking action. If unspecified, defaults to `10`.

Sample:
56
   
is_enabled
boolean
on success
Enables or disables the JavaScript challenge Web Application Firewall feature.

Sample:
True
   
is_nat_enabled
boolean
on success
When enabled, the user is identified not only by the IP address but also by an unique additional hash, which prevents blocking visitors with shared IP addresses.

Sample:
True
   
set_http_header
complex
on success
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`.

     
name
string
on success
The name of the header.

Sample:
name_example
     
value
string
on success
The value of the header.

Sample:
value_example
 
origin
string
on success
The key in the map of origins referencing the origin used for the Web Application Firewall. The origin must already be included in `Origins`. Required when creating the `WafConfig` resource, but not on update.

Sample:
origin_example
 
origin_groups
list / elements=string
on success
The map of origin groups and their keys used to associate origins to the `wafConfig`. Origin groups allow you to apply weights to groups of origins for load balancing purposes. Origins with higher weights will receive larger proportions of client requests. To add additional origins to your WAAS policy, update the `origins` field of a `UpdateWaasPolicy` request.

 
protection_rules
complex
on success
A list of the protection rules and their details.

   
action
string
on success
The action to take when the traffic is detected as malicious. If unspecified, defaults to `OFF`.

   
description
string
on success
The description of the protection rule.

Sample:
description_example
   
exclusions
complex
on success

     
exclusions
list / elements=string
on success

     
target
string
on success
The target of the exclusion.

Sample:
REQUEST_COOKIES
   
key
string
on success
The unique key of the protection rule.

Sample:
key_example
   
labels
list / elements=string
on success
The list of labels for the protection rule.
**Note:** Protection rules with a `ResponseBody` label will have no effect unless `isResponseInspected` is true.

   
mod_security_rule_ids
list / elements=string
on success
The list of the ModSecurity rule IDs that apply to this protection rule. For more information about ModSecurity's open source WAF rules, see Mod Security's documentation.

   
name
string
on success
The name of the protection rule.

Sample:
name_example
 
protection_settings
complex
on success
The settings to apply to protection rules.

   
allowed_http_methods
list / elements=string
on success
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).

   
block_action
string
on success
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`.

Sample:
SHOW_ERROR_PAGE
   
block_error_page_code
string
on success
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`.

Sample:
block_error_page_code_example
   
block_error_page_description
string
on success
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.`

Sample:
block_error_page_description_example
   
block_error_page_message
string
on success
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.'

Sample:
block_error_page_message_example
   
block_response_code
integer
on success
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`.

Sample:
56
   
is_response_inspected
boolean
on success
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.

Sample:
True
   
max_argument_count
integer
on success
The maximum number of arguments allowed to be passed to your application before an action is taken. Arguements are query parameters or body parameters in a PUT or POST request. If unspecified, defaults to `255`. This setting only applies if a corresponding protection rule is enabled, such as the "Number of Arguments Limits" rule (key: 960335).
Example: If `maxArgumentCount` to `2` for the Max Number of Arguments protection rule (key: 960335), the following requests would be blocked: `GET /myapp/path?query=one&query=two&query=three` `POST /myapp/path` with Body `{"argument1":"one","argument2":"two","argument3":"three"}`

Sample:
56
   
max_name_length_per_argument
integer
on success
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).

Sample:
56
   
max_response_size_in_ki_b
integer
on success
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`.

Sample:
56
   
max_total_name_length_of_arguments
integer
on success
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).

Sample:
56
   
media_types
list / elements=string
on success
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

   
recommendations_period_in_days
integer
on success
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.

Sample:
56
 
threat_feeds
complex
on success
A list of threat intelligence feeds and the actions to apply to known malicious traffic based on internet intelligence.

   
action
string
on success
The action to take when traffic is flagged as malicious by data from the threat intelligence feed. If unspecified, defaults to `OFF`.

   
description
string
on success
The description of the threat intelligence feed.

Sample:
description_example
   
key
string
on success
The unique key of the threat intelligence feed.

Sample:
key_example
   
name
string
on success
The name of the threat intelligence feed.

Sample:
name_example
 
whitelists
complex
on success
A list of IP addresses that bypass the Web Application Firewall.

   
address_lists
list / elements=string
on success
A list of OCID of IP address lists to include in the whitelist.

   
addresses
list / elements=string
on success
A set of IP addresses or CIDR notations to include in the whitelist.

   
name
string
on success
The unique name of the whitelist.

Sample:
name_example


Authors

  • Oracle (@oracle)