Class: OCI::Waas::Models::WafConfigDetails
- Inherits:
-
Object
- Object
- OCI::Waas::Models::WafConfigDetails
- Defined in:
- lib/oci/waas/models/waf_config_details.rb
Overview
The Web Application Firewall configuration for the WAAS policy creation.
Instance Attribute Summary collapse
-
#access_rules ⇒ Array<OCI::Waas::Models::AccessRule>
The access rules applied to the Web Application Firewall.
-
#address_rate_limiting ⇒ OCI::Waas::Models::AddressRateLimiting
The settings used to limit the number of requests from an IP address.
-
#caching_rules ⇒ Array<OCI::Waas::Models::CachingRule>
A list of caching rules applied to the web application.
-
#captchas ⇒ Array<OCI::Waas::Models::Captcha>
A list of CAPTCHA challenge settings.
-
#custom_protection_rules ⇒ Array<OCI::Waas::Models::CustomProtectionRuleSetting>
A list of the custom protection rule OCIDs and their actions.
-
#device_fingerprint_challenge ⇒ OCI::Waas::Models::DeviceFingerprintChallenge
The device fingerprint challenge settings.
-
#human_interaction_challenge ⇒ OCI::Waas::Models::HumanInteractionChallenge
The human interaction challenge settings.
-
#js_challenge ⇒ OCI::Waas::Models::JsChallenge
The JavaScript challenge settings.
-
#origin ⇒ String
The key in the map of origins referencing the origin used for the Web Application Firewall.
-
#origin_groups ⇒ Array<String>
The map of origin groups and their keys used to associate origins to the ‘wafConfig`.
-
#protection_settings ⇒ OCI::Waas::Models::ProtectionSettings
The settings applied to protection rules.
-
#whitelists ⇒ Array<OCI::Waas::Models::Whitelist>
A list of IP addresses that bypass the Web Application Firewall.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ WafConfigDetails
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ WafConfigDetails
Initializes the object
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 |
# File 'lib/oci/waas/models/waf_config_details.rb', line 117 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.access_rules = attributes[:'accessRules'] if attributes[:'accessRules'] raise 'You cannot provide both :accessRules and :access_rules' if attributes.key?(:'accessRules') && attributes.key?(:'access_rules') self.access_rules = attributes[:'access_rules'] if attributes[:'access_rules'] self.address_rate_limiting = attributes[:'addressRateLimiting'] if attributes[:'addressRateLimiting'] raise 'You cannot provide both :addressRateLimiting and :address_rate_limiting' if attributes.key?(:'addressRateLimiting') && attributes.key?(:'address_rate_limiting') self.address_rate_limiting = attributes[:'address_rate_limiting'] if attributes[:'address_rate_limiting'] self.captchas = attributes[:'captchas'] if attributes[:'captchas'] self.device_fingerprint_challenge = attributes[:'deviceFingerprintChallenge'] if attributes[:'deviceFingerprintChallenge'] raise 'You cannot provide both :deviceFingerprintChallenge and :device_fingerprint_challenge' if attributes.key?(:'deviceFingerprintChallenge') && attributes.key?(:'device_fingerprint_challenge') self.device_fingerprint_challenge = attributes[:'device_fingerprint_challenge'] if attributes[:'device_fingerprint_challenge'] self.human_interaction_challenge = attributes[:'humanInteractionChallenge'] if attributes[:'humanInteractionChallenge'] raise 'You cannot provide both :humanInteractionChallenge and :human_interaction_challenge' if attributes.key?(:'humanInteractionChallenge') && attributes.key?(:'human_interaction_challenge') self.human_interaction_challenge = attributes[:'human_interaction_challenge'] if attributes[:'human_interaction_challenge'] self.js_challenge = attributes[:'jsChallenge'] if attributes[:'jsChallenge'] raise 'You cannot provide both :jsChallenge and :js_challenge' if attributes.key?(:'jsChallenge') && attributes.key?(:'js_challenge') self.js_challenge = attributes[:'js_challenge'] if attributes[:'js_challenge'] self.origin = attributes[:'origin'] if attributes[:'origin'] self.caching_rules = attributes[:'cachingRules'] if attributes[:'cachingRules'] raise 'You cannot provide both :cachingRules and :caching_rules' if attributes.key?(:'cachingRules') && attributes.key?(:'caching_rules') self.caching_rules = attributes[:'caching_rules'] if attributes[:'caching_rules'] self.custom_protection_rules = attributes[:'customProtectionRules'] if attributes[:'customProtectionRules'] raise 'You cannot provide both :customProtectionRules and :custom_protection_rules' if attributes.key?(:'customProtectionRules') && attributes.key?(:'custom_protection_rules') self.custom_protection_rules = attributes[:'custom_protection_rules'] if attributes[:'custom_protection_rules'] self.origin_groups = attributes[:'originGroups'] if attributes[:'originGroups'] raise 'You cannot provide both :originGroups and :origin_groups' if attributes.key?(:'originGroups') && attributes.key?(:'origin_groups') self.origin_groups = attributes[:'origin_groups'] if attributes[:'origin_groups'] self.protection_settings = attributes[:'protectionSettings'] if attributes[:'protectionSettings'] raise 'You cannot provide both :protectionSettings and :protection_settings' if attributes.key?(:'protectionSettings') && attributes.key?(:'protection_settings') self.protection_settings = attributes[:'protection_settings'] if attributes[:'protection_settings'] self.whitelists = attributes[:'whitelists'] if attributes[:'whitelists'] end |
Instance Attribute Details
#access_rules ⇒ Array<OCI::Waas::Models::AccessRule>
The access rules applied to the Web Application Firewall. Access rules allow custom content access policies to be defined and ‘ALLOW`, `DETECT`, or `BLOCK` actions to be taken on a request when specified criteria are met.
12 13 14 |
# File 'lib/oci/waas/models/waf_config_details.rb', line 12 def access_rules @access_rules end |
#address_rate_limiting ⇒ OCI::Waas::Models::AddressRateLimiting
The settings used to limit the number of requests from an IP address.
16 17 18 |
# File 'lib/oci/waas/models/waf_config_details.rb', line 16 def address_rate_limiting @address_rate_limiting end |
#caching_rules ⇒ Array<OCI::Waas::Models::CachingRule>
A list of caching rules applied to the web application.
40 41 42 |
# File 'lib/oci/waas/models/waf_config_details.rb', line 40 def caching_rules @caching_rules end |
#captchas ⇒ Array<OCI::Waas::Models::Captcha>
A list of CAPTCHA challenge settings. CAPTCHAs challenge requests to ensure a human is attempting to reach the specified URL and not a bot.
20 21 22 |
# File 'lib/oci/waas/models/waf_config_details.rb', line 20 def captchas @captchas end |
#custom_protection_rules ⇒ Array<OCI::Waas::Models::CustomProtectionRuleSetting>
A list of the custom protection rule OCIDs and their actions.
44 45 46 |
# File 'lib/oci/waas/models/waf_config_details.rb', line 44 def custom_protection_rules @custom_protection_rules end |
#device_fingerprint_challenge ⇒ OCI::Waas::Models::DeviceFingerprintChallenge
The device fingerprint challenge settings. Blocks bots based on unique device fingerprint information.
24 25 26 |
# File 'lib/oci/waas/models/waf_config_details.rb', line 24 def device_fingerprint_challenge @device_fingerprint_challenge end |
#human_interaction_challenge ⇒ OCI::Waas::Models::HumanInteractionChallenge
The human interaction challenge settings. Detects natural human interactions such as mouse movements, time on site, and page scrolling to identify bots.
28 29 30 |
# File 'lib/oci/waas/models/waf_config_details.rb', line 28 def human_interaction_challenge @human_interaction_challenge end |
#js_challenge ⇒ OCI::Waas::Models::JsChallenge
The JavaScript challenge settings. Blocks bots by challenging requests from browsers that have no JavaScript support.
32 33 34 |
# File 'lib/oci/waas/models/waf_config_details.rb', line 32 def js_challenge @js_challenge end |
#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 is not required upon updating the configuration.
36 37 38 |
# File 'lib/oci/waas/models/waf_config_details.rb', line 36 def origin @origin end |
#origin_groups ⇒ Array<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.
49 50 51 |
# File 'lib/oci/waas/models/waf_config_details.rb', line 49 def origin_groups @origin_groups end |
#protection_settings ⇒ OCI::Waas::Models::ProtectionSettings
The settings applied to protection rules.
53 54 55 |
# File 'lib/oci/waas/models/waf_config_details.rb', line 53 def protection_settings @protection_settings end |
#whitelists ⇒ Array<OCI::Waas::Models::Whitelist>
A list of IP addresses that bypass the Web Application Firewall.
57 58 59 |
# File 'lib/oci/waas/models/waf_config_details.rb', line 57 def whitelists @whitelists end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/oci/waas/models/waf_config_details.rb', line 60 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'access_rules': :'accessRules', 'address_rate_limiting': :'addressRateLimiting', 'captchas': :'captchas', 'device_fingerprint_challenge': :'deviceFingerprintChallenge', 'human_interaction_challenge': :'humanInteractionChallenge', 'js_challenge': :'jsChallenge', 'origin': :'origin', 'caching_rules': :'cachingRules', 'custom_protection_rules': :'customProtectionRules', 'origin_groups': :'originGroups', 'protection_settings': :'protectionSettings', 'whitelists': :'whitelists' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/oci/waas/models/waf_config_details.rb', line 80 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'access_rules': :'Array<OCI::Waas::Models::AccessRule>', 'address_rate_limiting': :'OCI::Waas::Models::AddressRateLimiting', 'captchas': :'Array<OCI::Waas::Models::Captcha>', 'device_fingerprint_challenge': :'OCI::Waas::Models::DeviceFingerprintChallenge', 'human_interaction_challenge': :'OCI::Waas::Models::HumanInteractionChallenge', 'js_challenge': :'OCI::Waas::Models::JsChallenge', 'origin': :'String', 'caching_rules': :'Array<OCI::Waas::Models::CachingRule>', 'custom_protection_rules': :'Array<OCI::Waas::Models::CustomProtectionRuleSetting>', 'origin_groups': :'Array<String>', 'protection_settings': :'OCI::Waas::Models::ProtectionSettings', 'whitelists': :'Array<OCI::Waas::Models::Whitelist>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 |
# File 'lib/oci/waas/models/waf_config_details.rb', line 191 def ==(other) return true if equal?(other) self.class == other.class && access_rules == other.access_rules && address_rate_limiting == other.address_rate_limiting && captchas == other.captchas && device_fingerprint_challenge == other.device_fingerprint_challenge && human_interaction_challenge == other.human_interaction_challenge && js_challenge == other.js_challenge && origin == other.origin && caching_rules == other.caching_rules && custom_protection_rules == other.custom_protection_rules && origin_groups == other.origin_groups && protection_settings == other.protection_settings && whitelists == other.whitelists end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 |
# File 'lib/oci/waas/models/waf_config_details.rb', line 232 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]) ) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other) ⇒ Boolean
212 213 214 |
# File 'lib/oci/waas/models/waf_config_details.rb', line 212 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
221 222 223 |
# File 'lib/oci/waas/models/waf_config_details.rb', line 221 def hash [access_rules, address_rate_limiting, captchas, device_fingerprint_challenge, human_interaction_challenge, js_challenge, origin, caching_rules, custom_protection_rules, origin_groups, protection_settings, whitelists].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
265 266 267 268 269 270 271 272 273 274 |
# File 'lib/oci/waas/models/waf_config_details.rb', line 265 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
259 260 261 |
# File 'lib/oci/waas/models/waf_config_details.rb', line 259 def to_s to_hash.to_s end |