Skip to content

Commit bac5a0b

Browse files
committed
Fix warnings from docs generation
Signed-off-by: Ivan Kanakarakis <[email protected]>
1 parent 39aef2c commit bac5a0b

File tree

4 files changed

+32
-29
lines changed

4 files changed

+32
-29
lines changed

docs/examples/idp.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ An extremly simple example of a SAML2 identity provider.
66
There are 2 example IDPs in the project's example directory:
77

88
* idp2 has a static definition of users:
9-
* user attributes are defined in idp_user.py
10-
* the password is defined in the PASSWD dict in idp.py
9+
10+
* user attributes are defined in idp_user.py
11+
* the password is defined in the PASSWD dict in idp.py
12+
1113
* idp2_repoze is using repoze.who middleware to perform authentication and attribute retrieval
1214

1315
Configuration

docs/examples/sp.rst

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.. _example_sp:
22

3-
An extremely simple example of a SAML2 service provider.
3+
An extremely simple example of a SAML2 service provider
44
=======================================================
55

66
How it works
@@ -15,12 +15,12 @@ they place information in environment variables. The convention is to place
1515
identity information in environ["repoze.who.identity"].
1616
This is a dictionary with keys like 'login', and 'repoze.who.userid'.
1717

18-
The SP follows this pattern and places the information gathered from
18+
The SP follows this pattern and places the information gathered from
1919
the IdP that handled the authentication and possible extra information
2020
received from attribute authorities in the above mentioned dictionary under
2121
the key 'user'.
2222

23-
So in environ["repoze.who.identity"] you will find a dictionary with
23+
So in environ["repoze.who.identity"] you will find a dictionary with
2424
attributes and values, the attribute names used depends on what's returned
2525
from the IdP/AA. If there exists both a name and a friendly name, for
2626
instance, the friendly name is used as the key.
@@ -47,6 +47,7 @@ sp_conf.py is configured to run on localhost on port 8087. If you want to you co
4747
**sp-repoze:**
4848

4949
* Go to the folder:
50+
5051
[your path]/pysaml2/example/sp-repoze
5152

5253
* Take the file named sp_conf.py.example and rename it sp_conf.py
@@ -61,11 +62,11 @@ sp_conf.py is configured to run on localhost on port 8087. If you want to you co
6162
Important files:
6263

6364
sp_conf.py
64-
The SPs configuration
65-
65+
The SPs configuration
66+
6667
who.ini
6768
The repoze.who configuration file
68-
69+
6970
Inside the folder named pki there are two files with certificates, mykey.pem with the private
7071
certificate and mycert.pem with the public part.
7172

@@ -83,15 +84,15 @@ it line by line::
8384
"service": ["sp"],
8485

8586
Tells the software what type of services the software is supposed to
86-
supply. It is used to check for the
87+
supply. It is used to check for the
8788
completeness of the configuration and also when constructing metadata from
88-
the configuration. More about that later. Allowed values are: "sp"
89+
the configuration. More about that later. Allowed values are: "sp"
8990
(service provider), "idp" (identity provider) and "aa" (attribute authority).
9091
::
9192

9293
"entityid" : "urn:mace:example.com:saml:sp",
9394
"service_url" : "http://example.com:8087/",
94-
95+
9596
The ID of the entity and the URL on which it is listening.::
9697

9798
"idp_url" : "https://example.com/saml2/idp/SSOService.php",
@@ -101,11 +102,11 @@ is really no need for a metadata file or a WAYF-function or anything like that.
101102
It needs the URL of the IdP and that's all.::
102103

103104
"my_name" : "My first SP",
104-
105+
105106
This is just for informal purposes, not really needed but nice to do::
106107

107108
"debug" : 1,
108-
109+
109110
Well, at this point in time you'd really like to have as much information
110111
as possible as to what's going on, right ? ::
111112

@@ -122,7 +123,7 @@ xmlsec package. There are reasons for this but I won't go into them here.::
122123
"organization": {
123124
"name": "Example Co",
124125
#display_name
125-
"url":"http://www.example.com/",
126+
"url":"http://www.example.com/",
126127
},
127128

128129
Information about the organization that is behind this SP, only used when
@@ -144,20 +145,20 @@ So, now to that part. In order to allow the IdP to talk to you, you may have
144145
to provide the one running the IdP with a metadata file.
145146
If you have a SP configuration file similar to the one I've walked you
146147
through here, but with your information, you can make the metadata file
147-
by running the make_metadata script you can find in the tools directory.
148+
by running the make_metadata script you can find in the tools directory.
148149

149150
Change directory to where you have the configuration file and do ::
150151

151152
make_metadata.py sp_conf.py > metadata.xml
152-
153+
153154

154155

155156
who.ini
156157
-------
157158
The file named ``who.ini`` is the ``sp-repoze`` folder
158159

159160
I'm not going through the INI file format here. You should read
160-
`Middleware Responsibilities <http://docs.repoze.org/who/2.0/middleware.html>`_
161+
`Middleware Responsibilities <http://docs.repoze.org/who/2.0/middleware.html>`_
161162
to get a good introduction to the concept.
162163

163164
The configuration of the pysaml2 part in the applications middleware are
@@ -170,10 +171,10 @@ first the special module configuration, namely::
170171
debug = 1
171172
path_logout = .*/logout.*
172173

173-
Which contains a specification ("use") of which function in which module
174-
should be used to initialize the part. After that comes the name of the
174+
Which contains a specification ("use") of which function in which module
175+
should be used to initialize the part. After that comes the name of the
175176
file ("saml_conf") that contains the PySaml2 configuration. The third line
176-
("rememberer_name") points at the plugin that should be used to
177+
("rememberer_name") points at the plugin that should be used to
177178
remember the user information.
178179

179180
After this, the plugin is referenced in a couple of places::
@@ -182,7 +183,7 @@ After this, the plugin is referenced in a couple of places::
182183
plugins =
183184
saml2auth
184185
auth_tkt
185-
186+
186187
[authenticators]
187188
plugins = saml2auth
188189

@@ -216,10 +217,10 @@ The application
216217

217218
The app is, as said before, extremely simple. The only thing that is connected to
218219
the PySaml2 configuration is at the bottom, namely where the server is.
219-
You have to ascertain that this coincides with what is specified in the
220-
PySaml2 configuration. Apart from that there really is nothing in
221-
application.py that demands that you use PySaml2 as middleware. If you
222-
switched to using the LDAP or CAS plugins nothing would change in the
220+
You have to ascertain that this coincides with what is specified in the
221+
PySaml2 configuration. Apart from that there really is nothing in
222+
application.py that demands that you use PySaml2 as middleware. If you
223+
switched to using the LDAP or CAS plugins nothing would change in the
223224
application. In the application configuration yes! But not in the application.
224225
And that is really how it should be done.
225226

docs/howto/config.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ Example::
674674
}
675675

676676
want_assertions_or_response_signed
677-
""""""""""""""""""""
677+
""""""""""""""""""""""""""""""""""
678678

679679
Indicates that *either* the Authentication Response *or* the assertions
680680
contained within the response to this SP must be signed.

docs/sp_test/internal.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ These files should be stored outside the saml2test package to have a clean separ
2222
::::::::::::::::::::::::::::::
2323

2424
Client (sp_test/__init__.py)
25-
.........................
25+
............................
2626
Its life cycle is responsible for following activities:
2727
- read config files and command line arguments (the test driver's config is "json_config")
2828
- initialize the test driver IDP
@@ -49,7 +49,7 @@ Sequence
4949
- Example: see "sequence" item in operation dict
5050

5151
Test (in the context of an operation)
52-
....
52+
.....................................
5353
- 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").
5454
There are standard tests with the Request class (VerifyAuthnRequest) and operation-specific tests.
5555
- Example for an operation-specific "mid" test: VerifyIfRequestIsSigned
@@ -66,7 +66,7 @@ Flow
6666
* flow[3]: Check (optional - can be None. E.g. check the response if a correct error status was raised when sending a broken response)
6767

6868
Check (and subclasses)
69-
.....
69+
......................
7070
- 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.
7171
- Writes a structured test report to conv.test_output
7272
- It can check for expected errors, which do not cause an exception but in contrary are reported as a success

0 commit comments

Comments
 (0)