The most important thing to remember here. You should assume that the user can send anything to your web application through raw HTTP GET or POST. This is also called "never trust a customer." Thus, steps 4 and 5 above are not redundant. For example, if you have reached step 5, you cannot be sure that step 3 has been taken.
However, if you can precisely distinguish what the user intends to do through one URL, and you do not need to protect this method through another access channel (say, from a queue or RMI), you can leave providing only the URL. However, it is still a good idea to have method-level security regardless of this ... for several reasons. First, it documents expected roles right where the logic runs. This can be useful for understanding the assumptions that were made during development, which can help create future improvements. Secondly, it can guarantee that security through a future access channel will not be inadvertently compromised.
source share