Skip to content

Commit 1d2ddcf

Browse files
authored
DXE-2891 Merge pull request #189 from akamai/release/v7.1.0
## 7.1.0 (July 25, 2023) ### FEATURES/ENHANCEMENTS: * APPSEC * Added Bot Management API Support * Challenge Injection Rules - read, update * Add `CreateSecurityPolicyWithDefaultProtections` method to the `SecurityPolicy` interface to support creating a security policy with all available protections enabled. * Update marshaling of PII learning setting ### Deprecations * Challenge Interceptions Rules has been deprecated * Deprecate the following interfaces used to maintain individual policy protections: * `ApiConstraintsProtection` * `IPGeoProtection` * `MalwareProtection` * `NetworkLayerProtection` * `RateProtection` * `ReputationProtection` * `SlowPostProtection` * `WAFProtection` * Deprecate the `CreateSecurityPolicy` method of the `SecurityPolicy` interface.
2 parents 84ea595 + 806d489 commit 1d2ddcf

22 files changed

+582
-24
lines changed

CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,29 @@
11
# EDGEGRID GOLANG RELEASE NOTES
22

3+
## 7.1.0 (July 25, 2023)
4+
5+
### FEATURES/ENHANCEMENTS:
6+
7+
* APPSEC
8+
* Added Bot Management API Support
9+
* Challenge Injection Rules - read, update
10+
* Add `CreateSecurityPolicyWithDefaultProtections` method to the `SecurityPolicy` interface to support creating a security policy with all available protections enabled.
11+
* Update marshaling of PII learning setting
12+
13+
### Deprecations
14+
15+
* Challenge Interceptions Rules has been deprecated
16+
* Deprecate the following interfaces used to maintain individual policy protections:
17+
* `ApiConstraintsProtection`
18+
* `IPGeoProtection`
19+
* `MalwareProtection`
20+
* `NetworkLayerProtection`
21+
* `RateProtection`
22+
* `ReputationProtection`
23+
* `SlowPostProtection`
24+
* `WAFProtection`
25+
* Deprecate the `CreateSecurityPolicy` method of the `SecurityPolicy` interface.
26+
327
## 7.0.0 (June 20, 2023)
428

529
### BREAKING CHANGES:

pkg/appsec/api_constraints_protection.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,16 @@ import (
1010

1111
type (
1212
// The ApiConstraintsProtection interface supports retrieving and updating API request constraints protection for a configuration and policy.
13+
// Deprecated: this interface will be removed in a future release. Use the SecurityPolicy interface instead.
1314
ApiConstraintsProtection interface {
1415
// GetAPIConstraintsProtection retrieves the current API constraints protection setting for a configuration and policy.
16+
// Deprecated: this method will be removed in a future release. Use the GetPolicyProtections method of the PolicyProtections interface instead.
1517
//
1618
// See: https://techdocs.akamai.com/application-security/reference/get-policy-protections
1719
GetAPIConstraintsProtection(ctx context.Context, params GetAPIConstraintsProtectionRequest) (*GetAPIConstraintsProtectionResponse, error)
1820

1921
// UpdateAPIConstraintsProtection updates the API constraints protection setting for a configuration and policy.
22+
// Deprecated: this method will be removed in a future release. Use the CreateSecurityPolicyWithDefaultProtections method of the SecurityPolicy interface instead.
2023
//
2124
// See: https://techdocs.akamai.com/application-security/reference/put-policy-protections
2225
UpdateAPIConstraintsProtection(ctx context.Context, params UpdateAPIConstraintsProtectionRequest) (*UpdateAPIConstraintsProtectionResponse, error)

pkg/appsec/export_configuration.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ type (
507507
} `json:"prefetch"`
508508
PragmaHeader *GetAdvancedSettingsPragmaResponse `json:"pragmaHeader,omitempty"`
509509
RequestBody *RequestBody `json:"requestBody,omitempty"`
510-
PIILearning bool `json:"piiLearning"`
510+
PIILearning *PIILearningexp `json:"piiLearning,omitempty"`
511511
}
512512

513513
// CustomDenyListexp is returned as part of GetExportConfigurationResponse.
@@ -677,6 +677,11 @@ type (
677677
EnablePathMatch bool `json:"enabled"`
678678
}
679679

680+
// PIILearningexp contains the PIILearning setting
681+
PIILearningexp struct {
682+
EnablePIILearning bool `json:"enabled"`
683+
}
684+
680685
// RequestBody is returned as part of GetExportConfigurationResponse.
681686
RequestBody struct {
682687
RequestBodyInspectionLimitInKB string `json:"requestBodyInspectionLimitInKB"`
@@ -774,6 +779,7 @@ type (
774779
CustomDenyActions []map[string]interface{} `json:"customDenyActions,omitempty"`
775780
ServeAlternateActions []map[string]interface{} `json:"serveAlternateActions,omitempty"`
776781
ChallengeInterceptionRules map[string]interface{} `json:"challengeInterceptionRules,omitempty"`
782+
ChallengeInjectionRules map[string]interface{} `json:"challengeInjectionRules,omitempty"`
777783
}
778784

779785
// BotManagement is returned as part of GetExportConfigurationResponse

pkg/appsec/ip_geo_protection.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,22 @@ import (
1010

1111
type (
1212
// The IPGeoProtection interface supports retrieving and updating IPGeo protection for a configuration and policy.
13+
// Deprecated: this interface will be removed in a future release. Use the SecurityPolicy interface instead.
1314
IPGeoProtection interface {
1415
// GetIPGeoProtections retrieves the current IPGeo protection protection setting for a configuration and policy.
16+
// Deprecated: this method will be removed in a future release. Use the GetPolicyProtections method of the PolicyProtections interface instead.
1517
//
1618
// See: https://techdocs.akamai.com/application-security/reference/get-policy-protections
17-
// Deprecated: this method will be removed in a future release. Use GetIPGeoProtection instead.
1819
GetIPGeoProtections(ctx context.Context, params GetIPGeoProtectionsRequest) (*GetIPGeoProtectionsResponse, error)
1920

2021
// GetIPGeoProtection retrieves the current IPGeo protection protection setting for a configuration and policy.
22+
// Deprecated: this method will be removed in a future release. Use the GetPolicyProtections method of the PolicyProtections interface instead.
2123
//
2224
// See: https://techdocs.akamai.com/application-security/reference/get-policy-protections
2325
GetIPGeoProtection(ctx context.Context, params GetIPGeoProtectionRequest) (*GetIPGeoProtectionResponse, error)
2426

2527
// UpdateIPGeoProtection updates the IPGeo protection protection setting for a configuration and policy.
28+
// Deprecated: this method will be removed in a future release. Use the CreateSecurityPolicyWithDefaultProtections method of the SecurityPolicy interface instead.
2629
//
2730
// See: https://techdocs.akamai.com/application-security/reference/put-policy-protections
2831
UpdateIPGeoProtection(ctx context.Context, params UpdateIPGeoProtectionRequest) (*UpdateIPGeoProtectionResponse, error)

pkg/appsec/malware_protection.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,16 @@ import (
1010

1111
type (
1212
// The MalwareProtection interface supports retrieving and updating malware protection for a configuration and policy.
13+
// Deprecated: this interface will be removed in a future release. Use the SecurityPolicy interface instead.
1314
MalwareProtection interface {
1415
// GetMalwareProtection retrieves the current malware protection setting for a configuration and policy.
16+
// Deprecated: this method will be removed in a future release. Use the GetPolicyProtections method of the PolicyProtections interface instead.
1517
//
1618
// See: https://techdocs.akamai.com/application-security/reference/get-policy-malware
1719
GetMalwareProtection(ctx context.Context, params GetMalwareProtectionRequest) (*GetMalwareProtectionResponse, error)
1820

1921
// UpdateMalwareProtection updates the malware protection setting for a configuration and policy.
22+
// Deprecated: this method will be removed in a future release. Use the CreateSecurityPolicyWithDefaultProtections method of the SecurityPolicy interface instead.
2023
//
2124
// See: https://techdocs.akamai.com/application-security/reference/put-policy-malware
2225
UpdateMalwareProtection(ctx context.Context, params UpdateMalwareProtectionRequest) (*UpdateMalwareProtectionResponse, error)

pkg/appsec/mocks.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1261,6 +1261,14 @@ func (m *Mock) CreateSecurityPolicy(ctx context.Context, req CreateSecurityPolic
12611261
return args.Get(0).(*CreateSecurityPolicyResponse), args.Error(1)
12621262
}
12631263

1264+
func (m *Mock) CreateSecurityPolicyWithDefaultProtections(ctx context.Context, req CreateSecurityPolicyWithDefaultProtectionsRequest) (*CreateSecurityPolicyResponse, error) {
1265+
args := m.Called(ctx, req)
1266+
if args.Get(0) == nil {
1267+
return nil, args.Error(1)
1268+
}
1269+
return args.Get(0).(*CreateSecurityPolicyResponse), args.Error(1)
1270+
}
1271+
12641272
func (m *Mock) CreateReputationProfile(ctx context.Context, req CreateReputationProfileRequest) (*CreateReputationProfileResponse, error) {
12651273
args := m.Called(ctx, req)
12661274
if args.Get(0) == nil {

pkg/appsec/network_layer_protection.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,30 @@ import (
1010

1111
type (
1212
// The NetworkLayerProtection interface supports retrieving and updating network layer protection for a configuration and policy.
13+
// Deprecated: this interface will be removed in a future release. Use the SecurityPolicy interface instead.
1314
NetworkLayerProtection interface {
1415
// GetNetworkLayerProtections retrieves the current network layer protection setting for a configuration and policy.
16+
// Deprecated: this method will be removed in a future release. Use the GetPolicyProtections method of the PolicyProtections interface instead.
1517
//
1618
// See: https://techdocs.akamai.com/application-security/reference/get-policy-protections
17-
// Deprecated: this method will be removed in a future release. Use GetNetworkLayerProtection instead.
1819
GetNetworkLayerProtections(ctx context.Context, params GetNetworkLayerProtectionsRequest) (*GetNetworkLayerProtectionsResponse, error)
1920

2021
// GetNetworkLayerProtection retrieves the current network layer protection setting for a configuration and policy.
22+
// Deprecated: this method will be removed in a future release. Use the GetPolicyProtections method of the PolicyProtections interface instead.
2123
//
2224
// See: https://techdocs.akamai.com/application-security/reference/get-policy-protections
2325
GetNetworkLayerProtection(ctx context.Context, params GetNetworkLayerProtectionRequest) (*GetNetworkLayerProtectionResponse, error)
2426

2527
// UpdateNetworkLayerProtection updates the network layer protection setting for a configuration and policy.
28+
// Deprecated: this method will be removed in a future release. Use the CreateSecurityPolicyWithDefaultProtections method of the SecurityPolicy interface instead.
2629
//
2730
// See: https://techdocs.akamai.com/application-security/reference/put-policy-protections
2831
UpdateNetworkLayerProtection(ctx context.Context, params UpdateNetworkLayerProtectionRequest) (*UpdateNetworkLayerProtectionResponse, error)
2932

3033
// RemoveNetworkLayerProtection removes network layer protection for a configuration and policy.
34+
// Deprecated: this method will be removed in a future release. Use the CreateSecurityPolicyWithDefaultProtections method of the SecurityPolicy interface instead.
3135
//
3236
// See: https://techdocs.akamai.com/application-security/reference/put-policy-protections
33-
// Deprecated: this method will be removed in a future release. Use UpdateNetworkLayerProtection instead.
3437
RemoveNetworkLayerProtection(ctx context.Context, params RemoveNetworkLayerProtectionRequest) (*RemoveNetworkLayerProtectionResponse, error)
3538
}
3639

pkg/appsec/rate_protection.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,22 @@ import (
1010

1111
type (
1212
// The RateProtection interface supports retrieving and updating rate protection for a configuration and policy.
13+
// Deprecated: this interface will be removed in a future release. Use the SecurityPolicy interface instead.
1314
RateProtection interface {
1415
// GetRateProtections retrieves the current rate protection setting for a configuration and policy.
16+
// Deprecated: this method will be removed in a future release. Use the GetPolicyProtections method of the PolicyProtections interface instead.
1517
//
1618
// See: https://techdocs.akamai.com/application-security/reference/get-policy-protections
17-
// Deprecated: this method will be removed in a future release. Use GetRateProtection instead.
1819
GetRateProtections(ctx context.Context, params GetRateProtectionsRequest) (*GetRateProtectionsResponse, error)
1920

2021
// GetRateProtection retrieves the current rate protection setting for a configuration and policy.
22+
// Deprecated: this method will be removed in a future release. Use the GetPolicyProtections method of the PolicyProtections interface instead.
2123
//
2224
// See: https://techdocs.akamai.com/application-security/reference/get-policy-protections
2325
GetRateProtection(ctx context.Context, params GetRateProtectionRequest) (*GetRateProtectionResponse, error)
2426

2527
// UpdateRateProtection updates the rate protection setting for a configuration and policy.
28+
// Deprecated: this method will be removed in a future release. Use the CreateSecurityPolicyWithDefaultProtections method of the SecurityPolicy interface instead.
2629
//
2730
// See: https://techdocs.akamai.com/application-security/reference/put-policy-protections
2831
UpdateRateProtection(ctx context.Context, params UpdateRateProtectionRequest) (*UpdateRateProtectionResponse, error)

pkg/appsec/reputation_protection.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,31 @@ import (
1010

1111
type (
1212
// The ReputationProtection interface supports retrieving and updating reputation protection for a configuration and policy.
13+
// Deprecated: this interface will be removed in a future release. Use the SecurityPolicy interface instead.
1314
ReputationProtection interface {
1415
// GetReputationProtections retrieves the current reputation protection setting for a configuration and policy.
16+
// Deprecated: this method will be removed in a future release. Use the GetPolicyProtections method of the PolicyProtections interface instead.
1517
//
1618
// See: https://techdocs.akamai.com/application-security/reference/get-policy-protections
1719
// Deprecated: this method will be removed in a future release. Use GetReputationProtection instead.
1820
GetReputationProtections(ctx context.Context, params GetReputationProtectionsRequest) (*GetReputationProtectionsResponse, error)
1921

2022
// GetReputationProtection retrieves the current reputation protection setting for a configuration and policy.
23+
// Deprecated: this method will be removed in a future release. Use the GetPolicyProtections method of the PolicyProtections interface instead.
2124
//
2225
// See: https://techdocs.akamai.com/application-security/reference/get-policy-protections
2326
GetReputationProtection(ctx context.Context, params GetReputationProtectionRequest) (*GetReputationProtectionResponse, error)
2427

2528
// UpdateReputationProtection updates the reputation protection setting for a configuration and policy.
29+
// Deprecated: this method will be removed in a future release. Use the CreateSecurityPolicyWithDefaultProtections method of the SecurityPolicy interface instead.
2630
//
2731
// See: https://techdocs.akamai.com/application-security/reference/put-policy-protections
2832
UpdateReputationProtection(ctx context.Context, params UpdateReputationProtectionRequest) (*UpdateReputationProtectionResponse, error)
2933

3034
// RemoveReputationProtection removes reputation protection for a configuration and policy.
35+
// Deprecated: this method will be removed in a future release. Use the CreateSecurityPolicyWithDefaultProtections method of the SecurityPolicy interface instead.
3136
//
3237
// See: https://techdocs.akamai.com/application-security/reference/put-policy-protections
33-
// Deprecated: this method will be removed in a future release. Use UpdateReputationProtection instead.
3438
RemoveReputationProtection(ctx context.Context, params RemoveReputationProtectionRequest) (*RemoveReputationProtectionResponse, error)
3539
}
3640

0 commit comments

Comments
 (0)