|
1 | 1 | [ |
2 | 2 | { |
3 | | - "enabled":1, |
4 | | - "version_min":300000, |
5 | | - "title":"Testing allow action (1/3)", |
6 | | - "expected":{ |
7 | | - "debug_log": "Skipped rule id 'action-allow.json:3' as request trough the utilization of an `allow' action", |
8 | | - "http_code": 200 |
| 3 | + "enabled": 1, |
| 4 | + "version_min": 300000, |
| 5 | + "title": "Testing allow action (1/3)", |
| 6 | + "client": { |
| 7 | + "ip": "200.249.12.31", |
| 8 | + "port": 123 |
9 | 9 | }, |
10 | | - "client":{ |
11 | | - "ip":"200.249.12.31", |
12 | | - "port":123 |
| 10 | + "server": { |
| 11 | + "ip": "200.249.12.31", |
| 12 | + "port": 80 |
13 | 13 | }, |
14 | | - "request":{ |
15 | | - "headers":{ |
16 | | - "Host":"localhost", |
17 | | - "User-Agent":"curl/7.38.0", |
18 | | - "Accept":"*/*", |
19 | | - "User-Agent":"My sweet little browser", |
| 14 | + "request": { |
| 15 | + "headers": { |
| 16 | + "Host": "localhost", |
| 17 | + "User-Agent": "curl/7.38.0", |
| 18 | + "Accept": "*/*", |
| 19 | + "User-Agent": "My sweet little browser", |
20 | 20 | "Cookie": "PHPSESSID=rAAAAAAA2t5uvjq435r4q7ib3vtdjq120" |
21 | 21 | }, |
22 | | - "uri":"/?key=value&key=other_value", |
23 | | - "method":"GET" |
| 22 | + "uri": "/?key=value&key=other_value", |
| 23 | + "method": "GET", |
| 24 | + "http_version": , |
| 25 | + "body": [ |
| 26 | + "" |
| 27 | + ] |
24 | 28 | }, |
25 | | - "server":{ |
26 | | - "ip":"200.249.12.31", |
27 | | - "port":80 |
| 29 | + "response": { |
| 30 | + "headers": { |
| 31 | + |
| 32 | + }, |
| 33 | + "body": [ |
| 34 | + "" |
| 35 | + ] |
28 | 36 | }, |
29 | | - "rules":[ |
| 37 | + "expected": { |
| 38 | + "debug_log": "Skipped rule id 'action-allow.json:3' as request trough the utilization of an `allow' action", |
| 39 | + "http_code": 200 |
| 40 | + }, |
| 41 | + "rules": [ |
30 | 42 | "SecRuleEngine On", |
31 | 43 | "SecAction \"phase:1,allow,msg:'ALLOWED',id:500065\"", |
32 | 44 | "SecAction \"phase:1,deny,msg:'DENIED',id:500066\"" |
33 | 45 | ] |
34 | 46 | }, |
35 | 47 | { |
36 | | - "enabled":1, |
37 | | - "version_min":300000, |
38 | | - "title":"Testing allow action (2/3)", |
39 | | - "expected":{ |
40 | | - "debug_log": "", |
41 | | - "http_code": 500 |
| 48 | + "enabled": 1, |
| 49 | + "version_min": 300000, |
| 50 | + "title": "Testing allow action (2/3)", |
| 51 | + "client": { |
| 52 | + "ip": "200.249.12.31", |
| 53 | + "port": 123 |
42 | 54 | }, |
43 | | - "client":{ |
44 | | - "ip":"200.249.12.31", |
45 | | - "port":123 |
| 55 | + "server": { |
| 56 | + "ip": "200.249.12.31", |
| 57 | + "port": 80 |
46 | 58 | }, |
47 | | - "request":{ |
48 | | - "headers":{ |
49 | | - "Host":"localhost", |
50 | | - "User-Agent":"curl/7.38.0", |
51 | | - "Accept":"*/*", |
52 | | - "User-Agent":"My sweet little browser", |
| 59 | + "request": { |
| 60 | + "headers": { |
| 61 | + "Host": "localhost", |
| 62 | + "User-Agent": "curl/7.38.0", |
| 63 | + "Accept": "*/*", |
| 64 | + "User-Agent": "My sweet little browser", |
53 | 65 | "Cookie": "PHPSESSID=rAAAAAAA2t5uvjq435r4q7ib3vtdjq120" |
54 | 66 | }, |
55 | | - "uri":"/?key=value&key=other_value", |
56 | | - "method":"GET" |
| 67 | + "uri": "/?key=value&key=other_value", |
| 68 | + "method": "GET", |
| 69 | + "http_version": , |
| 70 | + "body": [ |
| 71 | + "" |
| 72 | + ] |
57 | 73 | }, |
58 | | - "server":{ |
59 | | - "ip":"200.249.12.31", |
60 | | - "port":80 |
| 74 | + "response": { |
| 75 | + "headers": { |
| 76 | + |
| 77 | + }, |
| 78 | + "body": [ |
| 79 | + "" |
| 80 | + ] |
| 81 | + }, |
| 82 | + "expected": { |
| 83 | + "http_code": 500 |
61 | 84 | }, |
62 | | - "rules":[ |
| 85 | + "rules": [ |
63 | 86 | "SecRuleEngine On", |
64 | 87 | "SecAction \"phase:1,allow:request,msg:'ALLOWED',id:500065\"", |
65 | 88 | "SecRule ARGS \"@contains value\" \"id:1,t:trim,status:500,deny,phase:3\"" |
66 | 89 | ] |
67 | 90 | }, |
68 | 91 | { |
69 | | - "enabled":1, |
70 | | - "version_min":300000, |
71 | | - "title":"Testing allow action (3/3)", |
72 | | - "expected":{ |
73 | | - "debug_log": "", |
74 | | - "http_code": 500 |
| 92 | + "enabled": 1, |
| 93 | + "version_min": 300000, |
| 94 | + "title": "Testing allow action (3/3)", |
| 95 | + "client": { |
| 96 | + "ip": "200.249.12.31", |
| 97 | + "port": 123 |
75 | 98 | }, |
76 | | - "client":{ |
77 | | - "ip":"200.249.12.31", |
78 | | - "port":123 |
| 99 | + "server": { |
| 100 | + "ip": "200.249.12.31", |
| 101 | + "port": 80 |
79 | 102 | }, |
80 | | - "request":{ |
81 | | - "headers":{ |
82 | | - "Host":"localhost", |
83 | | - "User-Agent":"curl/7.38.0", |
84 | | - "Accept":"*/*", |
85 | | - "User-Agent":"My sweet little browser", |
| 103 | + "request": { |
| 104 | + "headers": { |
| 105 | + "Host": "localhost", |
| 106 | + "User-Agent": "curl/7.38.0", |
| 107 | + "Accept": "*/*", |
| 108 | + "User-Agent": "My sweet little browser", |
86 | 109 | "Cookie": "PHPSESSID=rAAAAAAA2t5uvjq435r4q7ib3vtdjq120" |
87 | 110 | }, |
88 | | - "uri":"/?key=value&key=other_value", |
89 | | - "method":"GET" |
| 111 | + "uri": "/?key=value&key=other_value", |
| 112 | + "method": "GET", |
| 113 | + "http_version": , |
| 114 | + "body": [ |
| 115 | + "" |
| 116 | + ] |
90 | 117 | }, |
91 | | - "server":{ |
92 | | - "ip":"200.249.12.31", |
93 | | - "port":80 |
| 118 | + "response": { |
| 119 | + "headers": { |
| 120 | + |
| 121 | + }, |
| 122 | + "body": [ |
| 123 | + "" |
| 124 | + ] |
| 125 | + }, |
| 126 | + "expected": { |
| 127 | + "http_code": 500 |
94 | 128 | }, |
95 | | - "rules":[ |
| 129 | + "rules": [ |
96 | 130 | "SecRuleEngine On", |
97 | 131 | "SecAction \"phase:1,allow:phase,msg:'ALLOWED',id:500065\"", |
98 | 132 | "SecRule ARGS \"@contains value\" \"id:1,t:trim,status:500,deny,phase:3\"" |
|
0 commit comments