aspose file tools*
The moose likes Spring and the fly likes Preparing the HttpServletRequest in Spring security Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Preparing the HttpServletRequest in Spring security" Watch "Preparing the HttpServletRequest in Spring security" New topic
Author

Preparing the HttpServletRequest in Spring security

Darren Carter
Ranch Hand

Joined: Jul 08, 2010
Posts: 30
Hi,

I was hoping someone could help.

I have developed a secure rest API in spring that receives json, and then uses JSR303 bean validation using @RequestBody @Validated etc.. This all works fine.

However it has now been decided that the whole json string to be sent to my REST API, needs to be encrypted in AES.

So within a custom spring security filter I have pulled the encrypted string from the request, decrypted it to Json, do authentication etc...

I basically now need to put the json into the request, so that my controllers @RequestBody Annotations can continue to do their magic.

How do I put the JSON into the request within my filter? Also is there is a better approach and how does everyone encrypt their json? Was wondering if its easier to encrypt each filed with field?

Snippet of Filter



Regards
D.



 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Preparing the HttpServletRequest in Spring security