-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Add Saml2AuthenticationRequestRepository #9185
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
Comments
@jzheaux Why are the responses needed? Also, can we assume that a session exists? |
@fast-reflexes, thanks for the questions
I'm not sure I understand the question, are you referring to SAML 2.0 responses? They are needed as that is the response an IDP gives in order to complete the authentication process.
No, we should not assume it exists. But, if it does exist, then we can attempt to look up an associated AuthnRequest from it. |
@jzheaux Thanks for answering! Nah, I meant the responses in the function signatures of your interface? The SAML2 response is in the request and so is a potential session so why do we need to include the responses as argument? I can do it, just curious :) Also in the |
Ah, got it, @fast-reflexes. The reason is from a lesson we learned in OAuth support. Most will store the AuthNrequest in the session, but some may want to store it in the browser, in a cookie, for example. Applications will need the |
@fast-reflexes are you able to contribute a PR that adds this feature? |
@jzheaux yes, I have started working on it but a lot of other things going on as well. Also, this is my first PR for Spring Security so I haven't fully read up on the procedures. Nonetheless, the implementation itself is done, just need to ...
|
No problem, @fast-reflexes, take what time you need. Regarding fixing existing tests, please do your best to leave them as-is. When adding a feature, all other behavior in Spring Security should remain the same. |
@jzheaux I really want to work on this but setting up the tool suite to work properly is just a mess... I come from IntelliJ and I haven't used Eclipse in a long time and the few rows of text on how to set up the IDE is far from enough for me to get rolling. Currently, I have tried to set up the project both in IntelliJ and Spring Tool Suite but the error I'm getting is that all resources return 401's when trying to build. I find no information on this anywhere but I will look some more when I have time.. could you provide me with some slick hints? :) |
Hi, @fast-reflexes, sorry to hear you are having trouble, let's see if I can help. I personally use IntelliJ, and since you also come from an IntelliJ background, let's see if we can get that working. Are you on the latest? Some infrastructural changes were recently made that required an adjustment in the way Spring Security manages its dependencies. You can check for this line in your If you are still getting 401s you might see if you are getting them on the command line, too. |
- Moved docs into AuthnRequest section, changed links to be more semantically valuable to search engines - Moved tests to be nearer to similar tests Issue gh-9185
- Moved docs into AuthnRequest section, changed links to be more semantically valuable to search engines - Moved tests to be nearer to similar tests Issue spring-projectsgh-9185
Moving to solve package tangles Issue gh-9185
Related to #9174
It would be nice to remember the AuthNRequest so that data like
InResponseTo
can be validated.To do this will require a new interface that both
Saml2WebSsoAuthenticationRequestFilter
andSaml2WebSsoAuthenticationFilter
can use. The first will store the AuthNRequest and the second will read and remove it.The interface will look something like this:
And it should initially have a single implementation
HttpSessionSaml2AuthenticationRequestRepository
that stores the request in the session.Saml2AuthenticationToken
should also be altered to have a new constructor that takes theRelyingPartyRegistration
, the SAML 2.0 response, and theAbstractSaml2AuthenticationRequest
loaded from the repository.The text was updated successfully, but these errors were encountered: