• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Preparing the HttpServletRequest in Spring security

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
reply
    Bookmark Topic Watch Topic
  • New Topic