mirror of
https://github.com/domainaware/parsedmarc.git
synced 2026-05-13 15:35:29 +00:00
4.0.1
This commit is contained in:
@@ -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
|
||||
-----
|
||||
|
||||
|
||||
@@ -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"],
|
||||
|
||||
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user