Skip to content

Commit cafef16

Browse files
committed
Prepare release 2.12.0
1 parent d6a3a31 commit cafef16

File tree

3 files changed

+25
-19
lines changed

3 files changed

+25
-19
lines changed

README.md

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ Installation
9494
### Dependencies ###
9595

9696
* python 2.7
97+
* [lxml](https://pypi.python.org/pypi/lxml) Python bindings for the libxml2 and libxslt libraries.
9798
* [dm.xmlsec.binding](https://pypi.python.org/pypi/dm.xmlsec.binding) Cython/lxml based binding for the XML security library (depends on python-dev libxml2-dev libxmlsec1-dev)
9899
* [isodate](https://pypi.python.org/pypi/isodate) An ISO 8601 date/time/duration parser and formater
99100
* [defusedxml](https://pypi.python.org/pypi/defusedxml) XML bomb protection for Python stdlib modules
@@ -135,6 +136,14 @@ $ pip install python-saml
135136
If you want to know how a project can handle python packages review this [guide](https://packaging.python.org/en/latest/tutorial.html) and review this [sampleproject](https://github.com/pypa/sampleproject)
136137

137138

139+
#### NOTE ####
140+
To avoid ``libxml2`` library version incompatibilities between ``xmlsec`` and ``lxml`` it is recommended that ``lxml`` is not installed from binary.
141+
142+
This can be ensured by executing:
143+
```
144+
$ pip install --force-reinstall --no-binary lxml lxml
145+
```
146+
138147
Security Warning
139148
----------------
140149

@@ -164,10 +173,10 @@ SAML Messages have a limited timelife (NotBefore, NotOnOrAfter) that
164173
make harder this kind of attacks, but they are still possible.
165174

166175
In order to avoid them, the SP can keep a list of SAML Messages or Assertion IDs alredy valdidated and processed. Those values only need
167-
to be stored the amount of time of the SAML Message life time, so
176+
to be stored the amount of time of the SAML Message life time, so
168177
we don't need to store all processed message/assertion Ids, but the most recent ones.
169178

170-
The OneLogin_Saml2_Auth class contains the [get_last_request_id](https://github.com/onelogin/python-saml/blob/00b1f823b6c668b0dfb5e4a40d3709a4ceb2a6ae/src/onelogin/saml2/auth.py#L352), [get_last_message_id](https://github.com/onelogin/python-saml/blob/00b1f823b6c668b0dfb5e4a40d3709a4ceb2a6ae/src/onelogin/saml2/auth.py#L359) and [get_last_assertion_id](https://github.com/onelogin/python-saml/blob/00b1f823b6c668b0dfb5e4a40d3709a4ceb2a6ae/src/onelogin/saml2/auth.py#L366) methods to retrieve the IDs
179+
The OneLogin_Saml2_Auth class contains the [get_last_request_id](https://github.com/onelogin/python-saml/blob/00b1f823b6c668b0dfb5e4a40d3709a4ceb2a6ae/src/onelogin/saml2/auth.py#L352), [get_last_message_id](https://github.com/onelogin/python-saml/blob/00b1f823b6c668b0dfb5e4a40d3709a4ceb2a6ae/src/onelogin/saml2/auth.py#L359) and [get_last_assertion_id](https://github.com/onelogin/python-saml/blob/00b1f823b6c668b0dfb5e4a40d3709a4ceb2a6ae/src/onelogin/saml2/auth.py#L366) methods to retrieve the IDs
171180

172181
Checking that the ID of the current Message/Assertion does not exists in the lis of the ones already processed will prevent replay attacks.
173182

@@ -334,7 +343,7 @@ This is the ``settings.json`` file:
334343
/*
335344
* Key rollover
336345
* If you plan to update the SP X.509 cert and privateKey
337-
* you can define here the new X.509 cert and it will be
346+
* you can define here the new X.509 cert and it will be
338347
* published on the SP metadata so Identity Providers can
339348
* read them and get ready for rollover.
340349
*/
@@ -467,7 +476,7 @@ In addition to the required settings data (idp, sp), extra settings can be defin
467476
"wantAttributeStatement": true,
468477

469478
// Rejects SAML responses with a InResponseTo attribute when request_id
470-
// not provided in the process_response method that later call the
479+
// not provided in the process_response method that later call the
471480
// response is_valid method with that parameter.
472481
"rejectUnsolicitedResponsesWithInResponseTo": false,
473482

@@ -582,7 +591,7 @@ There's an easier method -- use a metadata exchange. Metadata is just an XML fi
582591

583592
Using ````parse_remote```` IdP metadata can be obtained and added to the settings withouth further ado.
584593

585-
But take in mind that the OneLogin_Saml2_IdPMetadataParser class does not validate in any way the URL that is introduced in order to be parsed.
594+
But take in mind that the OneLogin_Saml2_IdPMetadataParser class does not validate in any way the URL that is introduced in order to be parsed.
586595

587596
Usually the same administrator that handles the Service Provider also sets the URL to the IdP, which should be a trusted resource.
588597

@@ -967,7 +976,7 @@ else:
967976

968977
### SP Key rollover ###
969978

970-
If you plan to update the SP X.509 cert and privateKey you can define the new X.509 cert as ``settings['sp']['x509certNew']`` and it will be
979+
If you plan to update the SP X.509 cert and privateKey you can define the new X.509 cert as ``settings['sp']['x509certNew']`` and it will be
971980
published on the SP metadata so Identity Providers can read them and get ready for rollover.
972981

973982

@@ -981,14 +990,14 @@ In order to handle that the toolkit offers the ``settings['idp']['x509certMulti'
981990
When that parameter is used, ``x509cert`` and ``certFingerprint`` values will be ignored by the toolkit.
982991

983992
The ``x509certMulti`` is an array with 2 keys:
984-
- ``signing``. An array of certs that will be used to validate IdP signature
993+
- ``signing``. An array of certs that will be used to validate IdP signature
985994
- ``encryption`` An array with one unique cert that will be used to encrypt data to be sent to the IdP
986995

987996

988997
### Replay attacks ###
989-
998+
990999
In order to avoid replay attacks, you can store the ID of the SAML messages already processed, to avoid processing them twice. Since the Messages expires and will be invalidated due that fact, you don't need to store those IDs longer than the time frame that you currently accepting.
991-
1000+
9921001
Get the ID of the last processed message/assertion with the ``get_last_message_id``/``get_last_assertion_id method`` of the ``Auth`` object.
9931002

9941003

changelog.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# python-saml changelog
2+
### 2.12.0 (Dec 28, 2022)
3+
- Remove version restriction on lxml dependency
4+
- Update Demo Bottle
5+
- Updated Travis file. Forced lxml to be installed using no-validate_binary
6+
27
### 2.11.1 (Jan 28, 2022)
38
- lxml fixed to be lower than 4.7.1 since it seems to have issues validating the signature of encrypted elements See https://github.com/onelogin/python3-saml/issues/292
49

@@ -120,7 +125,7 @@ Implement a more specific exception class for handling some validation errors. I
120125
* Improve Signature validation process
121126
* [#149](https://github.com/onelogin/python-saml/pull/149) Work-around for xmlsec.initialize
122127
* [#151](https://github.com/onelogin/python-saml/pull/151) Fix flask demo error handling and improve documentation
123-
* [#152](https://github.com/onelogin/python-saml/pull/152) Update LICENSE to include MIT rather than BSD license
128+
* [#152](https://github.com/onelogin/python-saml/pull/152) Update LICENSE to include MIT rather than BSD license
124129
* [#155](https://github.com/onelogin/python-saml/pull/155) Fix typographical errors in docstring
125130
* Fix RequestedAttribute Issue
126131
* Fix __build_signature method. If relay_state is null not be part of the SignQuery
@@ -226,11 +231,3 @@ Implement a more specific exception class for handling some validation errors. I
226231

227232
### 1.0.0 (Jun 26, 2014)
228233
* OneLogin's SAML Python Toolkit v1.0.0
229-
230-
231-
232-
233-
234-
235-
236-

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
setup(
1010
name='python-saml',
11-
version='2.11.1',
11+
version='2.12.0',
1212
description='Saml Python Toolkit. Add SAML support to your Python software using this library',
1313
classifiers=[
1414
'Development Status :: 5 - Production/Stable',

0 commit comments

Comments
 (0)