Skip to content

Commit dedc974

Browse files
CSOAR-3203 : Revise the AWS WAF integration documentation in accordance with the latest documentation updates. (#5278)
* CSOAR-3203 : modified the existing doc as per new documentation content * CSOAR-3203 : fixed minor issue * CSOAR-3203 fixed minor issues * CSOAR-3203 : implemented review comments * CSOAR-3203 : removed unwanted parameters * Updates from review * More updates from review --------- Co-authored-by: John Pipkin <[email protected]>
1 parent 87fd20d commit dedc974

File tree

2 files changed

+220
-6
lines changed
  • docs/platform-services/automation-service/app-central/integrations
  • static/img/platform-services/automation-service/app-central/integrations/aws-waf

2 files changed

+220
-6
lines changed

docs/platform-services/automation-service/app-central/integrations/aws-waf.md

Lines changed: 220 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,72 @@ import useBaseUrl from '@docusaurus/useBaseUrl';
99
***Version: 1.1
1010
Updated: March 26, 2025***
1111

12+
## Overview
13+
14+
### Purpose
15+
1216
AWS WAF is a web application firewall that helps protect web applications from attacks by allowing you to configure rules that allow, block, or monitor (count) web requests based on conditions that you define.
17+
This integration is designed to manage and retrieve WAF security configurations, including IP sets, regex pattern sets, rule groups, and web access control lists (web ACLs). It enables you to define, update, delete, and retrieve security rule assets that inspect and control web request traffic.
18+
19+
### Use cases
20+
21+
* Creating and managing IP allowlists/denylists
22+
* Defining regex-based pattern rules for request inspection
23+
* Grouping multiple rules in custom rule groups
24+
* Fetching details and summaries of rule components
25+
* Updating existing rules in response to new threats
26+
27+
### Supported versions
28+
29+
This integration supports WAFv2 API actions and works with resources.
30+
It is compatible with all standard environments where WAFv2 actions are supported.
31+
32+
### Prerequisites
33+
34+
* IAM permissions for:
35+
* `wafv2:CreateIPSet, DeleteIPSet, UpdateIPSet, GetIPSet, ListIPSets`
36+
* `wafv2:CreateRegexPatternSet, DeleteRegexPatternSet, ListRegexPatternSets`
37+
* `wafv2:CreateRuleGroup, DeleteRuleGroup, GetRuleGroup, ListRuleGroups`
38+
* `wafv2:GetWebACL, ListWebACLs, ListResourcesForWebACL`
39+
* `wafv2:GetManagedRuleSet, ListManagedRuleSets, ListAvailableManagedRuleGroups`
40+
* Proper region selection for WAFv2 API calls (`regional` or `global` scope)
41+
* API credentials with sufficient access
42+
43+
### Limitations
44+
45+
* Regex complexity may be limited by the WAF regex engine's constraints.
46+
* All changes require propagation time before taking effect (~1-2 minutes).
47+
48+
## Configure AWS WAF in Automation Service and Cloud SOAR
49+
50+
import IntegrationsAuth from '../../../../reuse/integrations-authentication.md';
51+
52+
<IntegrationsAuth/>
53+
54+
### Installation
55+
56+
[Install](/docs/platform-services/automation-service/automation-service-app-central/#install-an-integration-from-app-central) the AWS WAF application from App Central.
57+
58+
### Configuration
59+
60+
After installing the AWS WAF application, create an AWS WAF resource to begin executing actions.
61+
62+
Refer to the image below for guidance on creating an AWS WAF resource.
63+
64+
<img src={useBaseUrl('/img/platform-services/automation-service/app-central/integrations/aws-waf/aws-waf-1.png')} style={{border:'1px solid gray'}} alt="Edit Resource for AWS WAF" width="400"/>
65+
66+
Provide the following details:
67+
* Access Key
68+
* Secret Key
69+
* AWS Region
70+
* Scope
71+
* Automation Engine
72+
73+
Once the information is filled in, click on Test to quickly verify that the provided details are correct.
74+
75+
### Verification
76+
77+
To verify the integration is working, execute any Enrichment action, or once the resource is created, test the resource.
1378

1479
## Actions
1580

@@ -32,17 +97,166 @@ AWS WAF is a web application firewall that helps protect web applications from a
3297
* **List Web ACLs** (*Enrichment*) - Retrieves a list of WebACLSummary objects for the web ACLs that you manage.
3398
* **Update IP Set** (*Containment*) - Updates the specified IPSet.
3499

35-
## External Libraries
100+
## Usage
36101

37-
* [boto3](https://github.com/boto/boto3/blob/develop/LICENSE)
102+
### Basic usage
38103

39-
## Configure AWS WAF in Automation Service and Cloud SOAR
104+
* Create an IP Set (allow/block IPs).
105+
* Create a Regex Pattern Set (match request components).
106+
* Group rules using Rule Groups.
107+
* Retrieve or list existing components for monitoring or inspection.
40108

41-
import IntegrationsAuth from '../../../../reuse/integrations-authentication.md';
109+
### Advanced usage
42110

43-
<IntegrationsAuth/>
111+
Bulk Listing & Auditing: List all rule groups, regex sets, IP sets, and WebACLs and map their usage across resources.
112+
113+
## API reference
114+
115+
### Configuration
116+
117+
Each API call uses the following structure:
118+
* Method: Generally POST or GET depending on the action
119+
* Authentication: AWS Signature V4
120+
* Scope: REGIONAL or CLOUDFRONT
121+
122+
### Containment APIs
123+
124+
#### Create IP Set
125+
* Method: POST
126+
* Action: CreateIPSet
127+
* Required Parameters:
128+
* Name (string)
129+
* Scope (REGIONAL | CLOUDFRONT)
130+
* Region
131+
* IPAddressVersion (IPV4 | IPV6)
132+
* Addresses (list of IPs or CIDRs)
133+
* Description (optional)
134+
135+
```python title="Sample Request (Python)"
136+
client.create_ip_set(
137+
Name='BlockList',
138+
Scope='REGIONAL',
139+
IPAddressVersion='IPV4',
140+
Addresses=['x.x.x.x/24'],
141+
Description='Block bad IPs'
142+
)
143+
```
144+
145+
```json title="Sample Response (JSON)"
146+
{
147+
"Summary": {
148+
"Name": "BlockList",
149+
"Id": "123abcde-4567-890a-bcde-1234567890ab",
150+
"ARN": "arn:aws:wafv2:us-east-1:123456789012:regional/ipset/BlockList/123abcde-4567-890a-bcde-1234567890ab",
151+
"Description": "Block bad IPs",
152+
"LockToken": "e1b2c3d4-5678-9101-1121-314151617181"
153+
}
154+
}
155+
```
156+
157+
#### Create Regex Pattern Set
158+
* Method: POST
159+
* Action: CreateRegexPatternSet
160+
* Required Parameters:
161+
* Name, Scope, RegularExpressionList, Description (optional)
162+
163+
#### Create Rule Group
164+
* Method: POST
165+
* Action: CreateRuleGroup
166+
* Required Parameters:
167+
* Name, Scope, Capacity, Rules, VisibilityConfig
168+
169+
#### Update IP Set
170+
* Method: POST
171+
* Action: UpdateIPSet
172+
* Required Parameters:
173+
* ID, Name, Scope, Add/Remove IP Addresses
174+
175+
#### Delete IP Set / Regex Pattern Set / Rule Group
176+
* Method: POST
177+
* Action: Delete (Type)
178+
* Required Parameters:
179+
* Name, ID, Scope, Region
180+
181+
### Enrichment APIs
182+
183+
#### Get IP Set / Rule Group / Web ACL / Managed Rule Set
184+
* Method: GET
185+
* Action: Get (Type) ex: Get IP Set/Get Rule Group
186+
* Required Parameters:
187+
* Id, Name, Scope
188+
189+
#### List IP Sets / Regex Pattern Sets / Rule Groups / Web ACLs / Managed Rule Sets
190+
* Method: GET
191+
* Action: List (Type)s
192+
* Optional Parameters: Limit, NextMarker
193+
194+
#### List Resources for Web ACLs
195+
* Method: GET
196+
* Action: ListResourcesForWebACL
197+
* Required Parameters:
198+
* WebACLArn
199+
200+
### Rate limits and quotas
201+
202+
| API type | Quota/rate limit |
203+
| :-- | :-- |
204+
| IP sets per region | 100 |
205+
| Regex sets per region | 100 |
206+
| Rule groups per region | 100 |
207+
| API transactions (TPS) | ~5-10 TPS per account per API |
208+
209+
Limits may vary by region and can be increased via AWS Support.
210+
211+
## Troubleshooting
212+
213+
### Common issues
214+
215+
| Issue | Description | Solution |
216+
| :-- | :-- | :-- |
217+
| WAFNonexistentItemException | Occurs when trying to access or delete a non-existent resource. | Double-check the ID, Name, and Scope. Use List APIs to confirm existence. |
218+
| WAFOptimisticLockException | Indicates a stale or missing LockToken when updating or deleting resources. | Always fetch the latest LockToken using Get API before performing updates/deletes. |
219+
| WAFInvalidParameterException | One or more parameters are invalid or missing. | Verify that all required parameters are included and correctly formatted (for example, CIDR for IP sets). |
220+
| AccessDeniedException | Occurs when permissions are insufficient. | Check IAM roles and policies assigned to the user or service making the request. Ensure `wafv2:*` permissions are included. |
221+
| Resource still appears after deletion. | A deleted IPSet, RuleGroup, etc. still seems accessible in the UI or APIs. | Allow a few seconds for propagation. Use Get `<action-type>` or List `<action-type>` to confirm removal. |
222+
| IP addresses not being blocked. | Traffic from listed IPs still reaches the application. | Ensure the IPSet is attached to a WebACL and the WebACL is associated with the resource (for example, CloudFront or ALB). |
223+
224+
225+
### FAQs
226+
227+
#### Can I reuse an IPSet in different rule groups?
228+
229+
Yes, an IPSet can be used in several rule groups or WebACLs. You don’t need to create a new one for each use.
230+
231+
#### What’s the difference between REGIONAL and CLOUDFRONT scopes?
232+
233+
REGIONAL is used for AWS services like Application Load Balancers, API Gateway, and App Runner.
234+
235+
CLOUDFRONT is specifically for CloudFront distributions and must be managed in the US East (N. Virginia) region.
236+
237+
#### Why aren’t my changes showing up right away?
238+
239+
Updates can take a few moments to fully apply within AWS. Try retrieving the latest configuration using the appropriate Get API call to confirm.
240+
241+
#### What if the IP address I provide isn’t in CIDR format?
242+
243+
If the IP isn’t formatted correctly (for example, missing the CIDR suffix), AWS WAF will return a WAFInvalidParameterException. Make sure IPs follow the CIDR notation like 192.0.2.0/24.
244+
245+
### Support
246+
247+
* [AWS WAF documentation](https://docs.aws.amazon.com/waf/latest/developerguide/)
248+
* [AWS WAF API reference](https://docs.aws.amazon.com/waf/latest/APIReference/)
249+
* [Contact AWS support](https://aws.amazon.com/support)
250+
251+
## External libraries
252+
253+
* [boto3](https://github.com/boto/boto3/blob/develop/LICENSE)
44254

45255
## Change Log
46256

257+
### Version history
47258
* April 19, 2024 (v1.0)- First upload
48-
* March 26, 2025 (v1.1) - Added **Update IP Set** action: This new action allows users to add or remove IPs from an existing IP Set.
259+
* March 26, 2025 (v1.1) - Added Update IP Set action. This new action allows users to add or remove IPs from an existing IP Set.
260+
261+
### Deprecation notices
262+
* NA
136 KB
Loading

0 commit comments

Comments
 (0)