Skip to content

Implement get_last_assertion_issue_instant()#280

Merged
pitbulk merged 2 commits intoSAML-Toolkits:masterfrom
guneskaan:get-last-assertion-issue-instant
Sep 6, 2021
Merged

Implement get_last_assertion_issue_instant()#280
pitbulk merged 2 commits intoSAML-Toolkits:masterfrom
guneskaan:get-last-assertion-issue-instant

Conversation

@guneskaan
Copy link
Copy Markdown
Contributor

Currently the way of retrieving IssueInstant time from the last assertion processed SAMLResponse is possible by (please correct me if there's an easier way):

  1. Retrieving the XML string by calling auth.get_last_response_xml()
  2. Parsing the XML document from the XML string using xml_utils.to_etree()
  3. Querying the last Assertion using xml_utils.query()
  4. Parsing the SAML2 timestamp using parse_SAML_to_time()

Implementing get_last_assertion_issue_instant() replaces the four calls above with one.

Why retrieve IssueInstant?
There is an odd case where an IdP can send no notOnOrAfter within Conditions or SubjectConfirmationData in an Assertion, as these parameters are both optional. IssueInstant on the other hand is a required parameter that provides an additional tool for applications to implement additional security measurements by limiting the amount of time they'll process an Assertion past IssueInstant

@pitbulk pitbulk merged commit ab62b0d into SAML-Toolkits:master Sep 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants