oracle.oci.oci_waas_policy_actions – Perform actions on a WaasPolicy resource in Oracle Cloud Infrastructure

Note

This plugin is part of the oracle.oci collection (version 4.14.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_policy_actions.

New in version 2.9.0: of oracle.oci

Synopsis

  • Perform actions on a WaasPolicy resource in Oracle Cloud Infrastructure

  • For action=accept_recommendations, accepts a list of recommended Web Application Firewall protection rules. Web Application Firewall protection rule recommendations are sets of rules generated by observed traffic patterns through the Web Application Firewall and are meant to optimize the Web Application Firewall’s security profile. Only the rules specified in the request body will be updated; all other rules will remain unchanged. Use the GET /waasPolicies/{waasPolicyId}/wafConfig/recommendations method to view a list of recommended Web Application Firewall protection rules. For more information, see WAF Protection Rules.

  • For action=change_compartment, moves WAAS policy into a different compartment. When provided, If-Match is checked against ETag values of the WAAS policy. For information about moving resources between compartments, see Moving Resources to a Different Compartment.

  • For action=purge_cache, performs a purge of the cache for each specified resource. If no resources are passed, the cache for the entire Web Application Firewall will be purged. For more information, see Caching Rules.

Requirements

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

Parameters

Parameter Choices/Defaults Comments
action
string / required
    Choices:
  • accept_recommendations
  • change_compartment
  • purge_cache
The action to perform on the WaasPolicy.
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.
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.
compartment_id
string
The OCID of the compartment into which the resource should be moved. For information about moving resources between compartments, see Moving Resources to a Different Compartment.
Required for action=change_compartment.
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.
protection_rule_keys
list / elements=string
Required for action=accept_recommendations.
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.
resources
list / elements=string
A resource to purge, specified by either a hostless absolute path starting with a single slash (Example: `/path/to/resource`) or by a relative path in which the first component will be interpreted as a domain protected by the WAAS policy (Example: `example.com/path/to/resource`).
Applicable only for action=purge_cache.
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
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.

Examples

- name: Perform action accept_recommendations on waas_policy
  oci_waas_policy_actions:
    # required
    protection_rule_keys: [ "protection_rule_keys_example" ]
    waas_policy_id: "ocid1.waaspolicy.oc1..xxxxxxEXAMPLExxxxxx"
    action: accept_recommendations

- name: Perform action change_compartment on waas_policy
  oci_waas_policy_actions:
    # required
    compartment_id: "ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx"
    waas_policy_id: "ocid1.waaspolicy.oc1..xxxxxxEXAMPLExxxxxx"
    action: change_compartment

- name: Perform action purge_cache on waas_policy
  oci_waas_policy_actions:
    # required
    waas_policy_id: "ocid1.waaspolicy.oc1..xxxxxxEXAMPLExxxxxx"
    action: purge_cache

    # optional
    resources: [ "resources_example" ]

Return Values

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

Key Returned Description
waas_policy
complex
on success
Details of the WaasPolicy resource acted upon by the current operation

Sample:
{'additional_domains': [], 'cname': 'cname_example', 'compartment_id': 'ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx', 'defined_tags': {'Operations': {'CostCenter': 'US'}}, 'display_name': 'display_name_example', 'domain': 'domain_example', 'freeform_tags': {'Department': 'Finance'}, 'id': 'ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx', 'lifecycle_state': 'CREATING', 'origin_groups': {'origins': [{'origin': 'origin_example', 'weight': 56}]}, 'origins': {'custom_headers': [{'name': 'name_example', 'value': 'value_example'}], 'http_port': 56, 'https_port': 56, 'uri': 'uri_example'}, 'policy_config': {'certificate_id': 'ocid1.certificate.oc1..xxxxxxEXAMPLExxxxxx', 'cipher_group': 'DEFAULT', 'client_address_header': 'X_FORWARDED_FOR', 'health_checks': {'expected_response_code_group': [], 'expected_response_text': 'expected_response_text_example', 'headers': {}, 'healthy_threshold': 56, 'interval_in_seconds': 56, 'is_enabled': True, 'is_response_text_check_enabled': True, 'method': 'GET', 'path': 'path_example', 'timeout_in_seconds': 56, 'unhealthy_threshold': 56}, 'is_behind_cdn': True, 'is_cache_control_respected': True, 'is_https_enabled': True, 'is_https_forced': True, 'is_origin_compression_enabled': True, 'is_response_buffering_enabled': True, 'is_sni_enabled': True, 'load_balancing_method': {'domain': 'domain_example', 'expiration_time_in_seconds': 56, 'method': 'IP_HASH', 'name': 'name_example'}, 'tls_protocols': [], 'websocket_path_prefixes': []}, 'time_created': '2013-10-20T19:20:30+01:00', 'waf_config': {'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'}]}}
 
additional_domains
list / elements=string
on success
An array of additional domains for this web application.

 
cname
string
on success
The CNAME record to add to your DNS configuration to route traffic for the domain, and all additional domains, through the WAF.

Sample:
cname_example
 
compartment_id
string
on success
The OCID of the WAAS policy's compartment.

Sample:
ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx
 
defined_tags
dictionary
on success
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
Example: `{"Operations": {"CostCenter": "42"}}`

Sample:
{'Operations': {'CostCenter': 'US'}}
 
display_name
string
on success
The user-friendly name of the WAAS policy. The name can be changed and does not need to be unique.

Sample:
display_name_example
 
domain
string
on success
The web application domain that the WAAS policy protects.

Sample:
domain_example
 
freeform_tags
dictionary
on success
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags.
Example: `{"Department": "Finance"}`

Sample:
{'Department': 'Finance'}
 
id
string
on success
The OCID of the WAAS policy.

Sample:
ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx
 
lifecycle_state
string
on success
The current lifecycle state of the WAAS policy.

Sample:
CREATING
 
origin_groups
complex
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.

   
origins
complex
on success
The list of objects containing origin references and additional properties.

     
origin
string
on success
The IP address or CIDR notation of the origin server.

Sample:
origin_example
     
weight
integer
on success
The weight of the origin used in load balancing. Origins with higher weights will receive larger proportions of client requests.

Sample:
56
 
origins
complex
on success
A map of host servers (origins) and their keys for the web application. Origin keys are used to associate origins to specific protection rules. The key should be a user-friendly name for the host. **Examples:** `primary` or `secondary`.

   
custom_headers
complex
on success
A list of HTTP headers to forward to your origin.

     
name
string
on success
The name of the header.

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

Sample:
value_example
   
http_port
integer
on success
The HTTP port on the origin that the web application listens on. If unspecified, defaults to `80`. If `0` is specified - the origin is not used for HTTP traffic.

Sample:
56
   
https_port
integer
on success
The HTTPS port on the origin that the web application listens on. If unspecified, defaults to `443`. If `0` is specified - the origin is not used for HTTPS traffic.

Sample:
56
   
uri
string
on success
The URI of the origin. Does not support paths. Port numbers should be specified in the `httpPort` and `httpsPort` fields.

Sample:
uri_example
 
policy_config
complex
on success

   
certificate_id
string
on success
The OCID of the SSL certificate to use if HTTPS is supported.

Sample:
ocid1.certificate.oc1..xxxxxxEXAMPLExxxxxx
   
cipher_group
string
on success
The set cipher group for the configured TLS protocol. This sets the configuration for the TLS connections between clients and edge nodes only. - **DEFAULT:** Cipher group supports TLS 1.0, TLS 1.1, TLS 1.2, TLS 1.3 protocols. It has the following ciphers enabled: `ECDHE-RSA- AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM- SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA- AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE- RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM- SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:!DES- CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA`

Sample:
DEFAULT
   
client_address_header
string
on success
Specifies an HTTP header name which is treated as the connecting client's IP address. Applicable only if `isBehindCdn` is enabled.
The edge node reads this header and its value and sets the client IP address as specified. It does not create the header if the header is not present in the request. If the header is not present, the connecting IP address will be used as the client's true IP address. It uses the last IP address in the header's value as the true IP address.
Example: `X-Client-Ip: 11.1.1.1, 13.3.3.3`
In the case of multiple headers with the same name, only the first header will be used. It is assumed that CDN sets the correct client IP address to prevent spoofing.
- **X_FORWARDED_FOR:** Corresponds to `X-Forwarded-For` header name.
- **X_CLIENT_IP:** Corresponds to `X-Client-Ip` header name.
- **X_REAL_IP:** Corresponds to `X-Real-Ip` header name.
- **CLIENT_IP:** Corresponds to `Client-Ip` header name.
- **TRUE_CLIENT_IP:** Corresponds to `True-Client-Ip` header name.

Sample:
X_FORWARDED_FOR
   
health_checks
complex
on success

     
expected_response_code_group
list / elements=string
on success
The HTTP response codes that signify a healthy state. - **2XX:** Success response code group. - **3XX:** Redirection response code group. - **4XX:** Client errors response code group. - **5XX:** Server errors response code group.

     
expected_response_text
string
on success
Health check will search for the given text in a case-sensitive manner within the response body and will fail if the text is not found.

Sample:
expected_response_text_example
     
headers
dictionary
on success
HTTP header fields to include in health check requests, expressed as `"name": "value"` properties. Because HTTP header field names are case-insensitive, any use of names that are case-insensitive equal to other names will be rejected. If Host is not specified, requests will include a Host header field with value matching the policy's protected domain. If User- Agent is not specified, requests will include a User-Agent header field with value "waf health checks".
**Note:** The only currently-supported header fields are Host and User-Agent.

     
healthy_threshold
integer
on success
Number of successful health checks after which the server is marked up.

Sample:
56
     
interval_in_seconds
integer
on success
Time between health checks of an individual origin server, in seconds.

Sample:
56
     
is_enabled
boolean
on success
Enables or disables the health checks.

Sample:
True
     
is_response_text_check_enabled
boolean
on success
Enables or disables additional check for predefined text in addition to response code.

Sample:
True
     
method
string
on success
An HTTP verb (i.e. HEAD, GET, or POST) to use when performing the health check.

Sample:
GET
     
path
string
on success
Path to visit on your origins when performing the health check.

Sample:
path_example
     
timeout_in_seconds
integer
on success
Response timeout represents wait time until request is considered failed, in seconds.

Sample:
56
     
unhealthy_threshold
integer
on success
Number of failed health checks after which the server is marked down.

Sample:
56
   
is_behind_cdn
boolean
on success
Enabling `isBehindCdn` allows for the collection of IP addresses from client requests if the WAF is connected to a CDN.

Sample:
True
   
is_cache_control_respected
boolean
on success
Enable or disable automatic content caching based on the response `cache-control` header. This feature enables the origin to act as a proxy cache. Caching is usually defined using `cache-control` header. For example `cache-control: max-age=120` means that the returned resource is valid for 120 seconds. Caching rules will overwrite this setting.

Sample:
True
   
is_https_enabled
boolean
on success
Enable or disable HTTPS support. If true, a `certificateId` is required. If unspecified, defaults to `false`.

Sample:
True
   
is_https_forced
boolean
on success
Force HTTP to HTTPS redirection. If unspecified, defaults to `false`.

Sample:
True
   
is_origin_compression_enabled
boolean
on success
Enable or disable GZIP compression of origin responses. If enabled, the header `Accept-Encoding: gzip` is sent to origin, otherwise, the empty `Accept-Encoding:` header is used.

Sample:
True
   
is_response_buffering_enabled
boolean
on success
Enable or disable buffering of responses from the origin. Buffering improves overall stability in case of network issues, but slightly increases Time To First Byte.

Sample:
True
   
is_sni_enabled
boolean
on success
SNI stands for Server Name Indication and is an extension of the TLS protocol. It indicates which hostname is being contacted by the browser at the beginning of the 'handshake'-process. This allows a server to connect multiple SSL Certificates to one IP address and port.

Sample:
True
   
load_balancing_method
complex
on success
An object that represents a load balancing method and its properties.

     
domain
string
on success
The domain for which the cookie is set, defaults to WAAS policy domain.

Sample:
domain_example
     
expiration_time_in_seconds
integer
on success
The time for which a browser should keep the cookie in seconds. Empty value will cause the cookie to expire at the end of a browser session.

Sample:
56
     
method
string
on success
Load balancing methods are algorithms used to efficiently distribute traffic among origin servers.
- **IP_HASH:** All the incoming requests from the same client IP address should go to the same content origination server. IP_HASH load balancing method uses origin weights when choosing which origin should the hash be assigned to initially.
- **ROUND_ROBIN:** Forwards requests sequentially to the available origin servers. The first request - to the first origin server, the second request - to the next origin server, and so on. After it sends a request to the last origin server, it starts again with the first origin server. When using weights on origins, Weighted Round Robin assigns more requests to origins with a greater weight. Over a period of time, origins will receive a number of requests in proportion to their weight.
- **STICKY_COOKIE:** Adds a session cookie to the first response from the origin server and identifies the server that sent the response. The client's next request contains the cookie value, and nginx routes the request to the origin server that responded to the first request. STICKY_COOKIE load balancing method falls back to Round Robin for the first request.

Sample:
IP_HASH
     
name
string
on success
The name of the cookie used to track the persistence. Can contain any US-ASCII character except separator or control character.

Sample:
name_example
   
tls_protocols
list / elements=string
on success
A list of allowed TLS protocols. Only applicable when HTTPS support is enabled. The TLS protocol is negotiated while the request is connecting and the most recent protocol supported by both the edge node and client browser will be selected. If no such version exists, the connection will be aborted. - **TLS_V1:** corresponds to TLS 1.0 specification.
- **TLS_V1_1:** corresponds to TLS 1.1 specification.
- **TLS_V1_2:** corresponds to TLS 1.2 specification.
- **TLS_V1_3:** corresponds to TLS 1.3 specification.
Enabled TLS protocols must go in a row. For example if `TLS_v1_1` and `TLS_V1_3` are enabled, `TLS_V1_2` must be enabled too.

   
websocket_path_prefixes
list / elements=string
on success
ModSecurity is not capable to inspect WebSockets. Therefore paths specified here have WAF disabled if Connection request header from the client has the value Upgrade (case insensitive matching) and Upgrade request header has the value websocket (case insensitive matching). Paths matches if the concatenation of request URL path and query starts with the contents of the one of `websocketPathPrefixes` array value. In All other cases challenges, like JSC, HIC and etc., remain active.

 
time_created
string
on success
The date and time the policy was created, expressed in RFC 3339 timestamp format.

Sample:
2013-10-20T19:20:30+01:00
 
waf_config
complex
on success

   
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)