Skip to content

Commit 5ee6ebc

Browse files
committed
shortened "name" values; added "desrc" keys in some cases (used to improve GUI in STHREP)
1 parent 707a941 commit 5ee6ebc

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

src/sp_test/tests.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
from saml2.saml import ConditionAbstractType_
1212
from saml2.samlp import STATUS_AUTHN_FAILED
1313
from saml2.time_util import in_a_while, a_while_ago
14-
from sp_test.check import VerifyAuthnRequest
14+
from sp_test.check import VerifyAuthnRequest, VerifyDigestAlgorithm, \
15+
VerifySignatureAlgorithm, VerifyIfRequestIsSigned
1516
from sp_test import check
1617
from saml2test import ip_addresses
1718

@@ -62,7 +63,7 @@ class Response(object):
6263
_args = {}
6364
_class = samlp.Response
6465
_sign = False
65-
tests = {"post": [], "pre": []}
66+
tests = {"pre": [], "post": []}
6667

6768
def __init__(self, conv):
6869
self.args = self._args.copy()
@@ -81,7 +82,10 @@ def post_processing(self, message, *kwargs):
8182
class Request(object):
8283
response = ""
8384
_class = None
84-
tests = {"post": [VerifyAuthnRequest], "pre": []}
85+
tests = {"pre": [],
86+
"post": [VerifyAuthnRequest,
87+
VerifyDigestAlgorithm,
88+
VerifySignatureAlgorithm,]}
8589

8690
def __init__(self):
8791
pass
@@ -377,6 +381,12 @@ def pre_processing(self, message, **kwargs):
377381
"sequence": [(Login, AuthnRequest, AuthnResponse, check.VerifyEchopageContents)],
378382
"tests": {"pre": [], "post": []}
379383
},
384+
'sp-02': {
385+
"name": 'Require AuthnRequest to be signed',
386+
"descr": 'Same as SP-00, and check if a request signature can be found',
387+
"sequence": [(Login, AuthnRequest, AuthnResponse, None)],
388+
"tests": {"pre": [], "post": [VerifyIfRequestIsSigned]}
389+
},
380390
'sp-08': {
381391
"name": "SP should accept a Response without a "
382392
"SubjectConfirmationData element. If confirmation method"

0 commit comments

Comments
 (0)