Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ingress #129

Open
wants to merge 157 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
157 commits
Select commit Hold shift + click to select a range
e8c4468
linting fixes
mazhurin Jun 4, 2020
75672e5
linting fixes
mazhurin Jun 5, 2020
176c0ba
Action renamed to Unit Tests
mazhurin Jun 5, 2020
432a9fe
Not linting esretriever and spark/iforest
mazhurin Jun 5, 2020
5c6ccd8
Merge pull request #13 from equalitie/action_fix
mazhurin Jun 5, 2020
4a106e1
Parameter model_path is implemented. ModelEnum names are used int the…
mazhurin Jun 8, 2020
8307b47
Fix for ModelEnum in TrainingPipeline
mazhurin Jun 9, 2020
3456190
Merge pull request #14 from equalitie/model_path
mazhurin Jun 9, 2020
8d17664
Rollback of the config change in model_path PR. Now, as before, engin…
mazhurin Jun 10, 2020
3140cd3
Unused import removed.
mazhurin Jun 10, 2020
be2e481
Merge pull request #15 from equalitie/model_config_fix
mazhurin Jun 10, 2020
70ac66d
New features: country and host. (#20)
mazhurin Jun 25, 2020
d5a7aa5
initial implementation of split: WIP
mkaranasou Jun 3, 2020
0402d82
Service Provider implementation
mkaranasou Jun 10, 2020
779d168
sample vectors for prediction pipeline
mkaranasou Jun 11, 2020
9d88a1d
semi-functional kafka streaming for prediction + simulation script
mkaranasou Jun 11, 2020
85caf4f
Functional prediction pipeline
mkaranasou Jun 11, 2020
262a360
client pipeline adjustments + license in new files
mkaranasou Jun 12, 2020
a0934c6
functional redis steps - store / retrieve (full isac)
mkaranasou Jun 15, 2020
086dc85
moved tasks and pipelines in a separate package
mkaranasou Jun 17, 2020
01f3122
Fix spark config for redis
mkaranasou Jun 17, 2020
179b907
flake8ing
mkaranasou Jun 17, 2020
6d444e9
flake8ing
mkaranasou Jun 17, 2020
8e9d421
remove training pipeline base
mkaranasou Jun 17, 2020
d851f4d
Add sample vectors for `id_client1` to facilitate testing
mkaranasou Jun 17, 2020
032a3fe
doc and refactoring of vector simulation script
mkaranasou Jun 17, 2020
9a38f49
flake8ing
mkaranasou Jun 17, 2020
32f11e5
flake8ing - again..
mkaranasou Jun 17, 2020
316f629
put service provider in a separate file
mkaranasou Jun 18, 2020
a93e9fb
unittests pt1
mkaranasou Jun 22, 2020
272105d
licensing + linting
mkaranasou Jun 22, 2020
36bef3b
task base tests
mkaranasou Jun 22, 2020
0eee932
renamings according to review
mkaranasou Jun 24, 2020
1b493b6
review changes
mkaranasou Jun 24, 2020
18d7e21
updated docs
mkaranasou Jun 24, 2020
da6f747
updating configuration
mkaranasou Jun 24, 2020
dfe72a2
merge gone bad
mkaranasou Jun 25, 2020
d6dba60
linting
mkaranasou Jun 25, 2020
fb1fc9f
linting...
mkaranasou Jun 25, 2020
10bbe61
license check and action
mkaranasou Jun 25, 2020
929ecfb
move beautifulsoup import
mkaranasou Jun 25, 2020
520466d
Merge pull request #17 from equalitie/activity_1.1_pipeline_separation
mkaranasou Jun 29, 2020
4983a15
Merge pull request #22 from equalitie/license_check
mkaranasou Jun 29, 2020
06aa066
fill in prediction columns if no model
mkaranasou Jul 7, 2020
875efb9
Created_at fix (#24)
mazhurin Jul 7, 2020
ceda7e2
Drop created_at column after saving to db. (#27)
mazhurin Jul 7, 2020
910db12
TrainingPipeline: filter by created_at column now (not stop column).
mazhurin Jul 10, 2020
c8329a7
Merge branch 'develop' of github.com:equalitie/baskerville into develop
mazhurin Jul 10, 2020
0b7cb02
TrainingPipeline: typo fix for filter by created_at column.
mazhurin Jul 10, 2020
2833c1c
TrainingPipeline: get_bound() fix for filter by created_at column.
mazhurin Jul 10, 2020
d14c590
TrainingPipeline logging the saved model path.
mazhurin Jul 10, 2020
88d60af
Merge pull request #28 from equalitie/issue_25_1.1_bug_fixes
mkaranasou Jul 11, 2020
145cd7c
Calculate Anomaly Score (#29)
mkaranasou Jul 22, 2020
6d8cd6e
Separation Pipeline fixes (#31)
mazhurin Aug 4, 2020
5134d1b
AttackDetection task with both challenge commands : per host and per …
mazhurin Aug 6, 2020
058c485
Banjax metrics (#38)
mazhurin Aug 7, 2020
e2d3b78
Minor fixes for Banjax metrics. (#39)
mazhurin Aug 7, 2020
b356f48
Redis fix (#40)
mazhurin Aug 17, 2020
443d729
Sliding window for attack detection (#45)
mazhurin Sep 14, 2020
fbaa6c3
DEPLOYMENT.md updated (#50)
mazhurin Sep 21, 2020
cd96325
Host country (#51)
mazhurin Sep 23, 2020
872b781
Sliding window (#52)
mazhurin Sep 23, 2020
39c91e7
All the attack detection metrics have been removed. (#54)
mazhurin Sep 28, 2020
8c97241
Spark Persist disabled (#55)
mazhurin Sep 28, 2020
959cbcc
Low rate attack with 2 conditions (#56)
mazhurin Sep 28, 2020
d0c9842
Fix for the empty white list in the configuration (#57)
mazhurin Oct 1, 2020
7f95dbf
Evaluation and Labeling notebooks.
mkaranasou Feb 3, 2021
a1f8066
ip_passed_challenge2 (#73)
mazhurin Feb 15, 2021
c9a31bc
Reuse parameter in model.predict() (#72)
mazhurin Feb 15, 2021
cf1641e
Configurable option for kafka sending: either by partitions or with c…
mazhurin Feb 26, 2021
36f1573
S3 (#79)
mazhurin Mar 26, 2021
e449f85
Using stop instead of start in create_ids to avoid potential conflict…
mazhurin Apr 12, 2021
a7c2eff
First draft(not tested)
mazhurin Feb 15, 2021
0de34b7
Fix in cache.filter_by() for memory only
mazhurin Feb 15, 2021
cd45a94
load test: do not challenge duplicated traffic
mkaranasou Feb 5, 2021
aa4f48c
split challenge to handle load test
mkaranasou Feb 5, 2021
3e3d5b9
bug fix in filtering out load test data
mkaranasou Feb 5, 2021
c238089
dashboard models
mkaranasou Feb 11, 2021
3c58d10
task changes in attack detection
mkaranasou Feb 11, 2021
1bcd55c
Feedback pipeline - WIP
mkaranasou Feb 11, 2021
ae5434f
helpers
mkaranasou Feb 11, 2021
e261275
pipeline factory
mkaranasou Feb 11, 2021
b13bddd
id_request_sets -> uuid_request_set + additional dashboard models
mkaranasou Feb 12, 2021
f02821b
uuid_request_set
mkaranasou Feb 12, 2021
1623197
dashboard models changes
mkaranasou Feb 15, 2021
996ee65
user config
mkaranasou Feb 16, 2021
8c750a6
attack link to org and feedback save task - first pass
mkaranasou Feb 17, 2021
bca0053
functional feedback pipeline
mkaranasou Feb 25, 2021
da24049
er diagram
mkaranasou Mar 5, 2021
65cb5ce
updating requirements
mkaranasou Mar 11, 2021
87ed85b
missed runtime filename
mkaranasou Mar 16, 2021
dc2f8e4
model transfer - do not link request sets
mkaranasou Mar 17, 2021
061868d
model transfer
mkaranasou Mar 17, 2021
ab41a96
model transfer request sets set to empty list
mkaranasou Mar 17, 2021
472a093
fix rebase
mkaranasou Mar 17, 2021
6d15d90
Initial re-train pipeline and model reload
mkaranasou Mar 23, 2021
c6a96fb
functional retrain pipeline
mkaranasou Mar 23, 2021
977a2d8
pipeline factory update
mkaranasou Mar 23, 2021
ae5011b
retrain schema update
mkaranasou Mar 23, 2021
9dcbc96
send updates to client
mkaranasou Mar 25, 2021
5756fad
re-base + handle missing features in predict
mkaranasou Apr 2, 2021
a2d3bea
flake8ing
mkaranasou Apr 15, 2021
a56fcca
Merge pull request #80 from equalitie/model_retrain_live_load
mkaranasou Apr 15, 2021
40d6dba
Log filter (#82)
mazhurin Apr 15, 2021
7a92365
passlib for dashboard models
mkaranasou Apr 15, 2021
975fbf7
troubleshooting prod
mkaranasou Apr 17, 2021
b71723f
troubleshooting
mkaranasou Apr 17, 2021
bb89683
troubleshooting missing features
mkaranasou Apr 17, 2021
b0cfaa6
missing features in predictions schema
mkaranasou Apr 17, 2021
0205b1d
debugging merge with sensitive data
mkaranasou Apr 17, 2021
cb4292b
revert change
mkaranasou Apr 17, 2021
1483cd3
debugging prod
mkaranasou Apr 17, 2021
81955a9
bugfix: message schema vs features schema
mkaranasou Apr 17, 2021
1c64502
remove logging
mkaranasou Apr 17, 2021
1f276ef
logging for second issue
mkaranasou Apr 17, 2021
afac851
logging
mkaranasou Apr 17, 2021
289aeeb
apply whitelist ips
mkaranasou Apr 17, 2021
a44c853
add features to json columns
mkaranasou Apr 17, 2021
1250408
removing logs
mkaranasou Apr 17, 2021
4d40f81
TypeError: send_to_kafka() takes from 3 to 5 positional arguments but 6
mkaranasou Apr 20, 2021
2d93475
reverting
mkaranasou Apr 20, 2021
aaafa66
Merge pull request #83 from equalitie/production_tuning_1
mkaranasou Apr 20, 2021
ffa4135
Kubernetes (#84)
mazhurin May 20, 2021
9a98e71
Support for kafka connection configuration per client. (#85)
mazhurin Jun 1, 2021
ed134b4
Fixing whitelist ips (#86)
mazhurin Jun 29, 2021
94ffeff
Redis password optional. Sending predictions to client fix. (#87)
mazhurin Jun 29, 2021
9887d34
Kubernetes deployment (#92)
mazhurin Sep 21, 2021
0c94b75
Incident detection sql (#93)
mazhurin Nov 8, 2021
af1c704
start in whitelist urls
mazhurin Nov 17, 2021
8db8ec9
Kafka ACL and client onboarding added in README (#95)
mazhurin Nov 17, 2021
ef2c73f
Support for sending challenged ips to Elasticsearch (#97)
mazhurin Dec 13, 2021
5ee2661
Support for sending passed challenged ips to Elasticsearch (#98)
mazhurin Dec 14, 2021
0f843ef
Support for sending passed challenged ips to Elasticsearch (#99)
mazhurin Dec 28, 2021
7f5501d
Dynamic threshold. We use a more aggressive threshold if an incident …
mazhurin Jan 3, 2022
e40266d
Fix the labeler: save all columng of request_sets (#101)
mazhurin Jan 6, 2022
f5c4d3a
JAVA sdk downgraded to fix s3 issue. Incident detector null fix. Opti…
mazhurin Jan 19, 2022
009ef25
Rawlog fix. Attack detection fix(F.lit). (#106)
mazhurin Jan 21, 2022
205b78e
Merge branch 'master' into develop
mazhurin Jan 21, 2022
b1b16a0
Debug log line removed from AttackDetection (#108)
mazhurin Jan 21, 2022
949c27d
Classifier removed from labeler (#109)
mazhurin Feb 10, 2022
82b422d
Classifier (#111)
mazhurin Mar 9, 2022
f1b2954
Incident detector fix (#112)
mazhurin Mar 21, 2022
f412d84
Incident detector fix. Now the detection is completely relies on anom…
mazhurin Apr 6, 2022
2f05a49
White list hosts removed from postprocessing. (#114)
mazhurin Apr 25, 2022
212e487
challenge fix in postprocessing. Column `challenged` must be defaulte…
mazhurin May 2, 2022
01b79fd
KSQL (#117)
mazhurin May 27, 2022
157c402
Filebeat (#116)
mazhurin May 27, 2022
6b3797e
postprocessing streaming to s3
mazhurin Jun 8, 2022
246abeb
Kstream for cstats (#120)
mazhurin Jun 24, 2022
e43b064
New json schema (#119)
mazhurin Jun 24, 2022
cc44244
Logstash+ (#122)
mazhurin Nov 24, 2022
aae626c
Elasticsearch (#125)
mazhurin Dec 27, 2022
898c587
Tracking in Cstats (#126)
mazhurin Jan 30, 2023
38ff897
Whitelisting solved challenge IPs (#127)
mazhurin Nov 20, 2023
713d700
Ingress with Letsencrypt certificate manager for Grafana and Kibana
mazhurin Dec 4, 2023
7e08df7
LoadBalancer removed. values_ch.yaml added for Cloudflare topics.
mazhurin Jun 11, 2024
52d7638
Merge branch 'master' into ingress
mazhurin Jun 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
jobs:
build:

runs-on: ubuntu-latest
runs-on: ubuntu-18.04

steps:
- uses: actions/checkout@v2
Expand All @@ -28,22 +28,17 @@ jobs:
git clone -b categorical_features https://github.com/equalitie/spark-iforest.git
cd spark-iforest/python
python setup.py sdist
pip install dist/pyspark-iforest-2.4.0.tar.gz
pip install dist/pyspark-iforest-2.4.0.99.tar.gz
cd ../../
git clone https://github.com/equalitie/esretriever.git
cd esretriever
sudo pip install -e .
cd ..
mkdir ./src/baskerville/logs/
- name: Lint with flake8
run: |
cd ./src
flake8 . --count --ignore=C901,W503,W504,E226 --max-line-length=127 --statistics
./linting.sh

- name: Test with pytest
run: |
export PYTHONPATH="./src:./esretriever/src"
pytest ./tests/unit
- name: License check
run: |
python ./src/baskerville/util/licensing.py
python ./src/baskerville/util/licensing.py
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ RUN rm -r $JAVA_HOME/*
RUN mv jdk262/openlogic-openjdk-8u262-b10-linux-64/* $JAVA_HOME/

COPY ./src /usr/local/baskerville/src
COPY ./data/jars /usr/local/baskerville/data/jars
COPY ./data /usr/local/baskerville/data
COPY ./requirements.txt /usr/local/baskerville

WORKDIR /usr/local/baskerville
Expand Down
Binary file added data/geoip2/GeoLite2-Country.mmdb
Binary file not shown.
2 changes: 1 addition & 1 deletion data/samples/ats_log_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "string",
"format": "date",
"pattern": "(\\d\\d\\d\\d-([0-2])?\\d-([0-3])?\\dT?([0-2])?\\d:([0-5])?\\d:([0-5])?\\d\\.\\d?\\d?\\d?Z?)",
"required": true
"required": false
},
"ISP": {
"type": "string"
Expand Down
64 changes: 64 additions & 0 deletions data/samples/weblog_schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"name": "Weblogs",
"properties": {
"datestamp": {
"type": "string",
"format": "date",
"pattern": "(\\d\\d\\d\\d-([0-2])?\\d-([0-3])?\\dT?([0-2])?\\d:([0-5])?\\d:([0-5])?\\d\\.\\d?\\d?\\d?Z?)",
"required": true
},
"cache_result": {
"type": "string"
},
"client_ip": {
"type": "string",
"pattern": "(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}"
},
"client_request_host": {
"type": "string"
},
"client_request_method": {
"type": "string",
"default": ""
},
"client_ua": {
"type": "string"
},
"client_url": {
"type": "string"
},
"content_type": {
"type": "string"
},
"http_request_scheme": {
"type": "string"
},
"http_response_code": {
"type": "string",
"pattern": "[1-5][0-9][0-9]"
},
"querystring": {
"type": "string"
},
"reply_length_bytes": {
"type": "string"
},
"geoip": {
"location": {
"lon": {
"type": "string",
"format": "number"
},
"lat": {
"type": "string",
"format": "number"
}
},
"country_name":{
"type": "string"
}
}
},
"required": ["datestamp", "client_ip", "client_request_host", "client_ua", "client_url", "content_type", "http_response_code", "querystring", "reply_length_bytes", "geoip"],
"additionalProperties": false
}
Loading
Loading