-
Notifications
You must be signed in to change notification settings - Fork 213
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
31 changed files
with
189 additions
and
5,742 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
proto-gen: | ||
buf lint protobuf && \ | ||
rm -rf ./libs/protobuf/src/main/java/com/akto && \ | ||
buf generate protobuf | ||
sh ./scripts/proto-gen.sh | ||
|
||
build: proto-gen | ||
mvn install -DskipTests | ||
|
||
build-clean: proto-gen | ||
mvn clean install -DskipTests |
266 changes: 95 additions & 171 deletions
266
apps/dashboard/src/main/java/com/akto/utils/jobs/CleanInventory.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
apps/threat-detection/src/main/java/com/akto/threat/detection/constants/KafkaTopic.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.akto.threat.detection.constants; | ||
|
||
public class KafkaTopic { | ||
public static class ThreatDetection { | ||
public static final String MALICIOUS_EVENTS = "akto.threat_detection.malicious_events"; | ||
public static final String ALERTS = "akto.threat_detection.alerts"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 0 additions & 14 deletions
14
apps/threat-detection/src/main/resources/db/migration/V1__create_base_tables.sql
This file was deleted.
Oops, something went wrong.
2 changes: 2 additions & 0 deletions
2
apps/threat-detection/src/main/resources/db/migration/V1__enable_uuid.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
-- enabling uuid extension | ||
create extension if not exists "uuid-ossp"; |
16 changes: 16 additions & 0 deletions
16
apps/threat-detection/src/main/resources/db/migration/V2__create_malicious_event_table.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
-- create schema and table for malicious events | ||
create schema if not exists threat_detection; | ||
create table if not exists threat_detection.malicious_events ( | ||
id uuid primary key default uuid_generate_v4(), | ||
actor varchar(255) not null, | ||
filter_id varchar(255) not null, | ||
url varchar(1024), | ||
ip varchar(255), | ||
method varchar(255), | ||
timestamp bigint not null, | ||
orig text not null, | ||
created_at timestamp default (timezone('utc', now())) | ||
); | ||
|
||
-- add index on actor and filter_id and sort data by timestamp | ||
create index malicious_events_actor_filter_id_timestamp_idx on threat_detection.malicious_events(actor, filter_id, timestamp desc); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.