Skip to content

Commit e4411e6

Browse files
author
awstools
committed
feat(client-fms): Update AWS WAF policy - add the option to retrofit existing web ACLs instead of creating all new web ACLs.
1 parent 52c2bba commit e4411e6

File tree

5 files changed

+144
-13
lines changed

5 files changed

+144
-13
lines changed

clients/client-fms/src/commands/GetComplianceDetailCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export interface GetComplianceDetailCommandOutput extends GetComplianceDetailRes
5151
* // Violators: [ // ComplianceViolators
5252
* // { // ComplianceViolator
5353
* // ResourceId: "STRING_VALUE",
54-
* // ViolationReason: "WEB_ACL_MISSING_RULE_GROUP" || "RESOURCE_MISSING_WEB_ACL" || "RESOURCE_INCORRECT_WEB_ACL" || "RESOURCE_MISSING_SHIELD_PROTECTION" || "RESOURCE_MISSING_WEB_ACL_OR_SHIELD_PROTECTION" || "RESOURCE_MISSING_SECURITY_GROUP" || "RESOURCE_VIOLATES_AUDIT_SECURITY_GROUP" || "SECURITY_GROUP_UNUSED" || "SECURITY_GROUP_REDUNDANT" || "FMS_CREATED_SECURITY_GROUP_EDITED" || "MISSING_FIREWALL" || "MISSING_FIREWALL_SUBNET_IN_AZ" || "MISSING_EXPECTED_ROUTE_TABLE" || "NETWORK_FIREWALL_POLICY_MODIFIED" || "FIREWALL_SUBNET_IS_OUT_OF_SCOPE" || "INTERNET_GATEWAY_MISSING_EXPECTED_ROUTE" || "FIREWALL_SUBNET_MISSING_EXPECTED_ROUTE" || "UNEXPECTED_FIREWALL_ROUTES" || "UNEXPECTED_TARGET_GATEWAY_ROUTES" || "TRAFFIC_INSPECTION_CROSSES_AZ_BOUNDARY" || "INVALID_ROUTE_CONFIGURATION" || "MISSING_TARGET_GATEWAY" || "INTERNET_TRAFFIC_NOT_INSPECTED" || "BLACK_HOLE_ROUTE_DETECTED" || "BLACK_HOLE_ROUTE_DETECTED_IN_FIREWALL_SUBNET" || "RESOURCE_MISSING_DNS_FIREWALL" || "ROUTE_HAS_OUT_OF_SCOPE_ENDPOINT" || "FIREWALL_SUBNET_MISSING_VPCE_ENDPOINT" || "INVALID_NETWORK_ACL_ENTRY",
54+
* // ViolationReason: "WEB_ACL_MISSING_RULE_GROUP" || "RESOURCE_MISSING_WEB_ACL" || "RESOURCE_INCORRECT_WEB_ACL" || "RESOURCE_MISSING_SHIELD_PROTECTION" || "RESOURCE_MISSING_WEB_ACL_OR_SHIELD_PROTECTION" || "RESOURCE_MISSING_SECURITY_GROUP" || "RESOURCE_VIOLATES_AUDIT_SECURITY_GROUP" || "SECURITY_GROUP_UNUSED" || "SECURITY_GROUP_REDUNDANT" || "FMS_CREATED_SECURITY_GROUP_EDITED" || "MISSING_FIREWALL" || "MISSING_FIREWALL_SUBNET_IN_AZ" || "MISSING_EXPECTED_ROUTE_TABLE" || "NETWORK_FIREWALL_POLICY_MODIFIED" || "FIREWALL_SUBNET_IS_OUT_OF_SCOPE" || "INTERNET_GATEWAY_MISSING_EXPECTED_ROUTE" || "FIREWALL_SUBNET_MISSING_EXPECTED_ROUTE" || "UNEXPECTED_FIREWALL_ROUTES" || "UNEXPECTED_TARGET_GATEWAY_ROUTES" || "TRAFFIC_INSPECTION_CROSSES_AZ_BOUNDARY" || "INVALID_ROUTE_CONFIGURATION" || "MISSING_TARGET_GATEWAY" || "INTERNET_TRAFFIC_NOT_INSPECTED" || "BLACK_HOLE_ROUTE_DETECTED" || "BLACK_HOLE_ROUTE_DETECTED_IN_FIREWALL_SUBNET" || "RESOURCE_MISSING_DNS_FIREWALL" || "ROUTE_HAS_OUT_OF_SCOPE_ENDPOINT" || "FIREWALL_SUBNET_MISSING_VPCE_ENDPOINT" || "INVALID_NETWORK_ACL_ENTRY" || "WEB_ACL_CONFIGURATION_OR_SCOPE_OF_USE",
5555
* // ResourceType: "STRING_VALUE",
5656
* // Metadata: { // ComplianceViolatorMetadata
5757
* // "<keys>": "STRING_VALUE",

clients/client-fms/src/commands/GetViolationDetailsCommand.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,16 @@ export interface GetViolationDetailsCommandOutput extends GetViolationDetailsRes
581581
* // },
582582
* // ],
583583
* // },
584+
* // WebACLHasIncompatibleConfigurationViolation: { // WebACLHasIncompatibleConfigurationViolation
585+
* // WebACLArn: "STRING_VALUE",
586+
* // Description: "STRING_VALUE",
587+
* // },
588+
* // WebACLHasOutOfScopeResourcesViolation: { // WebACLHasOutOfScopeResourcesViolation
589+
* // WebACLArn: "STRING_VALUE",
590+
* // OutOfScopeResourceList: [ // ResourceArnList
591+
* // "STRING_VALUE",
592+
* // ],
593+
* // },
584594
* // },
585595
* // ],
586596
* // ResourceTags: [ // TagList

clients/client-fms/src/models/models_0.ts

Lines changed: 58 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -975,6 +975,7 @@ export const ViolationReason = {
975975
TrafficInspectionCrossesAZBoundary: "TRAFFIC_INSPECTION_CROSSES_AZ_BOUNDARY",
976976
UnexpectedFirewallRoutes: "UNEXPECTED_FIREWALL_ROUTES",
977977
UnexpectedTargetGatewayRoutes: "UNEXPECTED_TARGET_GATEWAY_ROUTES",
978+
WebACLConfigurationOrScopeOfUse: "WEB_ACL_CONFIGURATION_OR_SCOPE_OF_USE",
978979
WebAclMissingRuleGroup: "WEB_ACL_MISSING_RULE_GROUP",
979980
} as const;
980981

@@ -1511,9 +1512,7 @@ export interface SecurityServicePolicyData {
15111512
* <p>Example: <code>SECURITY_GROUPS_COMMON</code>
15121513
* </p>
15131514
* <p>
1514-
* <code>"\{\"type\":\"SECURITY_GROUPS_COMMON\",\"revertManualSecurityGroupChanges\":false,\"exclusiveResourceSecurityGroupManagement\":false,
1515-
* \"applyToAllEC2InstanceENIs\":false,\"securityGroups\":[\{\"id\":\"
1516-
* sg-000e55995d61a06bd\"\}]\}"</code>
1515+
* <code>"\{\"type\":\"SECURITY_GROUPS_COMMON\",\"securityGroups\":[\{\"id\":\"sg-03b1f67d69ed00197\"\}],\"revertManualSecurityGroupChanges\":true,\"exclusiveResourceSecurityGroupManagement\":true,\"applyToAllEC2InstanceENIs\":false,\"includeSharedVPC\":true,\"enableSecurityGroupReferencesDistribution\":true\}"</code>
15171516
* </p>
15181517
* </li>
15191518
* <li>
@@ -1542,7 +1541,7 @@ export interface SecurityServicePolicyData {
15421541
* <p>Example: <code>SECURITY_GROUPS_CONTENT_AUDIT</code>
15431542
* </p>
15441543
* <p>
1545-
* <code>"\{\"type\":\"SECURITY_GROUPS_CONTENT_AUDIT\",\"securityGroups\":[\{\"id\":\"sg-000e55995d61a06bd\"\}],\"securityGroupAction\":\{\"type\":\"ALLOW\"\}\}"</code>
1544+
* <code>"\{\"type\":\"SECURITY_GROUPS_CONTENT_AUDIT\",\"preManagedOptions\":[\{\"denyProtocolAllValue\":true\},\{\"auditSgDirection\":\{\"type\":\"ALL\"\}\}],\"securityGroups\":[\{\"id\":\"sg-049b2393a25468971\"\}],\"securityGroupAction\":\{\"type\":\"ALLOW\"\}\}"</code>
15461545
* </p>
15471546
* <p>The security group action for content audit can be <code>ALLOW</code> or
15481547
* <code>DENY</code>. For <code>ALLOW</code>, all in-scope security group rules must
@@ -1554,7 +1553,7 @@ export interface SecurityServicePolicyData {
15541553
* <p>Example: <code>SECURITY_GROUPS_USAGE_AUDIT</code>
15551554
* </p>
15561555
* <p>
1557-
* <code>"\{\"type\":\"SECURITY_GROUPS_USAGE_AUDIT\",\"deleteUnusedSecurityGroups\":true,\"coalesceRedundantSecurityGroups\":true\}"</code>
1556+
* <code>"\{\"type\":\"SECURITY_GROUPS_USAGE_AUDIT\",\"deleteUnusedSecurityGroups\":true,\"coalesceRedundantSecurityGroups\":true,\"optionalDelayForUnusedInMinutes\":60\}"</code>
15581557
* </p>
15591558
* </li>
15601559
* <li>
@@ -1659,7 +1658,7 @@ export interface SecurityServicePolicyData {
16591658
* <p>Example: <code>WAFV2</code> - Firewall Manager support for WAF managed rule group versioning
16601659
* </p>
16611660
* <p>
1662-
* <code>"\{\"type\":\"WAFV2\",\"preProcessRuleGroups\":[\{\"ruleGroupArn\":null,\"overrideAction\":\{\"type\":\"NONE\"\},\"managedRuleGroupIdentifier\":\{\"versionEnabled\":true,\"version\":\"Version_2.0\",\"vendorName\":\"AWS\",\"managedRuleGroupName\":\"AWSManagedRulesCommonRuleSet\"\},\"ruleGroupType\":\"ManagedRuleGroup\",\"excludeRules\":[\{\"name\":\"NoUserAgent_HEADER\"\}]\}],\"postProcessRuleGroups\":[],\"defaultAction\":\{\"type\":\"ALLOW\"\},\"overrideCustomerWebACLAssociation\":false,\"loggingConfiguration\":\{\"logDestinationConfigs\":[\"arn:aws:firehose:us-west-2:12345678912:deliverystream/aws-waf-logs-fms-admin-destination\"],\"redactedFields\":[\{\"redactedFieldType\":\"SingleHeader\",\"redactedFieldValue\":\"Cookies\"\},\{\"redactedFieldType\":\"Method\"\}]\}\}"</code>
1661+
* <code>"\{\"preProcessRuleGroups\":[\{\"ruleGroupType\":\"ManagedRuleGroup\",\"overrideAction\":\{\"type\":\"NONE\"\},\"sampledRequestsEnabled\":true,\"managedRuleGroupIdentifier\":\{\"managedRuleGroupName\":\"AWSManagedRulesAdminProtectionRuleSet\",\"vendorName\":\"AWS\",\"managedRuleGroupConfigs\":null\}\}],\"postProcessRuleGroups\":[],\"defaultAction\":\{\"type\":\"ALLOW\"\},\"customRequestHandling\":null,\"tokenDomains\":null,\"customResponse\":null,\"type\":\"WAFV2\",\"overrideCustomerWebACLAssociation\":false,\"sampledRequestsEnabledForDefaultActions\":true,\"optimizeUnassociatedWebACL\":true,\"webACLSource\":\"RETROFIT_EXISTING\"\}"</code>
16631662
* </p>
16641663
* <p>
16651664
* To use a specific version of a WAF managed rule group in your Firewall Manager policy, you must set <code>versionEnabled</code> to <code>true</code>, and set <code>version</code> to the version you'd like to use. If you don't set <code>versionEnabled</code> to <code>true</code>, or if you omit <code>versionEnabled</code>, then Firewall Manager uses the default version of the WAF managed rule group.
@@ -1683,9 +1682,7 @@ export interface SecurityServicePolicyData {
16831682
* <p>Example: <code>WAF Classic</code>
16841683
* </p>
16851684
* <p>
1686-
* <code>"\{\"type\": \"WAF\", \"ruleGroups\":
1687-
* [\{\"id\":\"12345678-1bcd-9012-efga-0987654321ab\", \"overrideAction\" : \{\"type\":
1688-
* \"COUNT\"\}\}], \"defaultAction\": \{\"type\": \"BLOCK\"\}\}"</code>
1685+
* <code>"\{\"ruleGroups\":[\{\"id\":\"78cb36c0-1b5e-4d7d-82b2-cf48d3ad9659\",\"overrideAction\":\{\"type\":\"NONE\"\}\}],\"overrideCustomerWebACLAssociation\":true,\"defaultAction\":\{\"type\":\"ALLOW\"\},\"type\":\"WAF\"\}"</code>
16891686
* </p>
16901687
* </li>
16911688
* </ul>
@@ -2305,6 +2302,9 @@ export interface GetViolationDetailsRequest {
23052302
* <p>The ID of the Firewall Manager policy that you want the details for. You can get violation details for the following policy types:</p>
23062303
* <ul>
23072304
* <li>
2305+
* <p>WAF</p>
2306+
* </li>
2307+
* <li>
23082308
* <p>DNS Firewall</p>
23092309
* </li>
23102310
* <li>
@@ -2342,6 +2342,7 @@ export interface GetViolationDetailsRequest {
23422342
/**
23432343
* <p>The resource type. This is in the format shown in the <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html">Amazon Web Services Resource Types Reference</a>.
23442344
* Supported resource types are:
2345+
* <code>AWS::WAFv2::WebACL</code>,
23452346
* <code>AWS::EC2::Instance</code>,
23462347
* <code>AWS::EC2::NetworkInterface</code>,
23472348
* <code>AWS::EC2::SecurityGroup</code>,
@@ -4257,6 +4258,42 @@ export interface ThirdPartyFirewallMissingSubnetViolation {
42574258
TargetViolationReason?: string;
42584259
}
42594260

4261+
/**
4262+
* <p>The violation details for a web ACL whose configuration is incompatible with the Firewall Manager policy. </p>
4263+
* @public
4264+
*/
4265+
export interface WebACLHasIncompatibleConfigurationViolation {
4266+
/**
4267+
* <p>The Amazon Resource Name (ARN) of the web ACL. </p>
4268+
* @public
4269+
*/
4270+
WebACLArn?: string;
4271+
4272+
/**
4273+
* <p>Information about the problems that Firewall Manager encountered with the web ACL configuration. </p>
4274+
* @public
4275+
*/
4276+
Description?: string;
4277+
}
4278+
4279+
/**
4280+
* <p>The violation details for a web ACL that's associated with at least one resource that's out of scope of the Firewall Manager policy. </p>
4281+
* @public
4282+
*/
4283+
export interface WebACLHasOutOfScopeResourcesViolation {
4284+
/**
4285+
* <p>The Amazon Resource Name (ARN) of the web ACL. </p>
4286+
* @public
4287+
*/
4288+
WebACLArn?: string;
4289+
4290+
/**
4291+
* <p>An array of Amazon Resource Name (ARN) for the resources that are out of scope of the policy and are associated with the web ACL. </p>
4292+
* @public
4293+
*/
4294+
OutOfScopeResourceList?: string[];
4295+
}
4296+
42604297
/**
42614298
* <p>Violation detail based on resource type.</p>
42624299
* @public
@@ -4413,6 +4450,18 @@ export interface ResourceViolation {
44134450
* @public
44144451
*/
44154452
PossibleRemediationActions?: PossibleRemediationActions;
4453+
4454+
/**
4455+
* <p>The violation details for a web ACL whose configuration is incompatible with the Firewall Manager policy. </p>
4456+
* @public
4457+
*/
4458+
WebACLHasIncompatibleConfigurationViolation?: WebACLHasIncompatibleConfigurationViolation;
4459+
4460+
/**
4461+
* <p>The violation details for a web ACL that's associated with at least one resource that's out of scope of the Firewall Manager policy. </p>
4462+
* @public
4463+
*/
4464+
WebACLHasOutOfScopeResourcesViolation?: WebACLHasOutOfScopeResourcesViolation;
44164465
}
44174466

44184467
/**

clients/client-fms/src/protocols/Aws_json1_1.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2372,6 +2372,8 @@ const de_PutResourceSetResponse = (output: any, context: __SerdeContext): PutRes
23722372

23732373
// de_Resource omitted.
23742374

2375+
// de_ResourceArnList omitted.
2376+
23752377
// de_ResourceIdList omitted.
23762378

23772379
// de_ResourceList omitted.
@@ -2455,6 +2457,8 @@ const de_ResourceViolation = (output: any, context: __SerdeContext): ResourceVio
24552457
ThirdPartyFirewallMissingExpectedRouteTableViolation: _json,
24562458
ThirdPartyFirewallMissingFirewallViolation: _json,
24572459
ThirdPartyFirewallMissingSubnetViolation: _json,
2460+
WebACLHasIncompatibleConfigurationViolation: _json,
2461+
WebACLHasOutOfScopeResourcesViolation: _json,
24582462
}) as any;
24592463
};
24602464

@@ -2533,6 +2537,10 @@ const de_ViolationDetail = (output: any, context: __SerdeContext): ViolationDeta
25332537
}) as any;
25342538
};
25352539

2540+
// de_WebACLHasIncompatibleConfigurationViolation omitted.
2541+
2542+
// de_WebACLHasOutOfScopeResourcesViolation omitted.
2543+
25362544
const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
25372545
httpStatusCode: output.statusCode,
25382546
requestId:

codegen/sdk-codegen/aws-models/fms.json

Lines changed: 67 additions & 3 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)