[Python-modules-commits] [authres] 01/06: Imported Upstream version 1.0.0
Scott Kitterman
kitterman at moszumanska.debian.org
Sat Jul 15 20:37:06 UTC 2017
This is an automated email from the git hooks/post-receive script.
kitterman pushed a commit to branch debian/master
in repository authres.
commit 88d83685a4356c946cd3b954c1bbf9002c756ecb
Author: Scott Kitterman <scott at kitterman.com>
Date: Sat Jul 15 15:54:25 2017 -0400
Imported Upstream version 1.0.0
---
CHANGES | 5 +++++
PKG-INFO | 2 +-
authres/__init__.py | 6 ++++--
authres/__main__.py | 3 +--
authres/{dmarc.py => arc.py} | 35 ++++++++++++++++++++---------------
authres/core.py | 1 -
authres/dkim_adsp.py | 1 -
authres/dkim_b.py | 1 -
authres/dmarc.py | 7 ++-----
authres/rrvs.py | 1 -
authres/smime.py | 1 -
authres/tests | 13 +++++++++++--
authres/vbr.py | 1 -
setup.py | 2 +-
14 files changed, 45 insertions(+), 34 deletions(-)
diff --git a/CHANGES b/CHANGES
index 90f8078..1819a29 100644
--- a/CHANGES
+++ b/CHANGES
@@ -4,6 +4,11 @@
# ! = Changed something significant, or removed a feature
# * = Fixed a bug, or made a minor improvement
+--- 1.0.0 (2017-07-14)
+ + Added initial experimental support for ARC results
+ + Swith to sematic versioning scheme and only set version in setup.py and
+ __init__
+
--- 0.900 (2016-12-11)
+ Add support for RFC 7601 use of SMTP auth with the mailfrom property
* Updated README and docstring reference to refer to RFC 7601
diff --git a/PKG-INFO b/PKG-INFO
index 6610fe7..73e1b1d 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: authres
-Version: 0.900
+Version: 1.0.0
Summary: authres - Authentication Results Header Module
Home-page: https://launchpad.net/authentication-results-python
Author: Julian Mehnle, Scott Kitterman
diff --git a/authres/__init__.py b/authres/__init__.py
index 75bdae0..4513ed5 100644
--- a/authres/__init__.py
+++ b/authres/__init__.py
@@ -94,7 +94,7 @@ MODULE = 'authres'
__author__ = 'Julian Mehnle, Scott Kitterman'
__email__ = 'julian at mehnle.net'
-__version__ = '0.900'
+__version__ = '1.0.0'
import authres.core
@@ -185,13 +185,15 @@ def all_features():
import authres.dmarc
import authres.smime
import authres.rrvs
+ import authres.arc
_all_features = FeatureContext(
authres.dkim_b,
authres.dkim_adsp,
authres.vbr,
authres.dmarc,
authres.smime,
- authres.rrvs
+ authres.rrvs,
+ authres.arc
)
return _all_features
diff --git a/authres/__main__.py b/authres/__main__.py
index 49424b9..027466c 100644
--- a/authres/__main__.py
+++ b/authres/__main__.py
@@ -18,12 +18,11 @@
"""
Package for parsing ``Authentication-Results`` headers as defined in RFC
5451/7001/7601. Optional support for authentication methods defined in RFCs
-5617, 6008, 6212, and 7281.
+5617, 6008, 6212, 7281, 7489, and draft-ietf-dmarc-arc-protocol-05.
"""
__author__ = 'Julian Mehnle, Scott Kitterman'
__email__ = 'scott at kitterman.com'
-__version__ = '0.900'
def _test():
import doctest
diff --git a/authres/dmarc.py b/authres/arc.py
similarity index 51%
copy from authres/dmarc.py
copy to authres/arc.py
index fd02582..6ea90f0 100644
--- a/authres/dmarc.py
+++ b/authres/arc.py
@@ -1,6 +1,6 @@
# coding: utf-8
-# Copyright © 2012-2013 Julian Mehnle <julian at mehnle.net>,
+# Copyright © 2017 Gene Shuman <gene at valimail.com>,
# Copyright © 2012-2013 Scott Kitterman <scott at kitterman.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -16,42 +16,47 @@
# limitations under the License.
"""
-authres extension module for the DMARC (draft-kucherawy-dmarc-base-01)
-authentication method.
+authres extension module for the Authenticated Recieved Chain (ARC)
+(draft-ietf-dmarc-arc-protocol-05) authentication method.
"""
#MODULE = 'authres'
-__author__ = 'Scott Kitterman, Julian Mehnle'
-__email__ = 'scott at kitterman.com'
-__version__ = '0.900'
+__author__ = 'Scott Kitterman, Gene Shuman'
+__email__ = 'scott at kitterman.com, gene at valimail.com'
import authres.core
from authres.core import make_result_class_properties
-class DMARCAuthenticationResult(authres.core.AuthenticationResult):
+class ARCAuthenticationResult(authres.core.AuthenticationResult):
"""
- DMARC (draft-kucherawy-dmarc-base-01) result clause of an
- ``Authentication-Results`` header"""
+ ARC (draft-ietf-dmarc-arc-protocol-05) result clause of an
+ ``Authentication-Results`` header
+ Note: Still under development API subject to change."""
- METHOD = 'dmarc'
+ METHOD = 'arc'
def __init__(self, version = None,
result = None, result_comment = None,
reason = None, reason_comment = None,
properties = None,
- header_from = None, header_from_comment = None
+ header_d = None, header_d_comment = None,
):
authres.core.AuthenticationResult.__init__(self, self.METHOD, version,
result, result_comment, reason, reason_comment, properties)
+ if header_d: self.header_d = header_d
+ if header_d_comment: self.header_d_comment = header_d_comment
- if header_from: self.header_from = header_from
- if header_from_comment: self.header_from_comment = header_from_comment
+ header_d, header_d_comment = make_result_class_properties('header', 'd')
- header_from, header_from_comment = make_result_class_properties('header', 'from')
+ def match_signature(self, signature_d):
+ """Match authentication result against a ARC signature by ``header.d``."""
+
+ return self.header_d == signature_d
RESULT_CLASSES = [
- DMARCAuthenticationResult
+ ARCAuthenticationResult
]
# vim:sw=4 sts=4
+
diff --git a/authres/core.py b/authres/core.py
index afca844..9dbbdb8 100644
--- a/authres/core.py
+++ b/authres/core.py
@@ -24,7 +24,6 @@ Module for parsing ``Authentication-Results`` headers as defined in RFC 5451,
__author__ = 'Julian Mehnle, Scott Kitterman'
__email__ = 'julian at mehnle.net'
-__version__ = '0.900'
import re
diff --git a/authres/dkim_adsp.py b/authres/dkim_adsp.py
index 5c2ef79..606a1cd 100644
--- a/authres/dkim_adsp.py
+++ b/authres/dkim_adsp.py
@@ -23,7 +23,6 @@ authres extension module for the RFC 5617 DKIM/ADSP authentication method.
__author__ = 'Scott Kitterman, Julian Mehnle'
__email__ = 'scott at kitterman.com'
-__version__ = '0.900'
import authres.core
from authres.core import make_result_class_properties
diff --git a/authres/dkim_b.py b/authres/dkim_b.py
index 261127f..a5f925f 100644
--- a/authres/dkim_b.py
+++ b/authres/dkim_b.py
@@ -23,7 +23,6 @@ authres extension module for RFC 6008 DKIM signature identification (header.b).
__author__ = 'Scott Kitterman, Julian Mehnle'
__email__ = 'scott at kitterman.com'
-__version__ = '0.900'
import authres.core
from authres.core import make_result_class_properties
diff --git a/authres/dmarc.py b/authres/dmarc.py
index fd02582..d3ff828 100644
--- a/authres/dmarc.py
+++ b/authres/dmarc.py
@@ -16,23 +16,20 @@
# limitations under the License.
"""
-authres extension module for the DMARC (draft-kucherawy-dmarc-base-01)
-authentication method.
+authres extension module for the DMARC RFC 7489 authentication method.
"""
#MODULE = 'authres'
__author__ = 'Scott Kitterman, Julian Mehnle'
__email__ = 'scott at kitterman.com'
-__version__ = '0.900'
import authres.core
from authres.core import make_result_class_properties
class DMARCAuthenticationResult(authres.core.AuthenticationResult):
"""
- DMARC (draft-kucherawy-dmarc-base-01) result clause of an
- ``Authentication-Results`` header"""
+ DMARC RFC 7489 result clause of an ``Authentication-Results`` header"""
METHOD = 'dmarc'
diff --git a/authres/rrvs.py b/authres/rrvs.py
index e054890..6376101 100644
--- a/authres/rrvs.py
+++ b/authres/rrvs.py
@@ -24,7 +24,6 @@ authres extension module for RFC 7293, The Require-Recipient-Valid-Since
__author__ = 'Scott Kitterman, Julian Mehnle'
__email__ = 'scott at kitterman.com'
-__version__ = '0.900'
import authres.core
from authres.core import make_result_class_properties
diff --git a/authres/smime.py b/authres/smime.py
index 863d0e8..ff233f7 100644
--- a/authres/smime.py
+++ b/authres/smime.py
@@ -24,7 +24,6 @@ for S/MIME Signature Verification authentication method.
__author__ = 'Scott Kitterman, Julian Mehnle'
__email__ = 'scott at kitterman.com'
-__version__ = '0.900'
import authres.core
from authres.core import make_result_class_properties
diff --git a/authres/tests b/authres/tests
index 5ed56fd..f953bea 100644
--- a/authres/tests
+++ b/authres/tests
@@ -18,7 +18,7 @@
"""
Package for parsing ``Authentication-Results`` headers as defined in RFC 5451.
Optional support for authentication methods defined in RFCs 5617, 6008, 6212,
-and draft-kucherawy-dmarc-base-01.
+7489 and draft-ietf-dmarc-arc-protocol-05.
>>> import authres
>>> str(authres.AuthenticationResultsHeader('test.example.org', version=1))
'Authentication-Results: test.example.org 1; none'
@@ -422,7 +422,7 @@ RFC 6212 A.1
>>> str(arobj.results[1].properties[1].value)
'voucher.example.org'
-# draft-kucherawy-dmarc-base-01 example from opendmarc
+# RFC 7489 DMARC example from opendmarc
>>> import authres
>>> import authres.dmarc
>>> new_context = authres.FeatureContext(authres.dmarc)
@@ -525,6 +525,15 @@ RFC 6212 A.1
... results = [mfrom_pass, helo_none]))
'Authentication-Results: example.com; spf=pass smtp.mailfrom=authenticated at example.net; spf=none reason="No SPF record for HELO" smtp.helo=mailserver.example.net'
+# Create header field with ARC results (draft-ietf-dmarc-arc-protocol-05)
+>>> import authres
+>>> import authres.arc
+>>> arc_pass = authres.arc.ARCAuthenticationResult(result = 'pass',
+... header_d = 'example.net')
+>>> str(authres.AuthenticationResultsHeader(authserv_id = 'example.com',
+... results = [arc_pass]))
+'Authentication-Results: example.com; arc=pass header.d=example.net'
+
# Parsing IP6 address.
>>> arobj = authres_context.parse('Authentication-Results: mail.bmsi.com; iprev=pass policy.iprev="2001:748:100:40::2:2" (mout0.freenet.de); spf=none smtp.mailfrom=markuslaudi at freenet.de')
>>> str(arobj.results[0])
diff --git a/authres/vbr.py b/authres/vbr.py
index 87bddb3..f66aa8f 100644
--- a/authres/vbr.py
+++ b/authres/vbr.py
@@ -24,7 +24,6 @@ authentication method.
__author__ = 'Scott Kitterman, Julian Mehnle'
__email__ = 'scott at kitterman.com'
-__version__ = '0.900'
import authres.core
from authres.core import make_result_class_properties
diff --git a/setup.py b/setup.py
index 6e84ef2..8119549 100755
--- a/setup.py
+++ b/setup.py
@@ -16,7 +16,7 @@
from distutils.core import setup
setup(name='authres',
- version='0.900',
+ version='1.0.0',
description='authres - Authentication Results Header Module',
author='Julian Mehnle, Scott Kitterman',
author_email='julian at mehnle.net',
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/authres.git
More information about the Python-modules-commits
mailing list