mirror of
https://github.com/SHOGGOTH-SECTOR/sica-fondt.git
synced 2026-08-01 08:30:20 +00:00
Place useful parts of the surrounding repos into sica-fondt by layer, per the
body model (Ada = membrane; brain/endocrine/capabilities/knowledge non-Ada):
- brain/ LLM reasoning + providers (dapr, hermes, MoMoA)
- capabilities/ REPRAG sidecars: hermes tools/skills, dapr tools, parallel
dispatch, A51 channels, and the OSINT cluster
- knowledge/ LORAG corpus: 754 cyber-skills, agency personas, secure-coding,
MITRE ATT&CK data
- reference/ defensive threat-reference (C3, shhbruh doc) + AdaYaml parser
License handling: AGPL sources (worldosint, advanced_evolution, mercury,
Reticulum) and GPL DeTTECT are SPEC-only clean-room/port descriptions — no
copyleft code copied. MIT/Apache/data parts copied as working trees.
Safety: shhbruh escape/persistence material and C3 covert-C2 kept as reference
only, not wired into the running organism. See CONSOLIDATION.md.
https://claude.ai/code/session_01UehUqEXXJJCsHoA4voCU5c
57 lines
2.3 KiB
Markdown
57 lines
2.3 KiB
Markdown
# API Reference: Securing API Gateway with AWS WAF
|
|
|
|
## boto3 WAFv2 Client
|
|
|
|
### Installation
|
|
```bash
|
|
pip install boto3
|
|
```
|
|
|
|
### Client Initialization
|
|
```python
|
|
client = boto3.client("wafv2", region_name="us-east-1")
|
|
```
|
|
|
|
### Key Methods
|
|
|
|
| Method | Description |
|
|
|--------|-------------|
|
|
| `create_web_acl()` | Create a new Web ACL with rules and default action |
|
|
| `update_web_acl()` | Modify rules, requires `LockToken` for optimistic concurrency |
|
|
| `get_web_acl()` | Retrieve full Web ACL configuration and lock token |
|
|
| `list_web_acls()` | List all Web ACLs in a scope (REGIONAL or CLOUDFRONT) |
|
|
| `associate_web_acl()` | Attach Web ACL to API Gateway, ALB, or AppSync |
|
|
| `get_sampled_requests()` | Retrieve sampled requests for a specific rule metric |
|
|
| `get_rate_based_statement_managed_keys()` | Get IPs currently rate-limited |
|
|
| `put_logging_configuration()` | Configure WAF logging to Firehose/S3 |
|
|
| `list_resources_for_web_acl()` | List resources associated with a Web ACL |
|
|
|
|
### Managed Rule Groups
|
|
| Rule Group | Protection |
|
|
|-----------|------------|
|
|
| `AWSManagedRulesCommonRuleSet` | OWASP Top 10 common attacks |
|
|
| `AWSManagedRulesSQLiRuleSet` | SQL injection patterns |
|
|
| `AWSManagedRulesKnownBadInputsRuleSet` | Known bad request patterns |
|
|
| `AWSManagedRulesAmazonIpReputationList` | Malicious IP blocking |
|
|
| `AWSManagedRulesBotControlRuleSet` | Bot detection and management |
|
|
|
|
### Rate-Based Rule Parameters
|
|
| Parameter | Type | Description |
|
|
|-----------|------|-------------|
|
|
| `Limit` | int | Max requests per 5-minute window (min: 100) |
|
|
| `AggregateKeyType` | str | `IP` or `FORWARDED_IP` |
|
|
| `ScopeDownStatement` | dict | Optional filter to scope rate limiting |
|
|
|
|
### CloudWatch Metrics (Namespace: AWS/WAFV2)
|
|
| Metric | Description |
|
|
|--------|-------------|
|
|
| `AllowedRequests` | Requests allowed by WAF |
|
|
| `BlockedRequests` | Requests blocked by WAF |
|
|
| `CountedRequests` | Requests matched in Count mode |
|
|
| `PassedRequests` | Requests not matching any rule |
|
|
|
|
## References
|
|
- boto3 WAFv2 docs: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/wafv2.html
|
|
- AWS WAF Developer Guide: https://docs.aws.amazon.com/waf/latest/developerguide/
|
|
- AWS Managed Rules list: https://docs.aws.amazon.com/waf/latest/developerguide/aws-managed-rule-groups-list.html
|