error:The token should exist in the storage at this point #143
-
Hello, Sorry to bother you but I'm struggling with having csrfguard 4.1.3 working on my project. My need is to implement a csrf protection on a code relying on spring 2.5.5 as well as an in-house MVC framework. As for now CSRF protection is possible directly through Spring Security, I found little option but your library (I don't have the possibility to update the whole project). I took a look at the discussion and ran the test application as well but I'm afraid it didn' helped me much. Here's the setup I've made (using Overlay):
Important points are that I've disabled the validation when no session exists as well as injection in URI for GET request. This is a stateful application, so a JSESSIONID is generated after the login, which is why I tried to unprotect all the login related redirections. Problem is that despite that, after login in, I'm routed to the error page and in my Jboss (EAP 7.0 if that matters) I can see the following error :
Maybe I'm missing something with the inMemoryTokenHolder ? Or is there any compatibility issue with jboss application server ? Thank you for your help |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hello @nxsmcaspani
What do you mean by did not help much? Based on the output it seems that you should have managed to start the test web application. If you open it in a browser on port
In case of a stateful application, CSRFGuard defaults to the
|
Beta Was this translation helpful? Give feedback.
Hello @nxsmcaspani
What do you mean by did not help much? Based on the output it seems that you should have managed to start the test web application. If you open it in a browser on port
8080
, you should be able to play around with it and see how it behaves.In case of a stateful application, CSRFGuard defaults to the
SessionTokenKeyExtractor
implementation. You've either received the error because:ContainerSession
could not be created