Skip to content

Commit 8214b54

Browse files
Merge pull request #640 from kalevivt/master
Various typo fixes
2 parents a1054c6 + 38b782a commit 8214b54

File tree

5 files changed

+59
-59
lines changed

5 files changed

+59
-59
lines changed

docs/howto/config.rst

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Configuration of pySAML2 entities
44
=================================
55

66
Whether you plan to run a pySAML2 Service Provider, Identity Provider or an
7-
attribute authority you have to configure it. The format of the configuration
7+
attribute authority, you have to configure it. The format of the configuration
88
file is the same regardless of which type of service you plan to run.
99
What differs are some of the directives.
1010
Below you will find a list of all the used directives in alphabetical order.
@@ -42,7 +42,7 @@ The basic structure of the configuration file is therefore like this::
4242
}
4343

4444
.. note:: You can build the metadata file for your services directly from the
45-
configuration.The make_metadata.py script in the pySAML2 tools directory
45+
configuration. The make_metadata.py script in the pySAML2 tools directory
4646
will do that for you.
4747

4848
Configuration directives
@@ -81,7 +81,7 @@ Format::
8181
"attribute_map_dir": "attribute-maps"
8282

8383
Points to a directory which has the attribute maps in Python modules.
84-
A typical map file will looks like this::
84+
A typical map file will look like this::
8585

8686
MAP = {
8787
"identifier": "urn:oasis:names:tc:SAML:2.0:attrname-format:basic",
@@ -111,7 +111,7 @@ As you see the format is again a python dictionary where the key is the
111111
name to convert from, and the value is the name to convert to.
112112

113113
Since *to* in most cases is the inverse of the *fro* file, the
114-
software allows you to only specify one of them and it will
114+
software allows you only to specify one of them, and it will
115115
automatically create the other.
116116

117117
cert_file
@@ -233,7 +233,7 @@ Where you describe the organization responsible for the service.::
233233
.. note:: You can specify the language of the name, or the language used on
234234
the webpage, by entering a tuple, instead of a simple string,
235235
where the second part is the language code. If you don't specify a
236-
language the default is "en" (English).
236+
language, the default is "en" (English).
237237

238238
preferred_binding
239239
^^^^^^^^^^^^^^^^^
@@ -294,7 +294,7 @@ could look something like this::
294294

295295
There are two options common to all services: 'name' and 'endpoints'.
296296
The remaining options are specific to one or the other of the service types.
297-
Which one is specified along side the name of the option.
297+
Which one is specified alongside the name of the option.
298298

299299
accepted_time_diff
300300
^^^^^^^^^^^^^^^^^^
@@ -303,8 +303,8 @@ If your computer and another computer that you are communicating with are not
303303
in synch regarding the computer clock, then here you can state how big a
304304
difference you are prepared to accept.
305305

306-
.. note:: This will indiscriminately effect all time comparisons.
307-
Hence your server my accept a statement that in fact is to old.
306+
.. note:: This will indiscriminately affect all-time comparisons.
307+
Hence your server my accept a statement that in fact is too old.
308308

309309
xmlsec_binary
310310
^^^^^^^^^^^^^
@@ -323,7 +323,7 @@ How many *hours* this configuration is expected to be accurate.::
323323

324324
"valid_for": 24
325325

326-
This of course is only used by *make_metadata.py*.
326+
This, of course, is only used by *make_metadata.py*.
327327
The server will not stop working when this amount of time has elapsed :-).
328328

329329
Specific directives
@@ -352,12 +352,12 @@ True or False. Default is False.
352352
policy
353353
""""""
354354

355-
If the server is an IdP and/or an AA then there might be reasons to do things
355+
If the server is an IdP and/or an AA, then there might be reasons to do things
356356
differently depending on who is asking; this is where that is specified.
357357
The keys are 'default' and SP entity identifiers. Default is used whenever
358358
there is no entry for a specific SP. The reasoning is also that if there is
359359
no default and only SP entity identifiers as keys, then the server will only
360-
except connections from the specified SPs.
360+
accept connections from the specified SPs.
361361
An example might be::
362362

363363
"service": {
@@ -381,24 +381,24 @@ An example might be::
381381

382382
*lifetime*
383383
This is the maximum amount of time before the information should be
384-
regarded as stale. In an Assertion this is represented in the NotOnOrAfter
384+
regarded as stale. In an Assertion, this is represented in the NotOnOrAfter
385385
attribute.
386386
*attribute_restrictions*
387-
By default there is no restrictions as to which attributes should be
388-
return. Instead all the attributes and values that are gathered by the
387+
By default, there are no restrictions as to which attributes should be
388+
returned. Instead, all the attributes and values that are gathered by the
389389
database backends will be returned if nothing else is stated.
390390
In the example above the SP with the entity identifier
391391
"urn:mace:umu.se:saml:roland:sp"
392392
has an attribute restriction: only the attributes
393-
'givenName' and 'surName' are to be returned. There is no limitations as to
393+
'givenName' and 'surName' are to be returned. There are no limitations as to
394394
what values on these attributes that can be returned.
395395
*name_form*
396396
Which name-form that should be used when sending assertions.
397-
Using this information the attribute name in the data source will be mapped to
397+
Using this information, the attribute name in the data source will be mapped to
398398
the friendly name, and the saml attribute name will be taken from the uri/oid
399399
defined in the attribute map.
400400

401-
If restrictions on values are deemed necessary those are represented by
401+
If restrictions on values are deemed necessary, those are represented by
402402
regular expressions.::
403403

404404
"service": {
@@ -425,7 +425,7 @@ authn_requests_signed
425425
"""""""""""""""""""""
426426

427427
Indicates if the Authentication Requests sent by this SP should be signed
428-
by default. This can be overriden by application code for a specific call.
428+
by default. This can be overridden by application code for a specific call.
429429

430430
This sets the AuthnRequestsSigned attribute of the SPSSODescriptor node
431431
of the metadata so the IdP will know this SP preference.
@@ -500,7 +500,7 @@ Example::
500500
}
501501
}
502502

503-
This kind of functionality is required for the eIDAS SAML profile
503+
This kind of functionality is required for the eIDAS SAML profile.
504504

505505
> eIDAS-Connectors SHOULD NOT provide AssertionConsumerServiceURL.
506506

@@ -605,7 +605,7 @@ something like this::
605605
}
606606
}
607607

608-
In this case the SP has only one IdP it can use.
608+
In this case, the SP has only one IdP it can use.
609609

610610
optional_attributes
611611
"""""""""""""""""""
@@ -620,7 +620,7 @@ Example::
620620
}
621621
}
622622

623-
Since the attribute names used here are the user friendly ones an attribute map
623+
Since the attribute names used here are the user-friendly ones an attribute map
624624
must exist, so that the server can use the full name when communicating
625625
with other servers.
626626

@@ -638,7 +638,7 @@ Example::
638638
}
639639

640640
Again as for *optional_attributes* the names given are expected to be
641-
the user friendly names.
641+
the user-friendly names.
642642

643643
want_assertions_signed
644644
""""""""""""""""""""""
@@ -689,7 +689,7 @@ idp/aa/sp
689689
^^^^^^^^^
690690

691691
If the configuration is covering both two or three different service types
692-
(like if one server is actually acting as both an IdP and a SP) then in some
692+
(like if one server is actually acting as both an IdP and an SP) then in some
693693
cases you might want to have these below different for the different services.
694694

695695
endpoints
@@ -707,7 +707,7 @@ This directive has as value a dictionary with one or more of the following keys:
707707
* single_logout_service (aa, idp, sp)
708708
* single_sign_on_service (idp)
709709

710-
The values per service is a list of endpoint specifications.
710+
The value per service is a list of endpoint specifications.
711711
An endpoint specification can either be just the URL::
712712

713713
”http://localhost:8088/A"
@@ -743,7 +743,7 @@ logout_requests_signed
743743

744744
Indicates if this entity will sign the Logout Requests originated from it.
745745

746-
This can be overriden by application code for a specific call.
746+
This can be overridden by application code for a specific call.
747747

748748
Valid values are True or False. Default value is False.
749749

@@ -759,9 +759,9 @@ subject_data
759759
""""""""""""
760760

761761
The name of a database where the map between a local identifier and
762-
a distributed identifier is kept. By default this is a shelve database.
763-
So if you just specify name, then a shelve database with that name
764-
is created. On the other hand if you specify a tuple then the first
762+
a distributed identifier is kept. By default, this is a shelve database.
763+
So if you just specify a name, then a shelve database with that name
764+
is created. On the other hand, if you specify a tuple, then the first
765765
element in the tuple specifies which type of database you want to use
766766
and the second element is the address of the database.
767767

@@ -832,8 +832,8 @@ We start with a simple but fairly complete Service provider configuration::
832832
}]
833833
}
834834

835-
This is the typical setup for a SP.
836-
A metadata file to load is *always* needed, but it can of course
835+
This is the typical setup for an SP.
836+
A metadata file to load is *always* needed, but it can, of course,
837837
contain anything from 1 up to many entity descriptions.
838838

839839
------

docs/index.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ About PySAML2
1212
PySAML2 is a pure python implementation of SAML2. It contains all
1313
necessary pieces for building a SAML2 service provider or an identity provider.
1414
The distribution contains examples of both.
15-
Originally written to work in a WSGI environment there are extensions that
15+
Originally written to work in a WSGI environment, there are extensions that
1616
allow you to use it with other frameworks.
1717

1818

@@ -22,18 +22,18 @@ How to use PySAML2
2222
Before you can use Pysaml2, you'll need to get it installed.
2323
If you have not done it yet, read the :ref:`install`
2424

25-
Well, now you have it installed and you want to do something.
25+
Well, now you have it installed, and you want to do something.
2626

27-
And I'm sorry to tell you this; but there isn't really a lot you can do with
27+
And I'm sorry to tell you this, but there isn't really a lot you can do with
2828
this code on it's own.
2929

30-
Sure you can send a AuthenticationRequest to an IdentityProvider or a
30+
Sure you can send a AuthenticationRequest to an IdentityProvider or an
3131
AttributeQuery to an AttributeAuthority but in order to get what they
32-
return you have to sit behind a Web server. Well that is not really true since
32+
return you have to sit behind a Web server. Well, that is not really true since
3333
the AttributeQuery would be over SOAP and you would get the result over the
3434
connection you have to the AttributeAuthority.
3535

36-
But anyway, you may get my point. This is middleware stuff !
36+
But anyway, you may get my point. This is middleware stuff!
3737

3838
PySAML2 is built to fit into a
3939
`WSGI <http://www.python.org/dev/peps/pep-0333/>`_ application

docs/install.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
Quick install guide
44
===================
55

6-
Before you can use PySAML2, you'll need to get it installed. This guide
6+
Before you can use PySAML2, you'll need to get it installed. This guide
77
will guide you to a simple, minimal installation.
88

99
Install PySAML2
1010
---------------
1111

12-
For all this to work you need to have Python installed.
12+
For all this to work, you need to have Python installed.
1313
The development has been done using 2.7.
1414
There is now a 3.X version.
1515

@@ -18,12 +18,12 @@ Prerequisites
1818

1919
You have to have ElementTree, which is either part of your Python distribution
2020
if it's recent enough, or if the Python is too old you have to install it,
21-
for instance by getting it from the Python Package Instance by using
21+
for instance by getting it from the Python Package Instance by using
2222
easy_install.
2323

2424
You also need xmlsec1 which you can download from http://www.aleksey.com/xmlsec/
2525

26-
If you're on OS X you can get xmlsec1 installed from MacPorts or Fink.
26+
If you're on macOS, you can get xmlsec1 installed from MacPorts or Fink.
2727

2828
Depending on how you are going to use PySAML2 you might also need
2929

@@ -46,13 +46,13 @@ Note for rhel/centos 6: cffi depends on libffi-devel, and cryptography on openss
4646
So you might want first to do:
4747
yum install libffi-devel openssl-devel
4848

49-
After this you ought to be able to run the tests without an hitch.
49+
After this, you ought to be able to run the tests without a hitch.
5050
The tests are based on the pypy test environment, so::
5151

5252
cd tests
5353
pip install -r test-requirements.txt
54-
pytest
54+
pytest
5555

56-
is what you should use. If you don't have py.test, get it it's part of pypy!
57-
It's really good !
56+
is what you should use. If you don't have py.test, get it it's part of pypy!
57+
It's really good!
5858

docs/sp_test/internal.rst

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@ How sp_test works internally
44
:Release: |release|
55
:Date: |today|
66

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
88
new test classes
99

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:
1111

1212
#. The Test Driver Configuration, an example can be found in tests/idp_test/config.py
1313
#. Attribute Maps mapping URNs, OIDs and friendly names
1414
#. Key files for the test tool
1515
#. A metadata file representing the tool
1616
#. 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.
1717

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.
1919

2020

2121
(1) Class and Object Structure
@@ -24,7 +24,7 @@ These files should be stored outside the saml2test package to have a clean separ
2424
Client (sp_test/__init__.py)
2525
.........................
2626
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")
2828
- initialize the test driver IDP
2929
- initialize a Conversation
3030
- start the Conversion with .do_sequence_and_tests()
@@ -50,14 +50,14 @@ Sequence
5050

5151
Test (in the context of an operation)
5252
....
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").
5454
There are standard tests with the Request class (VerifyAuthnRequest) and operation-specific tests.
5555
- Example for an operation-specific "mid" test: VerifyIfRequestIsSigned
5656
- A test may be specified together with an argument as a tuple.
5757

5858
Flow
5959
....
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.
6161
* A flow for a solicited authentication consists of 4 classes:
6262

6363
* flow[0]: Operation (Handling a login flow such as discovery or WAYF - not implemented yet)
@@ -67,19 +67,19 @@ Flow
6767

6868
Check (and subclasses)
6969
.....
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
7373

7474
Interaction
7575
...........
7676
- An interaction automates a human interaction. It searches a response from a test target for some constants, and if
7777
there is a match, it will create a response suitable response.
7878

79-
(2) Simplyfied Flow
79+
(2) Simplified Flow
8080
:::::::::::::::::::
8181

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
8383
for test sp-00::
8484

8585
do_sequence_and_test(self, oper, test):
@@ -138,12 +138,12 @@ must be considered:
138138

139139
#. An operation that was successful because the test target reports OK (e.g. HTTP 200)
140140
#. 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
143143

144144
Status values are defined in saml2test.check like this:
145145
INFORMATION = 0, OK = 1, WARNING = 2, ERROR = 3, CRITICAL = 4, INTERACTION = 5
146146

147147

148-
There are 2 targets to write output to:
148+
There are two targets to write output to:
149149
* Test_output is written to conv.test_output during the execution of the flows.

src/saml2/mdstore.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ def do_entity_descriptor(self, entity_descr):
471471
if self.check_validity:
472472
try:
473473
if not valid(entity_descr.valid_until):
474-
logger.error("Entity descriptor (entity id:%s) to old",
474+
logger.error("Entity descriptor (entity id:%s) too old",
475475
entity_descr.entity_id)
476476
self.to_old.append(entity_descr.entity_id)
477477
return

0 commit comments

Comments
 (0)