Add Auth.getLastMessageIssueInstant and Auth.getLastRequestIssueInstant by mauromol · Pull Request #320 · SAML-Toolkits/java-saml · GitHub
Skip to content

Add Auth.getLastMessageIssueInstant and Auth.getLastRequestIssueInstant#320

Merged
pitbulk merged 2 commits into
SAML-Toolkits:masterfrom
mauromol:add-last-message-issue-instant
Jun 24, 2021
Merged

Add Auth.getLastMessageIssueInstant and Auth.getLastRequestIssueInstant#320
pitbulk merged 2 commits into
SAML-Toolkits:masterfrom
mauromol:add-last-message-issue-instant

Conversation

@mauromol

@mauromol mauromol commented Apr 1, 2021

Copy link
Copy Markdown
Contributor

Each message (AuthnRequest, SamlResponse, LogoutRequest and
LogoutResponse) have been enhanced to expose their issue instant. This
is useful for logging purposes (i.e.: you want to track each request
you generate and each response you receive, along with their issue
instant), which is also required when implementing a SPID Service
Provider (SPID is a SAML 2.0-based federated system used by the Italian
government).
I also tried to implement some tests for Auth, but I did not succeed for
the "received message" scenario, because, to be coherent with the "last
message id" case, the "last message issue instant" information is set
on the Auth instance only if the message processing succeeds (i.e.: the
processed message is valid). The test data used here seems to fail
validation because of time expiration (which is reasonable), so testing
these methods in the "receive" scenario would require to write test
messages with valid timestamps dynamically.

Each message (AuthnRequest, SamlResponse, LogoutRequest and
LogoutResponse) have been enhanced to expose their issue instant. This
is useful for logging purposes (i.e.: you want to track each request
you generate and each response you receive, along with their issue
instant), which is also required when implementing a SPID Service
Provider (SPID is a SAML 2.0-based federated system used by the Italian
government).
I also tried to implement some tests for Auth, but I did not succeed for
the "received message" scenario, because, to be coherent with the "last
message id" case, the "last message issue instant" information is set
on the Auth instance only if the message processing succeeds (i.e.: the
processed message is valid). The test data used here seems to fail
validation because of time expiration (which is reasonable), so testing
these methods in the "receive" scenario would require to write test
messages with valid timestamps dynamically.
@mauromol

Copy link
Copy Markdown
Contributor Author

@pitbulk pitbulk force-pushed the master branch 3 times, most recently from ab7e4d7 to 3c79c8c Compare May 18, 2021 00:32
@pitbulk pitbulk merged commit 211e54b into SAML-Toolkits:master Jun 24, 2021
@mauromol mauromol deleted the add-last-message-issue-instant branch July 14, 2021 13:54
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