diff --git a/CHANGELOG.md b/CHANGELOG.md index e0f2605..9965d38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,7 @@ ## 1.2.x +### 1.2.5 +#### Bugfix +* Fixed index name from `fw` to `fw-proxy` ### 1.2.4 #### Bugfix * Fixed ValueError('make_aware expects a naive datetime') in calc_distance function setting the timezone to True in the `Login.timestamp` model field diff --git a/README.md b/README.md index 50a6987..a7ce234 100644 --- a/README.md +++ b/README.md @@ -151,7 +151,9 @@ BuffaLogs is an Open Source project and was developed in order to allow enrichme 1. If needed, update the requirements in the `requirements.txt` and also into the `setup.cfg` file 2. Add a new entry in `CHANGELOG.md` containing all the features, changes and bugfix developed 3. Modify the **version** in the `setup.cfg` -4. Commit a PR from the develop to the main branch with the version as a Title and the changes as a comment +4. Remove the previous version of the reusable app into `django-buffalogs/dist` and create the new version running `python3 setup.py sdist` +5. Commit a PR from the develop to the main branch with the version as a Title and the changes as a comment +6. Now you can export BuffaLogs copying the `buffalogs-x.y.z.tar.gz` package into your project ## Licence This project is protected by the Apache Licence 2.0. diff --git a/buffalogs/buffalogs/settings/certego.py b/buffalogs/buffalogs/settings/certego.py index f8e1a77..66d2ec0 100644 --- a/buffalogs/buffalogs/settings/certego.py +++ b/buffalogs/buffalogs/settings/certego.py @@ -13,7 +13,7 @@ CERTEGO_BUFFALOGS_POSTGRES_USER = os.environ.get("BUFFALOGS_POSTGRES_USER", "default_user") CERTEGO_BUFFALOGS_POSTGRES_PASSWORD = os.environ.get("BUFFALOGS_POSTGRES_PASSWORD", "password") CERTEGO_BUFFALOGS_POSTGRES_PORT = os.environ.get("BUFFALOGS_POSTGRES_PORT", "5432") -CERTEGO_BUFFALOGS_ELASTIC_INDEX = os.environ.get("BUFFALOGS_ELASTIC_INDEX", "weblog-*,cloud-*,filebeat-*") +CERTEGO_BUFFALOGS_ELASTIC_INDEX = os.environ.get("BUFFALOGS_ELASTIC_INDEX", "weblog-*,cloud-*,fw-proxy-*,filebeat-*") CERTEGO_BUFFALOGS_SECRET_KEY = os.environ.get("BUFFALOGS_SECRET_KEY", "django-insecure-am9z-fi-x*aqxlb-@abkhb@pu!0da%0a77h%-8d(dwzrrktwhu") if CERTEGO_BUFFALOGS_ENVIRONMENT == ENVIRONMENT_DOCKER: diff --git a/buffalogs/impossible_travel/tasks.py b/buffalogs/impossible_travel/tasks.py index 1c8bf28..bda1c8e 100644 --- a/buffalogs/impossible_travel/tasks.py +++ b/buffalogs/impossible_travel/tasks.py @@ -161,7 +161,10 @@ def process_user(db_user, start_date, end_date): if "source" in hit: tmp = {"timestamp": hit["@timestamp"]} tmp["id"] = hit.meta["id"] - tmp["index"] = hit.meta["index"].split("-")[0] + if hit.meta["index"].split("-")[0] == "fw": + tmp["index"] = "fw-proxy" + else: + tmp["index"] = hit.meta["index"].split("-")[0] tmp["ip"] = hit["source"]["ip"] if "geo" in hit.source: if "location" in hit.source.geo and "country_name" in hit.source.geo: diff --git a/config/buffalogs/buffalogs.env b/config/buffalogs/buffalogs.env index a19f490..7035a90 100644 --- a/config/buffalogs/buffalogs.env +++ b/config/buffalogs/buffalogs.env @@ -4,6 +4,6 @@ BUFFALOGS_POSTGRES_PORT=5432 BUFFALOGS_POSTGRES_DB=buffalogs BUFFALOGS_POSTGRES_USER=default_user BUFFALOGS_POSTGRES_PASSWORD=password -BUFFALOGS_ELASTIC_INDEX=weblog-*,cloud-*,fw-proxy-* +BUFFALOGS_ELASTIC_INDEX=weblog-*,cloud-*,fw-proxy-*,filebeat-* BUFFALOGS_SECRET_KEY=django-insecure-am9z-fi-x*aqxlb-@abkhb@pu!0da%0a77h%-8d(dwzrrktwhu diff --git a/django-buffalogs/buffalogs.egg-info/PKG-INFO b/django-buffalogs/buffalogs.egg-info/PKG-INFO index b630b69..cdfc13f 100644 --- a/django-buffalogs/buffalogs.egg-info/PKG-INFO +++ b/django-buffalogs/buffalogs.egg-info/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: buffalogs -Version: 1.2.4 +Version: 1.2.5 Summary: A Django app to detect anomaly logins. Home-page: UNKNOWN Author: Lorena Goldoni diff --git a/django-buffalogs/buffalogs.egg-info/SOURCES.txt b/django-buffalogs/buffalogs.egg-info/SOURCES.txt index 281575b..53d4315 100644 --- a/django-buffalogs/buffalogs.egg-info/SOURCES.txt +++ b/django-buffalogs/buffalogs.egg-info/SOURCES.txt @@ -19,6 +19,8 @@ impossible_travel/views.py impossible_travel/management/commands/clear_models.py impossible_travel/management/commands/impossible_travel.py impossible_travel/management/commands/setup_config.py +impossible_travel/management/commands/__pycache__/clear_models.cpython-310.pyc +impossible_travel/management/commands/__pycache__/impossible_travel.cpython-310.pyc impossible_travel/management/commands/__pycache__/setup_config.cpython-310.pyc impossible_travel/migrations/0001_initial.py impossible_travel/migrations/0002_alert_updated.py diff --git a/django-buffalogs/setup.cfg b/django-buffalogs/setup.cfg index 9dcdc18..c57b1ee 100644 --- a/django-buffalogs/setup.cfg +++ b/django-buffalogs/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = buffalogs -version = 1.2.4 +version = 1.2.5 description = A Django app to detect anomaly logins. long_description = file: README.rst author = Lorena Goldoni