Skip to content

Commit

Permalink
DXE-3833 Merge pull request #205 from akamai/release/v8.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dawiddzhafarov authored May 21, 2024
2 parents ea79b09 + 2208df6 commit fd8ecea
Show file tree
Hide file tree
Showing 19 changed files with 695 additions and 62 deletions.
35 changes: 32 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
# EDGEGRID GOLANG RELEASE NOTES

## 8.2.0 (May 21, 2024)

#### FEATURES/ENHANCEMENTS:

* APPSEC
* Added `CounterType` field to `CreateRatePolicyResponse`, `UpdateRatePolicyResponse`, `RemoveRatePolicyResponse`, `GetRatePoliciesResponse` and `GetRatePolicyResponse` structs to support managing rate policy counter type

* BOTMAN
* Added [GetCustomBotCategoryItemSequence](https://techdocs.akamai.com/bot-manager/reference/get-custom-bot-category-item-sequence) and [UpdateCustomBotCategoryItemSequence](https://techdocs.akamai.com/bot-manager/reference/put-custom-bot-category-item-sequence)

* HAPI
* Added method to return certificate for the edge hostname
* [GetCertificate](https://techdocs.akamai.com/edge-hostnames/reference/get-edge-hostname-certificate)
* Added fields to `GetEdgeHostnameResponse`: `ProductID`, `MapAlias` and `UseCases`

#### BUG FIXES:

* APPSEC
* The `Override` field in the following structs has been updated from a pointer to a value type within the `AdvancedSettingsAttackPayloadLogging` interface:
* `GetAdvancedSettingsAttackPayloadLoggingResponse`,
* `UpdateAdvancedSettingsAttackPayloadLoggingResponse`,
* `RemoveAdvancedSettingsAttackPayloadLoggingRequest`,
* `RemoveAdvancedSettingsAttackPayloadLoggingResponse`
This update was made to address a drift issue related to policy level settings.
* Omit `Prefetch` within `AdvancedOptions` in `GetExportConfigurationResponse` when empty

* CLOUDLETS
* Added validation that `ObjectMatchValue` is not supported with `MatchType` `query` in `MatchRuleER` ([#535](https://github.com/akamai/terraform-provider-akamai/issues/535))

## 8.1.0 (April 11, 2024)

#### FEATURES/ENHANCEMENTS:
Expand Down Expand Up @@ -33,7 +62,7 @@
* `Gid` into `GID` in `TSIGQueryString` and `TSIGReportMeta`
* `TsigKey` into `TSIGKey` in `ZoneCreate` and `ZoneResponse`
* `VersionId` into `VersionID` in `ZoneResponse`
* `RequestId` into `RequestID` in `BulkZonesResponse`, `BulkStatusResponse`, `BulkCreateResultResponse` and `BulkDeleteResultResponse`
* `RequestId` into `RequestID` in `BulkZonesResponse`, `BulkStatusResponse`, `BulkCreateResultResponse` and `BulkDeleteResultResponse`
* Renamed `RecordSets` interface into `Recordsets`
* Renamed following methods:
* `ListTsigKeys` into `ListTSIGKeys`
Expand Down Expand Up @@ -150,7 +179,7 @@

* DNS
* Removed not working `DeleteZone` method
*
*
* PAPI
* Updated documentation link for `GetProperties` method

Expand All @@ -159,7 +188,7 @@
#### BUG FIXES:

* Edgeworkers
* Fixed case when not providing optional `note` field in `ActivateVersion` would cause activation to fail
* Fixed case when not providing optional `note` field in `ActivateVersion` would cause activation to fail

## 7.6.0 (February 8, 2024)

Expand Down
6 changes: 3 additions & 3 deletions pkg/appsec/advanced_settings_attack_payload_logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ type (

// GetAdvancedSettingsAttackPayloadLoggingResponse is returned from a call to GetAdvancedSettingsAttackPayloadLogging.
GetAdvancedSettingsAttackPayloadLoggingResponse struct {
Override *bool `json:"override,omitempty"`
Override bool `json:"override"`
Enabled bool `json:"enabled"`
RequestBody AttackPayloadLoggingRequestBody `json:"requestBody"`
ResponseBody AttackPayloadLoggingResponseBody `json:"responseBody"`
Expand All @@ -71,7 +71,7 @@ type (

// UpdateAdvancedSettingsAttackPayloadLoggingResponse is returned from a call to UpdateAdvancedSettingsAttackPayloadLogging.
UpdateAdvancedSettingsAttackPayloadLoggingResponse struct {
Override *bool `json:"override,omitempty"`
Override bool `json:"override"`
Enabled bool `json:"enabled"`
RequestBody AttackPayloadLoggingRequestBody `json:"requestBody"`
ResponseBody AttackPayloadLoggingResponseBody `json:"responseBody"`
Expand All @@ -90,7 +90,7 @@ type (

// RemoveAdvancedSettingsAttackPayloadLoggingResponse is returned from a call to RemoveAdvancedSettingsAttackPayloadLogging.
RemoveAdvancedSettingsAttackPayloadLoggingResponse struct {
Override *bool `json:"override,omitempty"`
Override bool `json:"override"`
Enabled bool `json:"enabled"`
RequestBody AttackPayloadLoggingRequestBody `json:"requestBody"`
ResponseBody AttackPayloadLoggingResponseBody `json:"responseBody"`
Expand Down
12 changes: 6 additions & 6 deletions pkg/appsec/advanced_settings_attack_payload_logging_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func TestAppSec_ListAdvancedSettingsAttackPayloadLogging(t *testing.T) {

result := GetAdvancedSettingsAttackPayloadLoggingResponse{}

respData := compactJSON(loadFixtureBytes("testdata/TestAdvancedSettingsAttackPayloadLogging/AdvancedSettingsAttackPayloadLogging.json"))
respData := compactJSON(loadFixtureBytes("testdata/TestAdvancedSettingsAttackPayloadLogging/AdvancedSettingsAttackPayloadLoggingConfig.json"))
err := json.Unmarshal([]byte(respData), &result)
require.NoError(t, err)

Expand Down Expand Up @@ -98,7 +98,7 @@ func TestAppSec_GetAdvancedSettingsAttackPayloadLoggingPolicy(t *testing.T) {

result := GetAdvancedSettingsAttackPayloadLoggingResponse{}

respData := compactJSON(loadFixtureBytes("testdata/TestAdvancedSettingsAttackPayloadLogging/AdvancedSettingsAttackPayloadLogging.json"))
respData := compactJSON(loadFixtureBytes("testdata/TestAdvancedSettingsAttackPayloadLogging/AdvancedSettingsAttackPayloadLoggingPolicy.json"))
err := json.Unmarshal([]byte(respData), &result)
require.NoError(t, err)

Expand Down Expand Up @@ -169,13 +169,13 @@ func TestAppSec_GetAdvancedSettingsAttackPayloadLoggingPolicy(t *testing.T) {
func TestAppSec_UpdateAdvancedSettingsAttackPayloadLogging(t *testing.T) {
result := UpdateAdvancedSettingsAttackPayloadLoggingResponse{}

respData := compactJSON(loadFixtureBytes("testdata/TestAdvancedSettingsLogging/AdvancedSettingsLogging.json"))
respData := compactJSON(loadFixtureBytes("testdata/TestAdvancedSettingsAttackPayloadLogging/AdvancedSettingsAttackPayloadLoggingConfig.json"))
err := json.Unmarshal([]byte(respData), &result)
require.NoError(t, err)

req := UpdateAdvancedSettingsAttackPayloadLoggingRequest{}

reqData := compactJSON(loadFixtureBytes("testdata/TestAdvancedSettingsLogging/AdvancedSettingsLogging.json"))
reqData := compactJSON(loadFixtureBytes("testdata/TestAdvancedSettingsAttackPayloadLogging/AdvancedSettingsAttackPayloadLoggingConfig.json"))
err = json.Unmarshal([]byte(reqData), &req)
require.NoError(t, err)

Expand Down Expand Up @@ -252,13 +252,13 @@ func TestAppSec_UpdateAdvancedSettingsAttackPayloadLogging(t *testing.T) {
func TestAppSec_UpdateAdvancedSettingsAttackPayloadLoggingPolicy(t *testing.T) {
result := UpdateAdvancedSettingsAttackPayloadLoggingResponse{}

respData := compactJSON(loadFixtureBytes("testdata/TestAdvancedSettingsLogging/AdvancedSettingsLogging.json"))
respData := compactJSON(loadFixtureBytes("testdata/TestAdvancedSettingsAttackPayloadLogging/AdvancedSettingsAttackPayloadLoggingPolicy.json"))
err := json.Unmarshal([]byte(respData), &result)
require.NoError(t, err)

req := UpdateAdvancedSettingsAttackPayloadLoggingRequest{}

reqData := compactJSON(loadFixtureBytes("testdata/TestAdvancedSettingsLogging/AdvancedSettingsLogging.json"))
reqData := compactJSON(loadFixtureBytes("testdata/TestAdvancedSettingsAttackPayloadLogging/AdvancedSettingsAttackPayloadLoggingPolicy.json"))
err = json.Unmarshal([]byte(reqData), &req)
require.NoError(t, err)

Expand Down
27 changes: 15 additions & 12 deletions pkg/appsec/export_configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -503,18 +503,13 @@ type (

// AdvancedOptionsexp is returned as part of GetExportConfigurationResponse.
AdvancedOptionsexp struct {
Logging *Loggingexp `json:"logging"`
AttackPayloadLogging *AttackPayloadLogging `json:"attackPayloadLogging"`
EvasivePathMatch *EvasivePathMatchexp `json:"evasivePathMatch,omitempty"`
Prefetch struct {
AllExtensions bool `json:"allExtensions"`
EnableAppLayer bool `json:"enableAppLayer"`
EnableRateControls bool `json:"enableRateControls"`
Extensions []string `json:"extensions,omitempty"`
} `json:"prefetch"`
PragmaHeader *GetAdvancedSettingsPragmaResponse `json:"pragmaHeader,omitempty"`
RequestBody *RequestBody `json:"requestBody,omitempty"`
PIILearning *PIILearningexp `json:"piiLearning,omitempty"`
Logging *Loggingexp `json:"logging"`
AttackPayloadLogging *AttackPayloadLogging `json:"attackPayloadLogging"`
EvasivePathMatch *EvasivePathMatchexp `json:"evasivePathMatch,omitempty"`
Prefetch *Prefetch `json:"prefetch"`
PragmaHeader *GetAdvancedSettingsPragmaResponse `json:"pragmaHeader,omitempty"`
RequestBody *RequestBody `json:"requestBody,omitempty"`
PIILearning *PIILearningexp `json:"piiLearning,omitempty"`
}

// CustomDenyListexp is returned as part of GetExportConfigurationResponse.
Expand Down Expand Up @@ -689,6 +684,14 @@ type (
EnablePIILearning bool `json:"enabled"`
}

// Prefetch is returned as part of AdvancedOptionsexp
Prefetch struct {
AllExtensions bool `json:"allExtensions"`
EnableAppLayer bool `json:"enableAppLayer"`
EnableRateControls bool `json:"enableRateControls"`
Extensions []string `json:"extensions,omitempty"`
}

// RequestBody is returned as part of GetExportConfigurationResponse.
RequestBody struct {
RequestBodyInspectionLimitInKB string `json:"requestBodyInspectionLimitInKB"`
Expand Down
23 changes: 14 additions & 9 deletions pkg/appsec/rate_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,10 @@ type (
PositiveMatch bool `json:"positiveMatch"`
ValueInRange bool `json:"valueInRange"`
} `json:"queryParameters"`
CreateDate string `json:"-"`
UpdateDate string `json:"-"`
Used json.RawMessage `json:"used"`
CreateDate string `json:"-"`
UpdateDate string `json:"-"`
Used json.RawMessage `json:"used"`
CounterType string `json:"counterType"`
}

// UpdateRatePolicyRequest is used to modify an existing rate policy.
Expand Down Expand Up @@ -131,9 +132,10 @@ type (
PositiveMatch bool `json:"positiveMatch"`
ValueInRange bool `json:"valueInRange"`
} `json:"queryParameters"`
CreateDate string `json:"-"`
UpdateDate string `json:"-"`
Used json.RawMessage `json:"used"`
CreateDate string `json:"-"`
UpdateDate string `json:"-"`
Used json.RawMessage `json:"used"`
CounterType string `json:"counterType"`
}

// RemoveRatePolicyRequest is used to remove a rate policy.
Expand Down Expand Up @@ -179,9 +181,10 @@ type (
PositiveMatch bool `json:"positiveMatch"`
ValueInRange bool `json:"valueInRange"`
} `json:"queryParameters"`
CreateDate string `json:"-"`
UpdateDate string `json:"-"`
Used json.RawMessage `json:"used"`
CreateDate string `json:"-"`
UpdateDate string `json:"-"`
Used json.RawMessage `json:"used"`
CounterType string `json:"counterType"`
}

// GetRatePoliciesRequest is used to retrieve the rate policies for a configuration.
Expand Down Expand Up @@ -223,6 +226,7 @@ type (
SameActionOnIpv bool `json:"sameActionOnIpv"`
APISelectors *RatePolicyAPISelectors `json:"apiSelectors,omitempty"`
BodyParameters *RatePolicyBodyParameters `json:"bodyParameters,omitempty"`
CounterType string `json:"counterType"`
} `json:"ratePolicies,omitempty"`
}

Expand Down Expand Up @@ -261,6 +265,7 @@ type (
CreateDate string `json:"-"`
UpdateDate string `json:"-"`
Used bool `json:"-"`
CounterType string `json:"counterType"`
}

// RatePolicyAPISelectors is used as part of a rate policy description.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"enabled": true,
"requestBody": {
"type": "NONE"
},
"responseBody": {
"type": "ATTACK_PAYLOAD"
}
}
1 change: 1 addition & 0 deletions pkg/appsec/testdata/TestRatePolicies/RatePolicies.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"clientIdentifier": "ip",
"createDate": "2020-10-29T04:00:22Z",
"description": "AFW Test Extensions",
"counterType": "per_edge",
"fileExtensions": {
"positiveMatch": false,
"values": [
Expand Down
1 change: 1 addition & 0 deletions pkg/appsec/testdata/TestRatePolicies/RatePolicy.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"clientIdentifier": "ip",
"createDate": "2020-10-29T04:00:22Z",
"description": "AFW Test Extensions",
"counterType": "per_edge",
"fileExtensions": {
"positiveMatch": false,
"values": [
Expand Down
1 change: 1 addition & 0 deletions pkg/botman/botman.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ type (
ConditionalAction
CustomBotCategory
CustomBotCategoryAction
CustomBotCategoryItemSequence
CustomBotCategorySequence
CustomClient
CustomClientSequence
Expand Down
Loading

0 comments on commit fd8ecea

Please sign in to comment.