This commit is contained in:
Sean Whalen
2018-09-26 14:48:56 -04:00
parent fa1b2721d7
commit c4e39d61b5
4 changed files with 12 additions and 4 deletions
+8
View File
@@ -1,3 +1,11 @@
4.0.1
-----
- When saving aggregate reports in Elasticsearch store `domain` in
`published_policy`
- Rename `policy_published` to `published_policy`when saving aggregate
reports to Splunk
4.0.0
-----
+2 -2
View File
@@ -17,6 +17,7 @@ class _PolicyOverride(InnerDoc):
class _PublishedPolicy(InnerDoc):
domain = Text()
adkim = Text()
aspf = Text()
p = Text()
@@ -48,7 +49,6 @@ class _AggregateReportDoc(Document):
report_id = Text()
date_range = DateRange()
errors = Text()
domain = Text()
published_policy = Object(_PublishedPolicy)
source_ip_address = Ip()
source_country = Text()
@@ -225,6 +225,7 @@ def save_aggregate_report_to_elasticsearch(aggregate_report):
begin_date_human,
end_date_human))
published_policy = _PublishedPolicy(
domain=aggregate_report["policy_published"]["domain"],
adkim=aggregate_report["policy_published"]["adkim"],
aspf=aggregate_report["policy_published"]["aspf"],
p=aggregate_report["policy_published"]["p"],
@@ -242,7 +243,6 @@ def save_aggregate_report_to_elasticsearch(aggregate_report):
report_id=metadata["report_id"],
date_range=date_range,
errors=metadata["errors"],
domain=aggregate_report["policy_published"]["domain"],
published_policy=published_policy,
source_ip_address=record["source"]["ip_address"],
source_country=record["source"]["country"],
+1 -1
View File
@@ -67,7 +67,7 @@ class HECClient(object):
new_report = dict()
for metadata in report["report_metadata"]:
new_report[metadata] = report["report_metadata"][metadata]
new_report["policy_published"] = report["policy_published"]
new_report["published_policy"] = report["policy_published"]
new_report["source_ip_address"] = record["source"][
"ip_address"]
new_report["source_country"] = record["source"]["country"]
+1 -1
View File
@@ -14,7 +14,7 @@ from setuptools import setup
from codecs import open
from os import path
__version__ = "4.0.0"
__version__ = "4.0.1"
description = "A Python package and CLI for parsing aggregate and " \
"forensic DMARC reports"