Skip to content

Commit e5e496a

Browse files
AWS WAF can now suggest protection packs for you based on the application information you provide when you create a webACL.
1 parent dacfbd3 commit e5e496a

14 files changed

+677
-2
lines changed

generator/ServiceModels/wafv2/wafv2-2019-07-29.api.json

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,6 +1027,25 @@
10271027
"Statements":{"shape":"Statements"}
10281028
}
10291029
},
1030+
"ApplicationAttribute":{
1031+
"type":"structure",
1032+
"members":{
1033+
"Name":{"shape":"AttributeName"},
1034+
"Values":{"shape":"AttributeValues"}
1035+
}
1036+
},
1037+
"ApplicationAttributes":{
1038+
"type":"list",
1039+
"member":{"shape":"ApplicationAttribute"},
1040+
"max":10,
1041+
"min":1
1042+
},
1043+
"ApplicationConfig":{
1044+
"type":"structure",
1045+
"members":{
1046+
"Attributes":{"shape":"ApplicationAttributes"}
1047+
}
1048+
},
10301049
"AsnList":{
10311050
"type":"list",
10321051
"member":{"shape":"ASN"},
@@ -1072,6 +1091,23 @@
10721091
"RequestBody":{"shape":"RequestBody"}
10731092
}
10741093
},
1094+
"AttributeName":{
1095+
"type":"string",
1096+
"max":64,
1097+
"min":1,
1098+
"pattern":"^[\\w\\-]+$"
1099+
},
1100+
"AttributeValue":{
1101+
"type":"string",
1102+
"max":64,
1103+
"min":1
1104+
},
1105+
"AttributeValues":{
1106+
"type":"list",
1107+
"member":{"shape":"AttributeValue"},
1108+
"max":10,
1109+
"min":1
1110+
},
10751111
"BlockAction":{
10761112
"type":"structure",
10771113
"members":{
@@ -1614,7 +1650,8 @@
16141650
"ChallengeConfig":{"shape":"ChallengeConfig"},
16151651
"TokenDomains":{"shape":"TokenDomains"},
16161652
"AssociationConfig":{"shape":"AssociationConfig"},
1617-
"OnSourceDDoSProtectionConfig":{"shape":"OnSourceDDoSProtectionConfig"}
1653+
"OnSourceDDoSProtectionConfig":{"shape":"OnSourceDDoSProtectionConfig"},
1654+
"ApplicationConfig":{"shape":"ApplicationConfig"}
16181655
}
16191656
},
16201657
"CreateWebACLResponse":{
@@ -4537,7 +4574,8 @@
45374574
"TokenDomains":{"shape":"TokenDomains"},
45384575
"AssociationConfig":{"shape":"AssociationConfig"},
45394576
"RetrofittedByFirewallManager":{"shape":"Boolean"},
4540-
"OnSourceDDoSProtectionConfig":{"shape":"OnSourceDDoSProtectionConfig"}
4577+
"OnSourceDDoSProtectionConfig":{"shape":"OnSourceDDoSProtectionConfig"},
4578+
"ApplicationConfig":{"shape":"ApplicationConfig"}
45414579
}
45424580
},
45434581
"WebACLSummaries":{

generator/ServiceModels/wafv2/wafv2-2019-07-29.docs.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,25 @@
179179
"Statement$AndStatement": "<p>A logical rule statement used to combine other rule statements with AND logic. You provide more than one <a>Statement</a> within the <code>AndStatement</code>. </p>"
180180
}
181181
},
182+
"ApplicationAttribute": {
183+
"base": "<p>Application details defined during the web ACL creation process. Application attributes help WAF give recommendations for protection packs.</p>",
184+
"refs": {
185+
"ApplicationAttributes$member": null
186+
}
187+
},
188+
"ApplicationAttributes": {
189+
"base": null,
190+
"refs": {
191+
"ApplicationConfig$Attributes": "<p>Contains the attribute name and a list of values for that attribute.</p>"
192+
}
193+
},
194+
"ApplicationConfig": {
195+
"base": "<p>A list of <code>ApplicationAttribute</code>s that contains information about the application.</p>",
196+
"refs": {
197+
"CreateWebACLRequest$ApplicationConfig": "<p>Configures the ability for the WAF console to store and retrieve application attributes during the web ACL creation process. Application attributes help WAF give recommendations for protection packs.</p>",
198+
"WebACL$ApplicationConfig": "<p>Returns a list of <code>ApplicationAttribute</code>s.</p>"
199+
}
200+
},
182201
"AsnList": {
183202
"base": null,
184203
"refs": {
@@ -213,6 +232,24 @@
213232
"WebACL$AssociationConfig": "<p>Specifies custom configurations for the associations between the web ACL and protected resources. </p> <p>Use this to customize the maximum size of the request body that your protected resources forward to WAF for inspection. You can customize this setting for CloudFront, API Gateway, Amazon Cognito, App Runner, or Verified Access resources. The default setting is 16 KB (16,384 bytes). </p> <note> <p>You are charged additional fees when your protected resources forward body sizes that are larger than the default. For more information, see <a href=\"http://aws.amazon.com/waf/pricing/\">WAF Pricing</a>.</p> </note> <p>For Application Load Balancer and AppSync, the limit is fixed at 8 KB (8,192 bytes).</p>"
214233
}
215234
},
235+
"AttributeName": {
236+
"base": null,
237+
"refs": {
238+
"ApplicationAttribute$Name": "<p>Specifies the attribute name.</p>"
239+
}
240+
},
241+
"AttributeValue": {
242+
"base": null,
243+
"refs": {
244+
"AttributeValues$member": null
245+
}
246+
},
247+
"AttributeValues": {
248+
"base": null,
249+
"refs": {
250+
"ApplicationAttribute$Values": "<p>Specifies the attribute value.</p>"
251+
}
252+
},
216253
"BlockAction": {
217254
"base": "<p>Specifies that WAF should block the request and optionally defines additional custom handling for the response to the web request.</p> <p>This is used in the context of other settings, for example to specify values for <a>RuleAction</a> and web ACL <a>DefaultAction</a>. </p>",
218255
"refs": {

generator/ServiceModels/wafv2/wafv2-2019-07-29.normal.json

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1155,6 +1155,36 @@
11551155
},
11561156
"documentation":"<p>A logical rule statement used to combine other rule statements with AND logic. You provide more than one <a>Statement</a> within the <code>AndStatement</code>. </p>"
11571157
},
1158+
"ApplicationAttribute":{
1159+
"type":"structure",
1160+
"members":{
1161+
"Name":{
1162+
"shape":"AttributeName",
1163+
"documentation":"<p>Specifies the attribute name.</p>"
1164+
},
1165+
"Values":{
1166+
"shape":"AttributeValues",
1167+
"documentation":"<p>Specifies the attribute value.</p>"
1168+
}
1169+
},
1170+
"documentation":"<p>Application details defined during the web ACL creation process. Application attributes help WAF give recommendations for protection packs.</p>"
1171+
},
1172+
"ApplicationAttributes":{
1173+
"type":"list",
1174+
"member":{"shape":"ApplicationAttribute"},
1175+
"max":10,
1176+
"min":1
1177+
},
1178+
"ApplicationConfig":{
1179+
"type":"structure",
1180+
"members":{
1181+
"Attributes":{
1182+
"shape":"ApplicationAttributes",
1183+
"documentation":"<p>Contains the attribute name and a list of values for that attribute.</p>"
1184+
}
1185+
},
1186+
"documentation":"<p>A list of <code>ApplicationAttribute</code>s that contains information about the application.</p>"
1187+
},
11581188
"AsnList":{
11591189
"type":"list",
11601190
"member":{"shape":"ASN"},
@@ -1217,6 +1247,23 @@
12171247
},
12181248
"documentation":"<p>Specifies custom configurations for the associations between the web ACL and protected resources. </p> <p>Use this to customize the maximum size of the request body that your protected resources forward to WAF for inspection. You can customize this setting for CloudFront, API Gateway, Amazon Cognito, App Runner, or Verified Access resources. The default setting is 16 KB (16,384 bytes). </p> <note> <p>You are charged additional fees when your protected resources forward body sizes that are larger than the default. For more information, see <a href=\"http://aws.amazon.com/waf/pricing/\">WAF Pricing</a>.</p> </note> <p>For Application Load Balancer and AppSync, the limit is fixed at 8 KB (8,192 bytes).</p>"
12191249
},
1250+
"AttributeName":{
1251+
"type":"string",
1252+
"max":64,
1253+
"min":1,
1254+
"pattern":"^[\\w\\-]+$"
1255+
},
1256+
"AttributeValue":{
1257+
"type":"string",
1258+
"max":64,
1259+
"min":1
1260+
},
1261+
"AttributeValues":{
1262+
"type":"list",
1263+
"member":{"shape":"AttributeValue"},
1264+
"max":10,
1265+
"min":1
1266+
},
12201267
"BlockAction":{
12211268
"type":"structure",
12221269
"members":{
@@ -1987,6 +2034,10 @@
19872034
"OnSourceDDoSProtectionConfig":{
19882035
"shape":"OnSourceDDoSProtectionConfig",
19892036
"documentation":"<p>Specifies the type of DDoS protection to apply to web request data for a web ACL. For most scenarios, it is recommended to use the default protection level, <code>ACTIVE_UNDER_DDOS</code>. If a web ACL is associated with multiple Application Load Balancers, the changes you make to DDoS protection in that web ACL will apply to all associated Application Load Balancers.</p>"
2037+
},
2038+
"ApplicationConfig":{
2039+
"shape":"ApplicationConfig",
2040+
"documentation":"<p>Configures the ability for the WAF console to store and retrieve application attributes during the web ACL creation process. Application attributes help WAF give recommendations for protection packs.</p>"
19902041
}
19912042
}
19922043
},
@@ -6757,6 +6808,10 @@
67576808
"OnSourceDDoSProtectionConfig":{
67586809
"shape":"OnSourceDDoSProtectionConfig",
67596810
"documentation":"<p>Configures the level of DDoS protection that applies to web ACLs associated with Application Load Balancers.</p>"
6811+
},
6812+
"ApplicationConfig":{
6813+
"shape":"ApplicationConfig",
6814+
"documentation":"<p>Returns a list of <code>ApplicationAttribute</code>s.</p>"
67606815
}
67616816
},
67626817
"documentation":"<p> A web ACL defines a collection of rules to use to inspect and control web requests. Each rule has a statement that defines what to look for in web requests and an action that WAF applies to requests that match the statement. In the web ACL, you assign a default action to take (allow, block) for any request that does not match any of the rules. The rules in a web ACL can be a combination of the types <a>Rule</a>, <a>RuleGroup</a>, and managed rule group. You can associate a web ACL with one or more Amazon Web Services resources to protect. The resource types include Amazon CloudFront distribution, Amazon API Gateway REST API, Application Load Balancer, AppSync GraphQL API, Amazon Cognito user pool, App Runner service, Amplify application, and Amazon Web Services Verified Access instance. </p>"

sdk/code-analysis/ServiceAnalysis/WAFV2/Generated/PropertyValueRules.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -862,6 +862,12 @@
862862
<property>Amazon.WAFV2.Model.APIKeySummary.Version</property>
863863
<min>0</min>
864864
</property-value-rule>
865+
<property-value-rule>
866+
<property>Amazon.WAFV2.Model.ApplicationAttribute.Name</property>
867+
<min>1</min>
868+
<max>64</max>
869+
<pattern>^[\w\-]+$</pattern>
870+
</property-value-rule>
865871
<property-value-rule>
866872
<property>Amazon.WAFV2.Model.AWSManagedRulesACFPRuleSet.CreationPath</property>
867873
<min>1</min>
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License").
5+
* You may not use this file except in compliance with the License.
6+
* A copy of the License is located at
7+
*
8+
* http://aws.amazon.com/apache2.0
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+
16+
/*
17+
* Do not modify this file. This file is generated from the wafv2-2019-07-29.normal.json service model.
18+
*/
19+
using System;
20+
using System.Collections.Generic;
21+
using System.Xml.Serialization;
22+
using System.Text;
23+
using System.IO;
24+
using System.Net;
25+
26+
using Amazon.Runtime;
27+
using Amazon.Runtime.Internal;
28+
29+
#pragma warning disable CS0612,CS0618,CS1570
30+
namespace Amazon.WAFV2.Model
31+
{
32+
/// <summary>
33+
/// Application details defined during the web ACL creation process. Application attributes
34+
/// help WAF give recommendations for protection packs.
35+
/// </summary>
36+
public partial class ApplicationAttribute
37+
{
38+
private string _name;
39+
private List<string> _values = AWSConfigs.InitializeCollections ? new List<string>() : null;
40+
41+
/// <summary>
42+
/// Gets and sets the property Name.
43+
/// <para>
44+
/// Specifies the attribute name.
45+
/// </para>
46+
/// </summary>
47+
[AWSProperty(Min=1, Max=64)]
48+
public string Name
49+
{
50+
get { return this._name; }
51+
set { this._name = value; }
52+
}
53+
54+
// Check to see if Name property is set
55+
internal bool IsSetName()
56+
{
57+
return this._name != null;
58+
}
59+
60+
/// <summary>
61+
/// Gets and sets the property Values.
62+
/// <para>
63+
/// Specifies the attribute value.
64+
/// </para>
65+
/// </summary>
66+
[AWSProperty(Min=1, Max=10)]
67+
public List<string> Values
68+
{
69+
get { return this._values; }
70+
set { this._values = value; }
71+
}
72+
73+
// Check to see if Values property is set
74+
internal bool IsSetValues()
75+
{
76+
return this._values != null && (this._values.Count > 0 || !AWSConfigs.InitializeCollections);
77+
}
78+
79+
}
80+
}
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License").
5+
* You may not use this file except in compliance with the License.
6+
* A copy of the License is located at
7+
*
8+
* http://aws.amazon.com/apache2.0
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+
16+
/*
17+
* Do not modify this file. This file is generated from the wafv2-2019-07-29.normal.json service model.
18+
*/
19+
using System;
20+
using System.Collections.Generic;
21+
using System.Xml.Serialization;
22+
using System.Text;
23+
using System.IO;
24+
using System.Net;
25+
26+
using Amazon.Runtime;
27+
using Amazon.Runtime.Internal;
28+
29+
#pragma warning disable CS0612,CS0618,CS1570
30+
namespace Amazon.WAFV2.Model
31+
{
32+
/// <summary>
33+
/// A list of <c>ApplicationAttribute</c>s that contains information about the application.
34+
/// </summary>
35+
public partial class ApplicationConfig
36+
{
37+
private List<ApplicationAttribute> _attributes = AWSConfigs.InitializeCollections ? new List<ApplicationAttribute>() : null;
38+
39+
/// <summary>
40+
/// Gets and sets the property Attributes.
41+
/// <para>
42+
/// Contains the attribute name and a list of values for that attribute.
43+
/// </para>
44+
/// </summary>
45+
[AWSProperty(Min=1, Max=10)]
46+
public List<ApplicationAttribute> Attributes
47+
{
48+
get { return this._attributes; }
49+
set { this._attributes = value; }
50+
}
51+
52+
// Check to see if Attributes property is set
53+
internal bool IsSetAttributes()
54+
{
55+
return this._attributes != null && (this._attributes.Count > 0 || !AWSConfigs.InitializeCollections);
56+
}
57+
58+
}
59+
}

sdk/src/Services/WAFV2/Generated/Model/CreateWebACLRequest.cs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ namespace Amazon.WAFV2.Model
4949
/// </summary>
5050
public partial class CreateWebACLRequest : AmazonWAFV2Request
5151
{
52+
private ApplicationConfig _applicationConfig;
5253
private AssociationConfig _associationConfig;
5354
private CaptchaConfig _captchaConfig;
5455
private ChallengeConfig _challengeConfig;
@@ -64,6 +65,26 @@ public partial class CreateWebACLRequest : AmazonWAFV2Request
6465
private List<string> _tokenDomains = AWSConfigs.InitializeCollections ? new List<string>() : null;
6566
private VisibilityConfig _visibilityConfig;
6667

68+
/// <summary>
69+
/// Gets and sets the property ApplicationConfig.
70+
/// <para>
71+
/// Configures the ability for the WAF console to store and retrieve application attributes
72+
/// during the web ACL creation process. Application attributes help WAF give recommendations
73+
/// for protection packs.
74+
/// </para>
75+
/// </summary>
76+
public ApplicationConfig ApplicationConfig
77+
{
78+
get { return this._applicationConfig; }
79+
set { this._applicationConfig = value; }
80+
}
81+
82+
// Check to see if ApplicationConfig property is set
83+
internal bool IsSetApplicationConfig()
84+
{
85+
return this._applicationConfig != null;
86+
}
87+
6788
/// <summary>
6889
/// Gets and sets the property AssociationConfig.
6990
/// <para>

0 commit comments

Comments
 (0)