You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/sp_test/internal.rst
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,18 +4,18 @@ How sp_test works internally
4
4
:Release: |release|
5
5
:Date: |today|
6
6
7
-
This are a few hints how sp_test works internally. It halps to extend it with
7
+
Here are a few hints on how sp_test works internally. It helps to extend it with
8
8
new test classes
9
9
10
-
When you want to test a SAML2 entity with this tool you need following things:
10
+
When you want to test a SAML2 entity with this tool, you need the following things:
11
11
12
12
#. The Test Driver Configuration, an example can be found in tests/idp_test/config.py
13
13
#. Attribute Maps mapping URNs, OIDs and friendly names
14
14
#. Key files for the test tool
15
15
#. A metadata file representing the tool
16
16
#. The Test Target Configuration file describes how to interact with the entity to be tested. The metadata for the entity is part of this file. An example can be found in tests/idp_test/test_target_config.py.
17
17
18
-
These files should be stored outside the saml2test package to have a clean separation between the package and a particular test configuration. To create a directory for the configuration files copy the saml2test/tests including its contents.
18
+
These files should be stored outside the saml2test package to have a clean separation between the package and a particular test configuration. To create a directory for the configuration files, copy the saml2test/tests including its contents.
19
19
20
20
21
21
(1) Class and Object Structure
@@ -24,7 +24,7 @@ These files should be stored outside the saml2test package to have a clean separ
24
24
Client (sp_test/__init__.py)
25
25
.........................
26
26
Its life cycle is responsible for following activities:
27
-
- read config files and command line argumants (the test driver's config is "json_config")
27
+
- read config files and command line arguments (the test driver's config is "json_config")
28
28
- initialize the test driver IDP
29
29
- initialize a Conversation
30
30
- start the Conversion with .do_sequence_and_tests()
@@ -50,14 +50,14 @@ Sequence
50
50
51
51
Test (in the context of an operation)
52
52
....
53
-
- class to be executed as part of an operation, either before ("pre") or after ("post") the sequence or inbetween a SAML request and response ("mid").
53
+
- class to be executed as part of an operation, either before ("pre") or after ("post") the sequence or in between a SAML request and response ("mid").
54
54
There are standard tests with the Request class (VerifyAuthnRequest) and operation-specific tests.
55
55
- Example for an operation-specific "mid" test: VerifyIfRequestIsSigned
56
56
- A test may be specified together with an argument as a tuple.
57
57
58
58
Flow
59
59
....
60
-
* A tuple of classes that together implement an SAML request-response pair between IDP and SP (and possible other actors, such as a discovery service or IDP-proxy). A class can be derived from Request, Response (or other), Check or Operation.
60
+
* A tuple of classes that together implement a SAML request-response pair between IDP and SP (and possibly other actors, such as a discovery service or IDP-proxy). A class can be derived from Request, Response (or other), Check or Operation.
61
61
* A flow for a solicited authentication consists of 4 classes:
62
62
63
63
* flow[0]: Operation (Handling a login flow such as discovery or WAYF - not implemented yet)
@@ -67,19 +67,19 @@ Flow
67
67
68
68
Check (and subclasses)
69
69
.....
70
-
- an optional class that is executed on receiving the SP's HTTP response(s) after the SAML response. If there are redirects it will be called for each response.
71
-
- writes a structured test report to conv.test_output
72
-
- It can check for expected errors, which do not cause an exception but in contrary are reported as success
70
+
- An optional class that is executed on receiving the SP's HTTP response(s) after the SAML response. If there are redirects, it will be called for each response.
71
+
- Writes a structured test report to conv.test_output
72
+
- It can check for expected errors, which do not cause an exception but in contrary are reported as a success
73
73
74
74
Interaction
75
75
...........
76
76
- An interaction automates a human interaction. It searches a response from a test target for some constants, and if
77
77
there is a match, it will create a response suitable response.
78
78
79
-
(2) Simplyfied Flow
79
+
(2) Simplified Flow
80
80
:::::::::::::::::::
81
81
82
-
The following pseudocode is an extract showing an overview of what is executed
82
+
The following pseudo code is an extract showing an overview of what is executed
83
83
for test sp-00::
84
84
85
85
do_sequence_and_test(self, oper, test):
@@ -138,12 +138,12 @@ must be considered:
138
138
139
139
#. An operation that was successful because the test target reports OK (e.g. HTTP 200)
140
140
#. An operation that was successful because the test target reports NOK as expected, e.g. because of an invalid signature - HTTP 500 could be the correct response
141
-
#. An errror in SAML2Test
142
-
#. An errror in configuration of SAML2Test
141
+
#. An error in SAML2Test
142
+
#. An error in the configuration of SAML2Test
143
143
144
144
Status values are defined in saml2test.check like this:
145
145
INFORMATION = 0, OK = 1, WARNING = 2, ERROR = 3, CRITICAL = 4, INTERACTION = 5
146
146
147
147
148
-
There are 2 targets to write output to:
148
+
There are two targets to write output to:
149
149
* Test_output is written to conv.test_output during the execution of the flows.
0 commit comments