Skip to content

Commit 5a3fe77

Browse files
committed
refactor(filters): update changeSet IDs and improve SQL filter conditions
1 parent d4f7627 commit 5a3fe77

52 files changed

Lines changed: 12798 additions & 12942 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

backend/src/main/resources/config/liquibase/changelog/20250617001_update_filter_antivirus_esmc_eset.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
55
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">
66

7-
<changeSet id="20250617001" author="JocLRojas">
7+
<changeSet id="20250910001" author="JocLRojas">
88

99
<sql dbms="postgresql" splitStatements="true" stripComments="true">
1010
<![CDATA[
@@ -103,21 +103,21 @@ pipeline:
103103
params:
104104
key: severity
105105
value: ''low''
106-
where: safe("log.severity", "") && ( log.severity=="INFO" || log.severity=="Info" )
106+
where: safe("log.severity", "") in ["INFO", "Info"]
107107
108108
- add:
109109
function: ''string''
110110
params:
111111
key: severity
112112
value: ''medium''
113-
where: safe("log.severity", "") && (log.severity=="WARNING" || log.severity=="Warning")
113+
where: safe("log.severity", "") in ["WARNING", "Warning"]
114114
115115
- add:
116116
function: ''string''
117117
params:
118118
key: severity
119119
value: ''high''
120-
where: safe("log.severity", "") && (log.severity=="ERROR" || log.severity=="Error")
120+
where: safe("log.severity", "") in ["ERROR", "Error"]
121121
122122
# Adding geolocation to origin.ip
123123
- dynamic:

backend/src/main/resources/config/liquibase/changelog/20250617002_update_filter_apache.xml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
55
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">
66

7-
<changeSet id="20250617002" author="JocLRojas">
7+
<changeSet id="20250910002" author="JocLRojas">
88

99
<sql dbms="postgresql" splitStatements="true" stripComments="true">
1010
<![CDATA[
@@ -168,37 +168,37 @@ pipeline:
168168
params:
169169
key: action
170170
value: ''get''
171-
where: safe("log.method", "") && log.method == "GET"
171+
where: safe("log.method", "") == "GET"
172172
- add:
173173
function: ''string''
174174
params:
175175
key: action
176176
value: ''post''
177-
where: safe("log.method", "") && log.method == "POST"
177+
where: safe("log.method", "") == "POST"
178178
- add:
179179
function: ''string''
180180
params:
181181
key: action
182182
value: ''put''
183-
where: safe("log.method", "") && log.method == "PUT"
183+
where: safe("log.method", "") == "PUT"
184184
- add:
185185
function: ''string''
186186
params:
187187
key: action
188188
value: ''delete''
189-
where: safe("log.method", "") && log.method == "DELETE"
189+
where: safe("log.method", "") == "DELETE"
190190
- add:
191191
function: ''string''
192192
params:
193193
key: action
194194
value: ''patch''
195-
where: safe("log.method", "") && log.method == "PATCH"
195+
where: safe("log.method", "") == "PATCH"
196196
- add:
197197
function: ''string''
198198
params:
199199
key: action
200200
value: ''request''
201-
where: safe("log.method", "") && log.method == "REQUEST"
201+
where: safe("log.method", "") == "REQUEST"
202202
# Removing log.method if action was set
203203
- delete:
204204
fields:
@@ -209,7 +209,7 @@ pipeline:
209209
fields:
210210
- log.statusCode
211211
- origin.bytesReceived
212-
to: int
212+
to: float
213213
- reformat:
214214
fields:
215215
- deviceTime
@@ -228,7 +228,7 @@ pipeline:
228228
params:
229229
key: actionResult
230230
value: ''accepted''
231-
where: safe("log.statusCode", 0,0) && (log.statusCode >= double(200) && log.statusCode <= double(299) || (safe("origin.bytesReceived", 0,0) && log.statusCode >= double(300) && log.statusCode <= double(399) && origin.bytesReceived > double(0)))
231+
where: safe("log.statusCode", 0.0) >= double(200) && safe("log.statusCode", 0.0) <= double(299) || (safe("log.statusCode", 0.0) >= double(300) && safe("log.statusCode", 0.0) <= double(399) && safe("origin.bytesReceived", 0.0) > double(0))
232232
# Removing unused fields
233233
- delete:
234234
fields:

backend/src/main/resources/config/liquibase/changelog/20250617003_update_filter_auditd.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
55
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">
66

7-
<changeSet id="20250617003" author="JocLRojas">
7+
<changeSet id="20250910003" author="JocLRojas">
88

99
<sql dbms="postgresql" splitStatements="true" stripComments="true">
1010
<![CDATA[

backend/src/main/resources/config/liquibase/changelog/20250617004_update_filter_aws.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
55
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">
66

7-
<changeSet id="20250617004" author="JocLRojas">
7+
<changeSet id="20250910004" author="JocLRojas">
88

99
<sql dbms="postgresql" splitStatements="true" stripComments="true">
1010
<![CDATA[

0 commit comments

Comments
 (0)