-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Signature of Assertion from issuer was not valid and invalid destination for SAML response by multiple simultaneous login #14885
Comments
Hi, @nojanbakh, thanks for reaching out. I'm not sure that I understand the context in which
It's expected that you would give the same |
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed. |
I am new in this field. maybe i can explain it to you with this logs
As you can see, it seems that the first person tries to authenticate and trying to log in with azure and the second person from the other IDP tries to log in too. It causes the invalid signature by checking the token. And when he tries again, it works. |
It seems that request and response are handled in different threads, and it causes invalid assertion. |
Describe the bug
I have encountered an issue with the Spring SAML library that leads to incorrect token validation during the authentication process. The problem occurs under concurrent authentication scenarios, wherein the response from the Identity Provider (IdP) intended for one user may be erroneously processed by another user's authentication thread, resulting in invalid error messages. After refreshing the page, a new authentication succeeds.
It seems that by requesting /authenticate the relyingPartyRegistration creates a registration with a registrationId in one thread and waits for response from external IdP to validate the request. But it can happen that a new request creates a new registrationId in the same thread, and it causes invalid destination and invalid signature.
To Reproduce
Initiate concurrent authentication requests for multiple users.
Observe the processing of authentication tokens and IdP responses.
Note instances where responses are incorrectly validated against tokens belonging to different users.
It can be reproduced with a script that sends /login and /authenticate requests for different idPs together in a loop.
Expected behavior
The Spring SAML library should ensure proper association of authentication tokens with their respective users, preventing cross-thread validation issues.
The text was updated successfully, but these errors were encountered: