Should a SAML federation software accept the same SAML response as long as it is within the allowed SAML token lifetime?
In simpler terms: IDP (identify provider) issues a SAML response, then SP (service provider) accepts/processes it. Can the same unmodified SAML response be then re-used immediately after the first use? Given that the SAML issuance timestamp is within allowed range.
Security-wise it makes sense to restrict a SAML token (response) to only one use, so that even if it is stolen by a "man-in-the-middle" - it cannot be reused. But in order to implement that, the software needs to store some info about the SAML response somewhere: serial number, a hash of the whole thing?
Please provide some links with the explanations on that is possible and/or examples of implementation.
Thank you! Alex.
The short answer - no if Service Provider B is implemented as a standard SAML 2.0 SP. SAML 2.0 assertions are "targeted" and signed. They have a specified audience and a recipient URL. You cannot change them without breaking the signature.
The SAML Response is sent by an Identity Provider and received by a Service Provider. In the validation process is checked who sent the message (IdP EntityId), who received the SAML Response (SP EntityId) and where (SP Attribute Consume Service Endpoint) and what is the final destination (Target URL, Destination).
Saml response has a token lifetime of 1 hour for SAML token or it is valid till the certificate used for sign in is valid.
Here's the flow: 1) User accesses main website and chooses to log in. 2) User enters login information and submits 3) System validates credentials, generates a SAML response and redirects user to the new tool along with the SAML response as a POST variable.
The SAML 2.0 norm provides another way to prevent replay attacks that do not imply storing in database the ID of the assertion.
This check really complicates the replay attack, as an attacker will also need to have the session cookie of the SP (and even in this case, it's already game over anyway...). It's also good practice to sign the whole response.
Obviously this method is only valid in a SP-initiated scenario.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With