• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

why we should use method security in spring security?

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i am new to spring security and i have a question.
why request security is not suffcient for mvc web application and we should use method (pre-post) annotation for security in methods.in other word why we need method security in web application that the only chanel between application and client are request(and response).
thanks alot
 
Ranch Hand
Posts: 79
Eclipse IDE Spring Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What I feel is that request security provide Authentication (whether you are a valid person to log on / use to system) - where as method level security is a tool which is used to identify whether an user has sufficient privileges (i.e. authorization) to call particular method or not.

It is useful where we have multiple roles & provide functionality restricted as per roles. Authorization is a basic requirement for large apps.

Most of the Enterprise level apps implement authorization in one way or other. Spring has also come up with their way.
 
ranger
Posts: 17346
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rohit Mehta wrote:What I feel is that request security provide Authentication (whether you are a valid person to log on / use to system) - where as method level security is a tool which is used to identify whether an user has sufficient privileges (i.e. authorization) to call particular method or not.

It is useful where we have multiple roles & provide functionality restricted as per roles. Authorization is a basic requirement for large apps.

Most of the Enterprise level apps implement authorization in one way or other. Spring has also come up with their way.



In Spring Security it isn't like that.

You have authorization and authentication on both levels.

The reason why you add method security with request security is to protect yourself from a hacker skipping over your URL request and hitting the middle tier server and method of you class directly.

 
Rohit Mehta
Ranch Hand
Posts: 79
Eclipse IDE Spring Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for clarification Mark!
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic