15

In the real world , why do we need to implement method level security ?

We either have a web application or a desktop application , where the user accesses the user interface (and therefore directly cannot access the method) .

So where does accessing methods directly come into picture here ?

edit : I ask this question because I am experimenting with spring security , and I see authorizing users for accessing methods .

something like :

 @ROLE_ADMIN
public void update() {
      //update
}
  • to reuse code without thinking about security issues 2. to integrate with a web service easily 3. to be sure about security when you don't trust the upper layers' security mechanisms
  • – Erkan Erol Jul 22 '15 at 08:12