-
Notifications
You must be signed in to change notification settings - Fork 82
/
waf_log.go
131 lines (96 loc) · 5.61 KB
/
waf_log.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved.
// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
// Code generated. DO NOT EDIT.
// Web Application Acceleration and Security Services API
//
// OCI Web Application Acceleration and Security Services
//
package waas
import (
"fmt"
"github.com/oracle/oci-go-sdk/v65/common"
"strings"
)
// WafLog 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 (https://docs.cloud.oracle.com/iaas/Content/WAF/Tasks/logs.htm).
type WafLog struct {
// The action taken on the request, either `ALLOW`, `DETECT`, or `BLOCK`.
Action *string `mandatory:"false" json:"action"`
// The CAPTCHA action taken on the request, `ALLOW` or `BLOCK`. For more information about
// CAPTCHAs, see `UpdateCaptchas`.
CaptchaAction *string `mandatory:"false" json:"captchaAction"`
// The CAPTCHA challenge answer that was expected.
CaptchaExpected *string `mandatory:"false" json:"captchaExpected"`
// The CAPTCHA challenge answer that was received.
CaptchaReceived *string `mandatory:"false" json:"captchaReceived"`
// The number of times the CAPTCHA challenge was failed.
CaptchaFailCount *string `mandatory:"false" json:"captchaFailCount"`
// The IPv4 address of the requesting client.
ClientAddress *string `mandatory:"false" json:"clientAddress"`
// The name of the country where the request originated.
CountryName *string `mandatory:"false" json:"countryName"`
// The value of the request's `User-Agent` header field.
UserAgent *string `mandatory:"false" json:"userAgent"`
// The `Host` header data of the request.
Domain *string `mandatory:"false" json:"domain"`
// 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`.
ProtectionRuleDetections map[string]string `mandatory:"false" json:"protectionRuleDetections"`
// The HTTP method of the request.
HttpMethod *string `mandatory:"false" json:"httpMethod"`
// The path and query string of the request.
RequestUrl *string `mandatory:"false" json:"requestUrl"`
// The map of the request's header names to their respective values.
HttpHeaders map[string]string `mandatory:"false" json:"httpHeaders"`
// The `Referrer` header value of the request.
Referrer *string `mandatory:"false" json:"referrer"`
// The status code of the response.
ResponseCode *int `mandatory:"false" json:"responseCode"`
// The size in bytes of the response.
ResponseSize *int `mandatory:"false" json:"responseSize"`
// 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.
IncidentKey *string `mandatory:"false" json:"incidentKey"`
// The hashed signature of the device's fingerprint. For more information,
// see `DeviceFingerPrintChallenge`.
Fingerprint *string `mandatory:"false" json:"fingerprint"`
// The type of device that the request was made from.
Device *string `mandatory:"false" json:"device"`
// ISO 3166-1 alpha-2 code of the country from which the request originated.
// For a list of codes, see ISO's website (https://www.iso.org/obp/ui/#search/code/).
CountryCode *string `mandatory:"false" json:"countryCode"`
// A map of header names to values of the request sent to the origin, including any headers
// appended by the Web Application Firewall.
RequestHeaders map[string]string `mandatory:"false" json:"requestHeaders"`
// The `ThreatFeed` key that matched the request. For more information about
// threat feeds, see `UpdateThreatFeeds`.
ThreatFeedKey *string `mandatory:"false" json:"threatFeedKey"`
// The `AccessRule` key that matched the request. For more information about
// access rules, see `UpdateAccessRules`.
AccessRuleKey *string `mandatory:"false" json:"accessRuleKey"`
// The `AddressRateLimiting` key that matched the request. For more information
// about address rate limiting, see `UpdateWafAddressRateLimiting`.
AddressRateLimitingKey *string `mandatory:"false" json:"addressRateLimitingKey"`
// The date and time the Web Application Firewall processed the request and logged it.
Timestamp *common.SDKTime `mandatory:"false" json:"timestamp"`
// The type of log of the request. For more about log types, see Logs (https://docs.cloud.oracle.com/iaas/Content/WAF/Tasks/logs.htm).
LogType *string `mandatory:"false" json:"logType"`
// The address of the origin server where the request was sent.
OriginAddress *string `mandatory:"false" json:"originAddress"`
// The amount of time it took the origin server to respond to the request, in seconds.
OriginResponseTime *string `mandatory:"false" json:"originResponseTime"`
}
func (m WafLog) String() string {
return common.PointerString(m)
}
// ValidateEnumValue returns an error when providing an unsupported enum value
// This function is being called during constructing API request process
// Not recommended for calling this function directly
func (m WafLog) ValidateEnumValue() (bool, error) {
errMessage := []string{}
if len(errMessage) > 0 {
return true, fmt.Errorf(strings.Join(errMessage, "\n"))
}
return false, nil
}