title: Preventing login attacks from curl/http post in spring app
body: <p>I have a spring web app hosted on amazon and I am facing login attacks from some automated machines. From my logs, it is clear that they are bypassing login page, and are using something like :</p>
  
  <pre><code>curl --data "j_username=xxx&amp;j_password=yyy" http://www.mysecureurl.com/j_spring_security_check 
  </code></pre>
  
  <p>My question is how to prevent such attacks. Is there a way I can block such logins which are not coming directly from login page via some spring configuration ?</p>
  
  <p>I will then implement further security measures like captcha, lockout-after-3-wrong-attempts etc when user tries from login page.  </p>