Class WafLog


  • @Generated(value="OracleSDKGenerator",
               comments="API Version: 20181116")
    public final class WafLog
    extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
    A list of Web Application Firewall log entries.

    Each entry is a JSON object, including a timestamp property and other fields varying based on log type. Logs record what rules and countermeasures are triggered by requests and are used as a basis to move request handling into block mode. For more information about WAF logs, see Logs.
    Note: Objects should always be created or deserialized using the WafLog.Builder. This model distinguishes fields that are null because they are unset from fields that are explicitly set to null. This is done in the setter methods of the WafLog.Builder, which maintain a set of all explicitly set fields called WafLog.Builder.__explicitlySet__. The hashCode() and equals(Object) methods are implemented to take the explicitly set fields into account. The constructor, on the other hand, does not take the explicitly set fields into account (since the constructor cannot distinguish explicit null from unset null).

    • Constructor Detail

      • WafLog

        @Deprecated
        @ConstructorProperties({"action","captchaAction","captchaExpected","captchaReceived","captchaFailCount","clientAddress","countryName","userAgent","domain","protectionRuleDetections","httpMethod","requestUrl","httpHeaders","referrer","responseCode","responseSize","incidentKey","fingerprint","device","countryCode","requestHeaders","threatFeedKey","accessRuleKey","addressRateLimitingKey","timestamp","logType","originAddress","originResponseTime"})
        public WafLog​(String action,
                      String captchaAction,
                      String captchaExpected,
                      String captchaReceived,
                      String captchaFailCount,
                      String clientAddress,
                      String countryName,
                      String userAgent,
                      String domain,
                      Map<String,​String> protectionRuleDetections,
                      String httpMethod,
                      String requestUrl,
                      Map<String,​String> httpHeaders,
                      String referrer,
                      Integer responseCode,
                      Integer responseSize,
                      String incidentKey,
                      String fingerprint,
                      String device,
                      String countryCode,
                      Map<String,​String> requestHeaders,
                      String threatFeedKey,
                      String accessRuleKey,
                      String addressRateLimitingKey,
                      Date timestamp,
                      String logType,
                      String originAddress,
                      String originResponseTime)
        Deprecated.
    • Method Detail

      • builder

        public static WafLog.Builder builder()
        Create a new builder.
      • getAction

        public String getAction()
        The action taken on the request, either ALLOW, DETECT, or BLOCK.
        Returns:
        the value
      • getCaptchaAction

        public String getCaptchaAction()
        The CAPTCHA action taken on the request, ALLOW or BLOCK.

        For more information about CAPTCHAs, see UpdateCaptchas.

        Returns:
        the value
      • getCaptchaExpected

        public String getCaptchaExpected()
        The CAPTCHA challenge answer that was expected.
        Returns:
        the value
      • getCaptchaReceived

        public String getCaptchaReceived()
        The CAPTCHA challenge answer that was received.
        Returns:
        the value
      • getCaptchaFailCount

        public String getCaptchaFailCount()
        The number of times the CAPTCHA challenge was failed.
        Returns:
        the value
      • getClientAddress

        public String getClientAddress()
        The IPv4 address of the requesting client.
        Returns:
        the value
      • getCountryName

        public String getCountryName()
        The name of the country where the request originated.
        Returns:
        the value
      • getUserAgent

        public String getUserAgent()
        The value of the request’s User-Agent header field.
        Returns:
        the value
      • getDomain

        public String getDomain()
        The Host header data of the request.
        Returns:
        the value
      • getProtectionRuleDetections

        public Map<String,​String> getProtectionRuleDetections()
        A map of protection rule keys to detection message details.

        Detections are requests that matched the criteria of a protection rule but the rule’s action was set to DETECT.

        Returns:
        the value
      • getHttpMethod

        public String getHttpMethod()
        The HTTP method of the request.
        Returns:
        the value
      • getRequestUrl

        public String getRequestUrl()
        The path and query string of the request.
        Returns:
        the value
      • getHttpHeaders

        public Map<String,​String> getHttpHeaders()
        The map of the request’s header names to their respective values.
        Returns:
        the value
      • getReferrer

        public String getReferrer()
        The Referrer header value of the request.
        Returns:
        the value
      • getResponseCode

        public Integer getResponseCode()
        The status code of the response.
        Returns:
        the value
      • getResponseSize

        public Integer getResponseSize()
        The size in bytes of the response.
        Returns:
        the value
      • getIncidentKey

        public String getIncidentKey()
        The incident key of a request.

        An incident key is generated for each request processed by the Web Application Firewall and is used to idenitfy blocked requests in applicable logs.

        Returns:
        the value
      • getFingerprint

        public String getFingerprint()
        The hashed signature of the device’s fingerprint.

        For more information, see DeviceFingerPrintChallenge.

        Returns:
        the value
      • getDevice

        public String getDevice()
        The type of device that the request was made from.
        Returns:
        the value
      • getCountryCode

        public String getCountryCode()
        ISO 3166-1 alpha-2 code of the country from which the request originated.

        For a list of codes, see ISO’s website.

        Returns:
        the value
      • getRequestHeaders

        public Map<String,​String> getRequestHeaders()
        A map of header names to values of the request sent to the origin, including any headers appended by the Web Application Firewall.
        Returns:
        the value
      • getThreatFeedKey

        public String getThreatFeedKey()
        The ThreatFeed key that matched the request.

        For more information about threat feeds, see UpdateThreatFeeds.

        Returns:
        the value
      • getAccessRuleKey

        public String getAccessRuleKey()
        The AccessRule key that matched the request.

        For more information about access rules, see UpdateAccessRules.

        Returns:
        the value
      • getAddressRateLimitingKey

        public String getAddressRateLimitingKey()
        The AddressRateLimiting key that matched the request.

        For more information about address rate limiting, see UpdateWafAddressRateLimiting.

        Returns:
        the value
      • getTimestamp

        public Date getTimestamp()
        The date and time the Web Application Firewall processed the request and logged it.
        Returns:
        the value
      • getLogType

        public String getLogType()
        The type of log of the request.

        For more about log types, see Logs.

        Returns:
        the value
      • getOriginAddress

        public String getOriginAddress()
        The address of the origin server where the request was sent.
        Returns:
        the value
      • getOriginResponseTime

        public String getOriginResponseTime()
        The amount of time it took the origin server to respond to the request, in seconds.
        Returns:
        the value
      • toString

        public String toString()
        Overrides:
        toString in class com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
      • toString

        public String toString​(boolean includeByteArrayContents)
        Return a string representation of the object.
        Parameters:
        includeByteArrayContents - true to include the full contents of byte arrays
        Returns:
        string representation
      • equals

        public boolean equals​(Object o)
        Overrides:
        equals in class com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel