Skip to content

Commit a38c1b6

Browse files
authored
add sample and deny type to WAF (#809)
1 parent 97f42b3 commit a38c1b6

2 files changed

Lines changed: 27 additions & 2 deletions

File tree

components/schemas/environments/services/loadbalancer/config/types/v1/WafConfig.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,15 @@ properties:
2222
description: A boolean that indicates if the rule should be active or skipped.
2323
type: boolean
2424
type:
25-
description: A string that describes if the role should allow or deny traffic based on the conditions.
25+
description: |
26+
A string that describes if the role should allow, deny, or block traffic based on the conditions.
27+
- block = http 403
28+
- deny = connection disconnect
2629
type: string
2730
enum:
2831
- allow
2932
- deny
33+
- block
3034
expires:
3135
description: The expiration date of the WAF config, if present.
3236
oneOf:
@@ -40,6 +44,14 @@ properties:
4044
- all
4145
# legacy value TODO remove
4246
- ""
47+
sample:
48+
description: |
49+
Percentage range from 0 to 100
50+
Sample = 100 => the rule is applied to 100% of requests
51+
Sample = 0 => the rule applies to 0% of requests
52+
type:
53+
- integer
54+
- "null"
4355
conditions:
4456
description: An array of the specific conditions for the rule.
4557
type: array

stackspec/schema/services/loadbalancer/types/v1/StackSpecWafConfig.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,16 @@ properties:
2727
- type: boolean
2828
- $ref: ../../../../StackVariable.yml
2929
type:
30-
description: A string that describes if the role should allow or deny traffic based on the conditions.
30+
description: |
31+
A string that describes if the role should allow, deny, or block traffic based on the conditions.
32+
- block = http 403
33+
- deny = connection disconnect
3134
oneOf:
3235
- type: string
3336
enum:
3437
- allow
3538
- deny
39+
- block
3640
- $ref: ../../../../StackVariable.yml
3741
expires:
3842
description: The expiration date of the WAF config, if present.
@@ -51,6 +55,15 @@ properties:
5155
- any
5256
- all
5357
- $ref: ../../../../StackVariable.yml
58+
sample:
59+
description: |
60+
Percentage range from 0 to 100
61+
Sample = 100 => the rule is applied to 100% of requests
62+
Sample = 0 => the rule applies to 0% of requests
63+
oneOf:
64+
- type: integer
65+
- type: "null"
66+
- $ref: ../../../../StackVariable.yml
5467
conditions:
5568
description: An array of the specific conditions for the rule.
5669
oneOf:

0 commit comments

Comments
 (0)