@robinmordasiewicz/f5xc-terraform-mcp 2.4.7 → 2.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/docs/data-sources/dns_zone.md +2 -2
- package/dist/docs/guides/advanced-http-loadbalancer.md +569 -0
- package/dist/docs/resources/api_credential.md +2 -2
- package/dist/docs/resources/cloud_connect.md +2 -2
- package/dist/docs/resources/dns_zone.md +496 -451
- package/dist/docs/resources/managed_tenant.md +2 -2
- package/package.json +1 -1
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
page_title: "f5xc_dns_zone Data Source - terraform-provider-f5xc"
|
|
3
3
|
subcategory: "DNS"
|
|
4
4
|
description: |-
|
|
5
|
-
[Category: DNS] [Namespace: not_required] Manages
|
|
5
|
+
[Category: DNS] [Namespace: not_required] Manages DNS Zone in a given namespace. If one already exist it will give a error. in F5 Distributed Cloud.
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# f5xc_dns_zone (Data Source)
|
|
9
9
|
|
|
10
|
-
[Category: DNS] [Namespace: not_required] Manages
|
|
10
|
+
[Category: DNS] [Namespace: not_required] Manages DNS Zone in a given namespace. If one already exist it will give a error. in F5 Distributed Cloud.
|
|
11
11
|
|
|
12
12
|
~> **Note** Please refer to [DNS Zone API docs](https://docs.cloud.f5.com/docs-v2/api/dns-zone) to learn more.
|
|
13
13
|
|
|
@@ -0,0 +1,569 @@
|
|
|
1
|
+
---
|
|
2
|
+
page_title: "Guide: Advanced HTTP Load Balancer Security"
|
|
3
|
+
subcategory: "Guides"
|
|
4
|
+
description: |-
|
|
5
|
+
Advanced guide to deploying a fully-secured HTTP Load Balancer with all security
|
|
6
|
+
controls including WAF, Data Guard, IP Reputation, Malicious User Detection, and
|
|
7
|
+
Threat Mesh using F5 Distributed Cloud and Terraform.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Advanced HTTP Load Balancer Security
|
|
11
|
+
|
|
12
|
+
This guide extends the [basic HTTP Load Balancer guide](http-loadbalancer) with advanced security features for production deployments requiring comprehensive protection against sophisticated threats.
|
|
13
|
+
|
|
14
|
+
By following this guide, you'll deploy an HTTP Load Balancer with **11 security controls**:
|
|
15
|
+
|
|
16
|
+
| Security Layer | Feature | Protection |
|
|
17
|
+
|----------------|---------|------------|
|
|
18
|
+
| **Perimeter** | IP Reputation | Blocks known malicious IPs by threat category |
|
|
19
|
+
| **Perimeter** | Threat Mesh | Global threat intelligence sharing |
|
|
20
|
+
| **Bot Defense** | JavaScript Challenge | Client-side bot detection |
|
|
21
|
+
| **Bot Defense** | Malicious User Detection | Behavioral analysis and risk scoring |
|
|
22
|
+
| **Application** | Web Application Firewall | Blocks SQLi, XSS, and OWASP Top 10 |
|
|
23
|
+
| **Application** | Bot Protection Settings | Signature-based bot classification |
|
|
24
|
+
| **Rate Control** | Rate Limiting | Prevents abuse with configurable thresholds |
|
|
25
|
+
| **Data Protection** | Data Guard | Masks sensitive data (CC, SSN) in responses |
|
|
26
|
+
|
|
27
|
+
## Prerequisites
|
|
28
|
+
|
|
29
|
+
Before you begin, ensure you have:
|
|
30
|
+
|
|
31
|
+
- **F5 Distributed Cloud Account** - Sign up at <https://www.f5.com/cloud/products/distributed-cloud-console>
|
|
32
|
+
- **API Token** - Generate credentials from the F5XC Console ([documentation](https://docs.cloud.f5.com/docs/how-to/user-mgmt/credentials))
|
|
33
|
+
- **Terraform >= 1.8** - Download from <https://www.terraform.io/downloads>
|
|
34
|
+
- **Namespace** - An existing namespace or permissions to create one
|
|
35
|
+
- **Backend Origin** - Your application server accessible from the internet
|
|
36
|
+
|
|
37
|
+
-> **Tip:** Review the [Authentication Guide](authentication) for detailed credential setup instructions.
|
|
38
|
+
|
|
39
|
+
## Complete Configuration
|
|
40
|
+
|
|
41
|
+
The following configuration creates a production-ready HTTP Load Balancer with all security features enabled.
|
|
42
|
+
|
|
43
|
+
### Provider Configuration
|
|
44
|
+
|
|
45
|
+
```hcl
|
|
46
|
+
terraform {
|
|
47
|
+
required_version = ">= 1.0"
|
|
48
|
+
required_providers {
|
|
49
|
+
f5xc = {
|
|
50
|
+
source = "robinmordasiewicz/f5xc"
|
|
51
|
+
version = ">= 2.5"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
provider "f5xc" {
|
|
57
|
+
api_token = var.api_token
|
|
58
|
+
api_url = var.api_url
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Variables
|
|
63
|
+
|
|
64
|
+
```hcl
|
|
65
|
+
variable "api_token" {
|
|
66
|
+
description = "F5 XC API token for authentication"
|
|
67
|
+
type = string
|
|
68
|
+
sensitive = true
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
variable "api_url" {
|
|
72
|
+
description = "F5 XC API URL (e.g., https://your-tenant.console.ves.volterra.io/api)"
|
|
73
|
+
type = string
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
variable "namespace" {
|
|
77
|
+
description = "F5 XC namespace for the load balancer"
|
|
78
|
+
type = string
|
|
79
|
+
default = "default"
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
variable "name_prefix" {
|
|
83
|
+
description = "Prefix for resource names"
|
|
84
|
+
type = string
|
|
85
|
+
default = "secure-app"
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
variable "domain" {
|
|
89
|
+
description = "Domain for the load balancer"
|
|
90
|
+
type = string
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
variable "origin_server" {
|
|
94
|
+
description = "Backend origin server DNS name"
|
|
95
|
+
type = string
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Web Application Firewall
|
|
100
|
+
|
|
101
|
+
The WAF provides signature-based attack detection with configurable bot protection. For detailed WAF configuration options, see [Create Web Application Firewall](https://docs.cloud.f5.com/docs-v2/web-app-and-api-protection/how-to/app-security/application-firewall).
|
|
102
|
+
|
|
103
|
+
```hcl
|
|
104
|
+
resource "f5xc_app_firewall" "waf" {
|
|
105
|
+
name = "${var.name_prefix}-waf"
|
|
106
|
+
namespace = var.namespace
|
|
107
|
+
|
|
108
|
+
# Blocking mode actively mitigates threats
|
|
109
|
+
# Use monitoring {} for detection-only mode
|
|
110
|
+
blocking {}
|
|
111
|
+
|
|
112
|
+
detection_settings {
|
|
113
|
+
signature_selection_setting {
|
|
114
|
+
default_attack_type_settings {}
|
|
115
|
+
high_medium_accuracy_signatures {}
|
|
116
|
+
}
|
|
117
|
+
enable_suppression {}
|
|
118
|
+
enable_threat_campaigns {}
|
|
119
|
+
|
|
120
|
+
# Bot protection with graduated response
|
|
121
|
+
bot_protection_setting {
|
|
122
|
+
malicious_bot_action = "BLOCK"
|
|
123
|
+
suspicious_bot_action = "REPORT"
|
|
124
|
+
good_bot_action = "REPORT"
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
~> **Note:** The default enforcement mode is `monitoring`, meaning threats are logged but not blocked. Use `blocking {}` for production deployments. See [WAF Enforcement Modes](https://docs.cloud.f5.com/docs-v2/web-app-and-api-protection/how-to/app-security/application-firewall) for details.
|
|
131
|
+
|
|
132
|
+
### Health Check
|
|
133
|
+
|
|
134
|
+
Configure active health monitoring for your origin servers:
|
|
135
|
+
|
|
136
|
+
```hcl
|
|
137
|
+
resource "f5xc_healthcheck" "http" {
|
|
138
|
+
name = "${var.name_prefix}-healthcheck"
|
|
139
|
+
namespace = var.namespace
|
|
140
|
+
|
|
141
|
+
http_health_check {
|
|
142
|
+
path = "/health"
|
|
143
|
+
expected_status_codes = ["200"]
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
timeout = 3
|
|
147
|
+
interval = 15
|
|
148
|
+
unhealthy_threshold = 3
|
|
149
|
+
healthy_threshold = 2
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### Origin Pool
|
|
154
|
+
|
|
155
|
+
The origin pool defines your backend servers. For additional origin pool options, see [Origin Pools](https://docs.cloud.f5.com/docs-v2/multi-cloud-app-connect/how-to/load-balance/create-http-load-balancer).
|
|
156
|
+
|
|
157
|
+
```hcl
|
|
158
|
+
resource "f5xc_origin_pool" "backend" {
|
|
159
|
+
name = "${var.name_prefix}-origin-pool"
|
|
160
|
+
namespace = var.namespace
|
|
161
|
+
|
|
162
|
+
origin_servers {
|
|
163
|
+
public_name {
|
|
164
|
+
dns_name = var.origin_server
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
port = 443
|
|
169
|
+
|
|
170
|
+
use_tls {
|
|
171
|
+
skip_server_verification {}
|
|
172
|
+
tls_config {
|
|
173
|
+
default_security {}
|
|
174
|
+
}
|
|
175
|
+
sni = var.origin_server
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
endpoint_selection = "LOCAL_PREFERRED"
|
|
179
|
+
loadbalancer_algorithm = "ROUND_ROBIN"
|
|
180
|
+
|
|
181
|
+
healthcheck {
|
|
182
|
+
name = f5xc_healthcheck.http.name
|
|
183
|
+
namespace = var.namespace
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### HTTP Load Balancer with All Security Features
|
|
189
|
+
|
|
190
|
+
This is the main resource that brings together all security controls:
|
|
191
|
+
|
|
192
|
+
```hcl
|
|
193
|
+
resource "f5xc_http_loadbalancer" "app" {
|
|
194
|
+
name = "${var.name_prefix}-lb"
|
|
195
|
+
namespace = var.namespace
|
|
196
|
+
domains = [var.domain]
|
|
197
|
+
|
|
198
|
+
http {
|
|
199
|
+
port = 80
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
advertise_on_public_default_vip {}
|
|
203
|
+
|
|
204
|
+
default_route_pools {
|
|
205
|
+
pool {
|
|
206
|
+
name = f5xc_origin_pool.backend.name
|
|
207
|
+
namespace = var.namespace
|
|
208
|
+
}
|
|
209
|
+
weight = 1
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
round_robin {}
|
|
213
|
+
|
|
214
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
215
|
+
# WAF Configuration
|
|
216
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
217
|
+
app_firewall {
|
|
218
|
+
name = f5xc_app_firewall.waf.name
|
|
219
|
+
namespace = var.namespace
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
223
|
+
# Rate Limiting
|
|
224
|
+
# Prevents abuse by limiting requests per client IP
|
|
225
|
+
# See: https://docs.cloud.f5.com/docs/how-to/advanced-security/user-rate-limit
|
|
226
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
227
|
+
rate_limit {
|
|
228
|
+
no_ip_allowed_list {}
|
|
229
|
+
rate_limiter {
|
|
230
|
+
total_number = 100
|
|
231
|
+
unit = "MINUTE"
|
|
232
|
+
burst_multiplier = 2
|
|
233
|
+
leaky_bucket {}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
238
|
+
# IP Reputation Filtering
|
|
239
|
+
# Blocks IPs based on threat intelligence categories
|
|
240
|
+
# See: https://docs.cloud.f5.com/docs/how-to/advanced-security/configure-ip-reputation
|
|
241
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
242
|
+
enable_ip_reputation {
|
|
243
|
+
ip_threat_categories = [
|
|
244
|
+
"SPAM_SOURCES",
|
|
245
|
+
"WEB_ATTACKS",
|
|
246
|
+
"BOTNETS",
|
|
247
|
+
"SCANNERS",
|
|
248
|
+
"PHISHING",
|
|
249
|
+
"PROXY",
|
|
250
|
+
"TOR_PROXY",
|
|
251
|
+
"DENIAL_OF_SERVICE"
|
|
252
|
+
]
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
256
|
+
# JavaScript Challenge
|
|
257
|
+
# Client-side bot detection using JS challenge
|
|
258
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
259
|
+
js_challenge {
|
|
260
|
+
js_script_delay = 1000
|
|
261
|
+
cookie_expiry = 3600
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
265
|
+
# Data Guard
|
|
266
|
+
# Masks sensitive data (credit cards, SSN) in responses
|
|
267
|
+
# Requires WAF to be enabled
|
|
268
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
269
|
+
data_guard_rules {
|
|
270
|
+
metadata {
|
|
271
|
+
name = "${var.name_prefix}-data-guard"
|
|
272
|
+
description_spec = "Mask sensitive data in all responses"
|
|
273
|
+
}
|
|
274
|
+
any_domain {}
|
|
275
|
+
path {
|
|
276
|
+
prefix = "/"
|
|
277
|
+
}
|
|
278
|
+
apply_data_guard {}
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
282
|
+
# Malicious User Detection
|
|
283
|
+
# Behavioral analysis with risk scoring
|
|
284
|
+
# See: https://docs.cloud.f5.com/docs-v2/web-app-and-api-protection/how-to/adv-security/malicious-users
|
|
285
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
286
|
+
enable_malicious_user_detection {}
|
|
287
|
+
|
|
288
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
289
|
+
# Threat Mesh
|
|
290
|
+
# Global threat intelligence sharing across F5XC network
|
|
291
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
292
|
+
enable_threat_mesh {}
|
|
293
|
+
|
|
294
|
+
labels = {
|
|
295
|
+
environment = "production"
|
|
296
|
+
managed_by = "terraform"
|
|
297
|
+
security = "advanced"
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
## Understanding Each Security Feature
|
|
303
|
+
|
|
304
|
+
### IP Reputation Service
|
|
305
|
+
|
|
306
|
+
The IP Reputation service maintains a continuously-updated database of known malicious IP addresses. When enabled, requests from IPs matching configured threat categories are automatically blocked.
|
|
307
|
+
|
|
308
|
+
| Threat Category | Description |
|
|
309
|
+
|-----------------|-------------|
|
|
310
|
+
| `SPAM_SOURCES` | Known spam-sending IP addresses |
|
|
311
|
+
| `WEB_ATTACKS` | IPs involved in web-based attacks |
|
|
312
|
+
| `BOTNETS` | Command & control and infected hosts |
|
|
313
|
+
| `SCANNERS` | Reconnaissance, probes, brute force |
|
|
314
|
+
| `PHISHING` | Phishing and fraud operations |
|
|
315
|
+
| `PROXY` | Anonymous proxy services |
|
|
316
|
+
| `TOR_PROXY` | Tor exit nodes |
|
|
317
|
+
| `DENIAL_OF_SERVICE` | DoS and DDoS sources |
|
|
318
|
+
|
|
319
|
+
-> **Tip:** Start with all categories enabled, then selectively disable based on your application requirements. For example, disable `TOR_PROXY` if you need to support privacy-focused users.
|
|
320
|
+
|
|
321
|
+
### Data Guard
|
|
322
|
+
|
|
323
|
+
Data Guard automatically detects and masks sensitive data in HTTP responses before they reach clients. This protects against accidental data exposure such as:
|
|
324
|
+
|
|
325
|
+
- Credit card numbers (PAN)
|
|
326
|
+
- Social Security Numbers (SSN)
|
|
327
|
+
- Custom patterns (configurable)
|
|
328
|
+
|
|
329
|
+
!> **Important:** Data Guard requires WAF to be enabled. If you disable WAF, Data Guard will not function.
|
|
330
|
+
|
|
331
|
+
### Malicious User Detection
|
|
332
|
+
|
|
333
|
+
This feature uses behavioral analysis to identify potentially malicious users based on:
|
|
334
|
+
|
|
335
|
+
- **Rate Limiting Violations** - Exceeding configured rate limits
|
|
336
|
+
- **WAF Violations** - Triggering WAF rules
|
|
337
|
+
- **Bot Detection Signals** - Failing JavaScript challenges
|
|
338
|
+
- **Threat Intelligence** - IP reputation matches
|
|
339
|
+
|
|
340
|
+
Users are assigned a risk score, and mitigation actions can be configured based on thresholds.
|
|
341
|
+
|
|
342
|
+
### Threat Mesh
|
|
343
|
+
|
|
344
|
+
Threat Mesh enables sharing of threat intelligence across the F5 Distributed Cloud network. When a threat is detected at one customer's load balancer, that intelligence can protect all participating customers.
|
|
345
|
+
|
|
346
|
+
## Configuration Variations
|
|
347
|
+
|
|
348
|
+
### Conditional Security Features
|
|
349
|
+
|
|
350
|
+
Use Terraform variables to make security features configurable:
|
|
351
|
+
|
|
352
|
+
```hcl
|
|
353
|
+
variable "enable_waf" {
|
|
354
|
+
description = "Enable WAF protection"
|
|
355
|
+
type = bool
|
|
356
|
+
default = true
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
variable "enable_data_guard" {
|
|
360
|
+
description = "Enable Data Guard (requires WAF)"
|
|
361
|
+
type = bool
|
|
362
|
+
default = true
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
variable "enable_ip_reputation" {
|
|
366
|
+
description = "Enable IP Reputation filtering"
|
|
367
|
+
type = bool
|
|
368
|
+
default = true
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
variable "ip_threat_categories" {
|
|
372
|
+
description = "IP threat categories to block"
|
|
373
|
+
type = list(string)
|
|
374
|
+
default = [
|
|
375
|
+
"SPAM_SOURCES",
|
|
376
|
+
"WEB_ATTACKS",
|
|
377
|
+
"BOTNETS",
|
|
378
|
+
"SCANNERS"
|
|
379
|
+
]
|
|
380
|
+
}
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
Then use dynamic blocks in the load balancer:
|
|
384
|
+
|
|
385
|
+
```hcl
|
|
386
|
+
resource "f5xc_http_loadbalancer" "app" {
|
|
387
|
+
# ... base configuration ...
|
|
388
|
+
|
|
389
|
+
dynamic "app_firewall" {
|
|
390
|
+
for_each = var.enable_waf ? [1] : []
|
|
391
|
+
content {
|
|
392
|
+
name = f5xc_app_firewall.waf[0].name
|
|
393
|
+
namespace = var.namespace
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
dynamic "disable_waf" {
|
|
398
|
+
for_each = var.enable_waf ? [] : [1]
|
|
399
|
+
content {}
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
dynamic "enable_ip_reputation" {
|
|
403
|
+
for_each = var.enable_ip_reputation ? [1] : []
|
|
404
|
+
content {
|
|
405
|
+
ip_threat_categories = var.ip_threat_categories
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
dynamic "disable_ip_reputation" {
|
|
410
|
+
for_each = var.enable_ip_reputation ? [] : [1]
|
|
411
|
+
content {}
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
dynamic "data_guard_rules" {
|
|
415
|
+
for_each = var.enable_data_guard && var.enable_waf ? [1] : []
|
|
416
|
+
content {
|
|
417
|
+
metadata {
|
|
418
|
+
name = "${var.name_prefix}-data-guard"
|
|
419
|
+
description_spec = "Mask sensitive data"
|
|
420
|
+
}
|
|
421
|
+
any_domain {}
|
|
422
|
+
path {
|
|
423
|
+
prefix = "/"
|
|
424
|
+
}
|
|
425
|
+
apply_data_guard {}
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
```
|
|
430
|
+
|
|
431
|
+
### WAF Monitoring Mode
|
|
432
|
+
|
|
433
|
+
For initial deployment or debugging, use monitoring mode instead of blocking:
|
|
434
|
+
|
|
435
|
+
```hcl
|
|
436
|
+
resource "f5xc_app_firewall" "waf" {
|
|
437
|
+
name = "${var.name_prefix}-waf"
|
|
438
|
+
namespace = var.namespace
|
|
439
|
+
|
|
440
|
+
# Monitoring mode - detect but don't block
|
|
441
|
+
monitoring {}
|
|
442
|
+
|
|
443
|
+
detection_settings {
|
|
444
|
+
# ... same detection settings ...
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
### Custom Rate Limiting
|
|
450
|
+
|
|
451
|
+
Adjust rate limiting based on your application's traffic patterns:
|
|
452
|
+
|
|
453
|
+
```hcl
|
|
454
|
+
variable "rate_limit_requests" {
|
|
455
|
+
description = "Number of requests allowed per rate limit period"
|
|
456
|
+
type = number
|
|
457
|
+
default = 100
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
variable "rate_limit_unit" {
|
|
461
|
+
description = "Rate limit period: SECOND, MINUTE, or HOUR"
|
|
462
|
+
type = string
|
|
463
|
+
default = "MINUTE"
|
|
464
|
+
|
|
465
|
+
validation {
|
|
466
|
+
condition = contains(["SECOND", "MINUTE", "HOUR"], var.rate_limit_unit)
|
|
467
|
+
error_message = "Rate limit unit must be SECOND, MINUTE, or HOUR."
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
```
|
|
471
|
+
|
|
472
|
+
## Outputs
|
|
473
|
+
|
|
474
|
+
Add outputs to retrieve deployment information:
|
|
475
|
+
|
|
476
|
+
```hcl
|
|
477
|
+
output "load_balancer_name" {
|
|
478
|
+
description = "Name of the HTTP load balancer"
|
|
479
|
+
value = f5xc_http_loadbalancer.app.name
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
output "security_summary" {
|
|
483
|
+
description = "Summary of enabled security controls"
|
|
484
|
+
value = {
|
|
485
|
+
waf_enabled = var.enable_waf
|
|
486
|
+
waf_mode = var.enable_waf ? "blocking" : "disabled"
|
|
487
|
+
rate_limiting = "${var.rate_limit_requests} per ${var.rate_limit_unit}"
|
|
488
|
+
ip_reputation = var.enable_ip_reputation
|
|
489
|
+
data_guard = var.enable_data_guard && var.enable_waf
|
|
490
|
+
malicious_user_detection = true
|
|
491
|
+
threat_mesh = true
|
|
492
|
+
js_challenge = true
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
```
|
|
496
|
+
|
|
497
|
+
## Troubleshooting
|
|
498
|
+
|
|
499
|
+
### Data Guard Not Masking Data
|
|
500
|
+
|
|
501
|
+
**Symptom:** Sensitive data appears in responses despite Data Guard being configured.
|
|
502
|
+
|
|
503
|
+
**Solutions:**
|
|
504
|
+
|
|
505
|
+
1. Verify WAF is enabled (Data Guard requires WAF)
|
|
506
|
+
2. Check the path configuration matches your application routes
|
|
507
|
+
3. Verify the response content type is text-based (HTML, JSON, XML)
|
|
508
|
+
|
|
509
|
+
### IP Reputation Blocking Legitimate Users
|
|
510
|
+
|
|
511
|
+
**Symptom:** Users from corporate networks or VPNs are being blocked.
|
|
512
|
+
|
|
513
|
+
**Solutions:**
|
|
514
|
+
|
|
515
|
+
1. Review blocked requests in Security Analytics
|
|
516
|
+
2. Consider removing `PROXY` category if your users use VPNs
|
|
517
|
+
3. Add IP allow lists for known-good networks:
|
|
518
|
+
|
|
519
|
+
```hcl
|
|
520
|
+
rate_limit {
|
|
521
|
+
ip_allowed_list {
|
|
522
|
+
prefixes = ["10.0.0.0/8", "192.168.0.0/16"]
|
|
523
|
+
}
|
|
524
|
+
rate_limiter {
|
|
525
|
+
# ... configuration ...
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
```
|
|
529
|
+
|
|
530
|
+
### JavaScript Challenge Breaking Application
|
|
531
|
+
|
|
532
|
+
**Symptom:** API calls or mobile apps fail with JavaScript challenge.
|
|
533
|
+
|
|
534
|
+
**Solutions:**
|
|
535
|
+
|
|
536
|
+
1. Use `no_challenge {}` instead of `js_challenge {}` for API-only endpoints
|
|
537
|
+
2. Configure trusted client rules to bypass JS challenge for specific clients
|
|
538
|
+
3. Consider using `captcha_challenge {}` for interactive applications
|
|
539
|
+
|
|
540
|
+
## Security Best Practices
|
|
541
|
+
|
|
542
|
+
1. **Start with monitoring mode** - Deploy WAF in monitoring mode first to understand your traffic patterns
|
|
543
|
+
2. **Review security analytics** - Regularly review blocked requests in the F5XC Console
|
|
544
|
+
3. **Tune gradually** - Enable features one at a time and monitor impact
|
|
545
|
+
4. **Use all layers** - Defense in depth requires multiple security controls
|
|
546
|
+
5. **Keep Terraform state secure** - Use remote state with encryption for production
|
|
547
|
+
|
|
548
|
+
## Related Documentation
|
|
549
|
+
|
|
550
|
+
### F5 Distributed Cloud Documentation
|
|
551
|
+
|
|
552
|
+
- [Create HTTP Load Balancer](https://docs.cloud.f5.com/docs-v2/multi-cloud-app-connect/how-to/load-balance/create-http-load-balancer)
|
|
553
|
+
- [Web Application Firewall](https://docs.cloud.f5.com/docs-v2/web-app-and-api-protection/how-to/app-security/application-firewall)
|
|
554
|
+
- [IP Reputation Service](https://docs.cloud.f5.com/docs/how-to/advanced-security/configure-ip-reputation)
|
|
555
|
+
- [Rate Limiting](https://docs.cloud.f5.com/docs/how-to/advanced-security/user-rate-limit)
|
|
556
|
+
- [Bot Defense](https://docs.cloud.f5.com/docs/how-to/advanced-security/bot-defense)
|
|
557
|
+
- [Malicious User Detection](https://docs.cloud.f5.com/docs-v2/web-app-and-api-protection/how-to/adv-security/malicious-users)
|
|
558
|
+
|
|
559
|
+
### Provider Resources
|
|
560
|
+
|
|
561
|
+
- [f5xc_http_loadbalancer](../resources/http_loadbalancer)
|
|
562
|
+
- [f5xc_app_firewall](../resources/app_firewall)
|
|
563
|
+
- [f5xc_origin_pool](../resources/origin_pool)
|
|
564
|
+
- [f5xc_healthcheck](../resources/healthcheck)
|
|
565
|
+
|
|
566
|
+
## Support
|
|
567
|
+
|
|
568
|
+
- **Provider Issues:** [GitHub Issues](https://github.com/robinmordasiewicz/terraform-provider-f5xc/issues)
|
|
569
|
+
- **F5 Support:** [F5 Distributed Cloud Support](https://docs.cloud.f5.com/docs/support)
|
|
@@ -49,8 +49,6 @@ resource "f5xc_api_credential" "example" {
|
|
|
49
49
|
|
|
50
50
|
<a id="name"></a>• [`name`](#name) - Required String<br>Name of the API Credential. Must be unique within the namespace
|
|
51
51
|
|
|
52
|
-
<a id="namespace"></a>• [`namespace`](#namespace) - Required String<br>Namespace where the API Credential will be created
|
|
53
|
-
|
|
54
52
|
<a id="annotations"></a>• [`annotations`](#annotations) - Optional Map<br>Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata
|
|
55
53
|
|
|
56
54
|
<a id="description"></a>• [`description`](#description) - Optional String<br>Human readable description for the object
|
|
@@ -59,6 +57,8 @@ resource "f5xc_api_credential" "example" {
|
|
|
59
57
|
|
|
60
58
|
<a id="labels"></a>• [`labels`](#labels) - Optional Map<br>Labels is a user defined key value map that can be attached to resources for organization and filtering
|
|
61
59
|
|
|
60
|
+
<a id="namespace"></a>• [`namespace`](#namespace) - Optional String<br>Namespace for the API Credential. For this resource type, namespace should be empty or omitted
|
|
61
|
+
|
|
62
62
|
### Spec Argument Reference
|
|
63
63
|
|
|
64
64
|
<a id="password"></a>• [`password`](#password) - Optional String<br>Password. Password is used for generating an API certificate P12 bundle user can use to protect access to it. this password will not be saved/persisted anywhere in the system. Applicable for credential type API_CERTIFICATE Users have to use this password when they use the certificate, e.g. in curl or while adding to key chain
|
|
@@ -54,6 +54,8 @@ resource "f5xc_cloud_connect" "example" {
|
|
|
54
54
|
|
|
55
55
|
<a id="name"></a>• [`name`](#name) - Required String<br>Name of the Cloud Connect. Must be unique within the namespace
|
|
56
56
|
|
|
57
|
+
<a id="namespace"></a>• [`namespace`](#namespace) - Required String<br>Namespace where the Cloud Connect will be created
|
|
58
|
+
|
|
57
59
|
<a id="annotations"></a>• [`annotations`](#annotations) - Optional Map<br>Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata
|
|
58
60
|
|
|
59
61
|
<a id="description"></a>• [`description`](#description) - Optional String<br>Human readable description for the object
|
|
@@ -62,8 +64,6 @@ resource "f5xc_cloud_connect" "example" {
|
|
|
62
64
|
|
|
63
65
|
<a id="labels"></a>• [`labels`](#labels) - Optional Map<br>Labels is a user defined key value map that can be attached to resources for organization and filtering
|
|
64
66
|
|
|
65
|
-
<a id="namespace"></a>• [`namespace`](#namespace) - Optional String<br>Namespace for the Cloud Connect. For this resource type, namespace should be empty or omitted
|
|
66
|
-
|
|
67
67
|
### Spec Argument Reference
|
|
68
68
|
|
|
69
69
|
-> **One of the following:**
|