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
Be able to get at the auth object the last processed ID (response/assertion) and the last generated ID. Reset errorReason attribute of the auth object after each Process method
Copy file name to clipboardExpand all lines: README.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -889,6 +889,13 @@ The 'x509certMulti' is an array with 2 keys:
889
889
- 'encryption' An array with one unique cert that will be used to encrypt data to be sent to the IdP
890
890
891
891
892
+
### Replay attacks ###
893
+
894
+
In order to avoid reply 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.
895
+
896
+
Get the ID of the last processed message/assertion with the get_last_message_id/get_last_assertion_id method of the Auth object.
897
+
898
+
892
899
### Main classes and methods ###
893
900
894
901
Described below are the main classes and methods that can be invoked from the SAML2 library.
@@ -920,6 +927,9 @@ Main class of OneLogin Python Toolkit
920
927
****set_strict*** Set the strict mode active/disable.
921
928
****get_last_request_xml*** Returns the most recently-constructed/processed XML SAML request (AuthNRequest, LogoutRequest)
922
929
****get_last_response_xml*** Returns the most recently-constructed/processed XML SAML response (SAMLResponse, LogoutResponse). If the SAMLResponse had an encrypted assertion, decrypts it.
930
+
****get_last_message_id*** The ID of the last Response SAML message processed.
931
+
****get_last_assertion_id*** The ID of the last assertion processed.
932
+
****get_last_assertion_not_on_or_after*** The NotOnOrAfter value of the valid SubjectConfirmationData node (if any) of the last assertion processed (is only calculated with strict = true)
923
933
924
934
#### OneLogin_Saml2_Auth - authn_request.py ####
925
935
@@ -948,6 +958,9 @@ SAML 2 Authentication Response class
948
958
****validate_timestamps*** Verifies that the document is valid according to Conditions Element
949
959
****get_error*** After execute a validation process, if fails this method returns the cause
950
960
****get_xml_document*** Returns the SAML Response document (If contains an encrypted assertion, decrypts it).
961
+
****get_id*** the ID of the response
962
+
****get_assertion_id*** the ID of the assertion in the response
963
+
****get_assertion_not_on_or_after*** the NotOnOrAfter value of the valid SubjectConfirmationData if any
0 commit comments