Skip to content

Commit

Permalink
1.2.5 (#81)
Browse files Browse the repository at this point in the history
* Setup config (#70)

* Updated setup_config mgmt command

* Updated CHANGELOG.md

* Added cover

* Update README.md

* Managed values as a list

* Refactoring

* Removed comments

* buffalogs_1_2_2

* 72 exception keyerror ip in process user (#73)

* Fixed KeyError('ip')

* Updated CHANGELOG.md

* Added user.name exists in Elastic query

* Version 1.2.3

* Added new screenshots (#75)

* Fixed ValueError('make_aware expects a naive datetime) (#77)

* Fixed ValueError('make_aware expects a naive datetime)

* fix

* Set USE_TZ = True

* Updated CHANGELOG.md

* Updated CHANGELOG.md

* Version 1.2.4

* Fix fw index name (#79)

* Fixed fw-proxy index name

* Updated CHANGELOG.md

* Update README.md (#80)

* Version 1.2.5
  • Loading branch information
Lorygold authored Oct 9, 2023
1 parent 4924463 commit f9f033c
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion buffalogs/buffalogs/settings/certego.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 4 additions & 1 deletion buffalogs/impossible_travel/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion config/buffalogs/buffalogs.env
Original file line number Diff line number Diff line change
Expand Up @@ -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

2 changes: 1 addition & 1 deletion django-buffalogs/buffalogs.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions django-buffalogs/buffalogs.egg-info/SOURCES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion django-buffalogs/setup.cfg
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit f9f033c

Please sign in to comment.