Skip to content

Commit

Permalink
1.2.7 (#85)
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

* Fix linters requirements (#82)

* Removed linters requirements from setup

* Updated CHANGELOG.md

* Updated requirements

* Version 1.2.6

* Fix

* revert

* Fixed alert description format (#84)

* Fixed alert description format

* fixed test

* Version 1.2.7
  • Loading branch information
Lorygold committed Oct 20, 2023
1 parent 9f7879c commit 45cd85f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 13 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.7
#### Bugfix
* Fixed alert description format
### 1.2.6
#### Bugfix
* Removed linters from the setup app requirements
Expand Down
3 changes: 1 addition & 2 deletions buffalogs/impossible_travel/modules/impossible_travel.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ def calc_distance(self, db_user, prev_login, last_login_user_fields):
alert_info["alert_name"] = Alert.ruleNameEnum.IMP_TRAVEL
alert_info[
"alert_desc"
] = f"{alert_info['alert_name']} for User: {db_user.username},\
at: {last_timestamp_datetimeObj_aware}, from: {last_login_user_fields['country']}, previous country: {prev_login.country}, distance covered at {int(vel)} Km/h"
] = f"{alert_info['alert_name']} for User: {db_user.username}, at: {last_timestamp_datetimeObj_aware}, from: {last_login_user_fields['country']}, previous country: {prev_login.country}, distance covered at {int(vel)} Km/h"
return alert_info, int(vel)

def update_model(self, db_user, new_login):
Expand Down
2 changes: 1 addition & 1 deletion buffalogs/impossible_travel/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,8 @@ def test_alerts_api(self):
start = creation_mock_time
end = creation_mock_time + timedelta(minutes=10)
list_expected_result = [
{"timestamp": "2023-05-20T11:45:01.229Z", "username": "Lorena Goldoni", "rule_name": "Login from new device"},
{"timestamp": "2023-06-20T10:17:33.358Z", "username": "Lorena Goldoni", "rule_name": "Impossible Travel detected"},
{"timestamp": "2023-05-20T11:45:01.229Z", "username": "Lorena Goldoni", "rule_name": "Login from new device"},
]
response = self.client.get(f"{reverse('alerts_api')}?start={start.strftime('%Y-%m-%dT%H:%M:%SZ')}&end={end.strftime('%Y-%m-%dT%H:%M:%SZ')}")
self.assertEqual(response.status_code, 200)
Expand Down
6 changes: 1 addition & 5 deletions django-buffalogs/buffalogs.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
Metadata-Version: 2.1
Name: buffalogs
<<<<<<< HEAD
Version: 1.2.6
=======
Version: 1.2.5
>>>>>>> f9f033cfd163c35cbf219f20806c3b4fb845860c
Version: 1.2.7
Summary: A Django app to detect anomaly logins.
Home-page: UNKNOWN
Author: Lorena Goldoni
Expand Down
6 changes: 1 addition & 5 deletions django-buffalogs/setup.cfg
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
[metadata]
name = buffalogs
<<<<<<< HEAD
version = 1.2.6
=======
version = 1.2.5
>>>>>>> f9f033cfd163c35cbf219f20806c3b4fb845860c
version = 1.2.7
description = A Django app to detect anomaly logins.
long_description = file: README.rst
author = Lorena Goldoni
Expand Down

0 comments on commit 45cd85f

Please sign in to comment.