Skip to content

Commit 9e81aa0

Browse files
[Integrations] Add skipping index and saved queries for WAF integration (#1750) (#1753)
* Add skipping index and saved queries for WAF integration * fixes * change the timestamp to min_max * add http source id with bloom filter --------- (cherry picked from commit afc8f4a) Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 3d5b604 commit 9e81aa0

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
CREATE SKIPPING INDEX ON {table_name} (
2+
`timestamp` MIN_MAX,
3+
`webaclId` VALUE_SET,
4+
`httpRequest` VALUE_SET,
5+
`action` VALUE_SET,
6+
`terminatingRuleType` VALUE_SET,
7+
`httpSourceId` BLOOM_FILTER
8+
) WITH (
9+
auto_refresh = true,
10+
refresh_interval = '15 Minutes',
11+
checkpoint_location = '{s3_checkpoint_location}',
12+
watermark_delay = '1 Minute'
13+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{"attributes":{"createdTimeMs":1713289099101,"savedQuery":{"data_sources":"[{\"name\":\"mys3\",\"type\":\"s3glue\",\"label\":\"mys3\",\"value\":\"mys3\"}]","description":"","name":"Allowed Web Access Logs","query":"SELECT `timestamp` as event_timestamp, `webaclId`, `action`, `httpSourceName`, `httpRequest`.clientIp, `httpRequest`.country, `httpRequest`.uri, `httpRequest`.httpMethod, `httpRequest`.requestId FROM {table_name} WHERE `action` = 'ALLOW' ORDER BY event_timestamp DESC LIMIT 10;","query_lang":"SQL","selected_date_range":{"end":"now","start":"now-15m","text":""},"selected_fields":{"text":"","tokens":[]},"selected_timestamp":{"name":"","type":"timestamp"}},"title":"Allowed Web Access Logs","version":1},"id":"1d07d010-fc18-11ee-99c9-43e5dbd0692c","references":[],"type":"observability-search","updated_at":"2024-04-16T17:52:30.414Z","version":"WzI3NTEsMV0="}
2+
{"attributes":{"createdTimeMs":1713293269224,"savedQuery":{"data_sources":"[{\"name\":\"mys3\",\"type\":\"s3glue\",\"label\":\"mys3\",\"value\":\"mys3\"}]","description":"","name":"Regular TerminatingRule WebACLs Limited","query":"SELECT `webaclId` FROM {table_name} WHERE `terminatingRuleType` = 'REGULAR' LIMIT 10;","query_lang":"SQL","selected_date_range":{"end":"now","start":"now-15m","text":""},"selected_fields":{"text":"","tokens":[]},"selected_timestamp":{"name":"","type":"timestamp"}},"title":"Regular TerminatingRule WebACLs Limited","version":1},"id":"d2a038a0-fc21-11ee-ab45-d3075d0510e6","references":[],"type":"observability-search","updated_at":"2024-04-16T18:47:49.290Z","version":"WzI4MzIsMV0="}
3+
{"attributes":{"createdTimeMs":1713294061574,"savedQuery":{"data_sources":"[{\"name\":\"mys3\",\"type\":\"s3glue\",\"label\":\"mys3\",\"value\":\"mys3\"}]","description":"","name":"Allowed Actions WebACLs","query":"SELECT `webaclId`, `action` FROM {table_name} WHERE `action` = 'ALLOW' LIMIT 10;","query_lang":"SQL","selected_date_range":{"end":"now","start":"now-15m","text":""},"selected_fields":{"text":"","tokens":[]},"selected_timestamp":{"name":"","type":"timestamp"}},"title":"Allowed Actions WebACLs","version":1},"id":"aae73c80-fc23-11ee-ab45-d3075d0510e6","references":[],"type":"observability-search","updated_at":"2024-04-16T19:01:01.640Z","version":"WzI4MzUsMV0="}

server/adaptors/integrations/__data__/repository/aws_waf/aws_waf-1.0.0.json

+14
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,20 @@
7373
"type": "query",
7474
"workflows": ["dashboards"]
7575

76+
},
77+
{
78+
"name": "create_skipping_index",
79+
"version": "1.0.0",
80+
"extension": "sql",
81+
"type": "query",
82+
"workflows": ["queries"]
83+
},
84+
{
85+
"name": "example_queries",
86+
"version": "1.0.0",
87+
"extension": "ndjson",
88+
"type": "savedObjectBundle",
89+
"workflows": ["queries"]
7690
}
7791
],
7892
"sampleData": {

0 commit comments

Comments
 (0)