Skip to content

Commit 2151e5c

Browse files
authored
Merge pull request #2479 from akto-api-security/fix/threat-customer-logs
Add better logs for threat module
2 parents d52f5f7 + 8890c7e commit 2151e5c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apps/threat-detection/src/main/java/com/akto/threat/detection/tasks/MaliciousTrafficDetectorTask.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,10 @@ private void processRecord(HttpResponseParam record) throws Exception {
186186
return;
187187
}
188188

189-
logger.debugAndAddToDb("Processing record with actor IP: " + responseParam.getSourceIP());
190189
Context.accountId.set(Integer.parseInt(responseParam.getAccountId()));
191190
Map<String, FilterConfig> filters = this.getFilters();
192191
if (filters.isEmpty()) {
192+
logger.warnAndAddToDb("No filters found for account " + responseParam.getAccountId());
193193
return;
194194
}
195195

@@ -207,6 +207,7 @@ private void processRecord(HttpResponseParam record) throws Exception {
207207
ApiInfo.ApiInfoKey apiInfoKey = new ApiInfo.ApiInfoKey(apiCollectionId, url, method);
208208

209209
for (FilterConfig apiFilter : apiFilters.values()) {
210+
logger.debugAndAddToDb("Evaluating filter condition for url " + apiInfoKey.getUrl() + " filterId " + apiFilter.getId());
210211
boolean hasPassedFilter = validateFilterForRequest(apiFilter, rawApi, apiInfoKey);
211212

212213
// If a request passes any of the filter, then it's a malicious request,

0 commit comments

Comments
 (0)