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: README.md
+18-9Lines changed: 18 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -94,6 +94,7 @@ Installation
94
94
### Dependencies ###
95
95
96
96
* python 2.7
97
+
*[lxml](https://pypi.python.org/pypi/lxml) Python bindings for the libxml2 and libxslt libraries.
97
98
*[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)
98
99
*[isodate](https://pypi.python.org/pypi/isodate) An ISO 8601 date/time/duration parser and formater
99
100
*[defusedxml](https://pypi.python.org/pypi/defusedxml) XML bomb protection for Python stdlib modules
@@ -135,6 +136,14 @@ $ pip install python-saml
135
136
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)
136
137
137
138
139
+
#### NOTE ####
140
+
To avoid ``libxml2`` library version incompatibilities between ``xmlsec`` and ``lxml`` it is recommended that ``lxml`` is not installed from binary.
@@ -164,10 +173,10 @@ SAML Messages have a limited timelife (NotBefore, NotOnOrAfter) that
164
173
make harder this kind of attacks, but they are still possible.
165
174
166
175
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
168
177
we don't need to store all processed message/assertion Ids, but the most recent ones.
169
178
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
171
180
172
181
Checking that the ID of the current Message/Assertion does not exists in the lis of the ones already processed will prevent replay attacks.
173
182
@@ -334,7 +343,7 @@ This is the ``settings.json`` file:
334
343
/*
335
344
* Key rollover
336
345
* 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
338
347
* published on the SP metadata so Identity Providers can
339
348
* read them and get ready for rollover.
340
349
*/
@@ -467,7 +476,7 @@ In addition to the required settings data (idp, sp), extra settings can be defin
467
476
"wantAttributeStatement":true,
468
477
469
478
// 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
@@ -582,7 +591,7 @@ There's an easier method -- use a metadata exchange. Metadata is just an XML fi
582
591
583
592
Using ````parse_remote```` IdP metadata can be obtained and added to the settings withouth further ado.
584
593
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.
586
595
587
596
Usually the same administrator that handles the Service Provider also sets the URL to the IdP, which should be a trusted resource.
588
597
@@ -967,7 +976,7 @@ else:
967
976
968
977
### SP Key rollover ###
969
978
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
971
980
published on the SP metadata so Identity Providers can read them and get ready for rollover.
972
981
973
982
@@ -981,14 +990,14 @@ In order to handle that the toolkit offers the ``settings['idp']['x509certMulti'
981
990
When that parameter is used, ``x509cert`` and ``certFingerprint`` values will be ignored by the toolkit.
982
991
983
992
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
985
994
-``encryption`` An array with one unique cert that will be used to encrypt data to be sent to the IdP
986
995
987
996
988
997
### Replay attacks ###
989
-
998
+
990
999
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
+
992
1001
Get the ID of the last processed message/assertion with the ``get_last_message_id``/``get_last_assertion_id method`` of the ``Auth`` object.
Copy file name to clipboardExpand all lines: changelog.md
+6-9Lines changed: 6 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,9 @@
1
1
# 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
+
2
7
### 2.11.1 (Jan 28, 2022)
3
8
- 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
4
9
@@ -120,7 +125,7 @@ Implement a more specific exception class for handling some validation errors. I
120
125
* Improve Signature validation process
121
126
*[#149](https://github.com/onelogin/python-saml/pull/149) Work-around for xmlsec.initialize
122
127
*[#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
124
129
*[#155](https://github.com/onelogin/python-saml/pull/155) Fix typographical errors in docstring
125
130
* Fix RequestedAttribute Issue
126
131
* 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
0 commit comments