I have a JBoss application which has Oracle DB based password authentication using org.jboss.security.auth.spi.DatabaseServerLoginModule. This application is running on the older community edition jboss-6.1.0.Final. I would like to throttle failed login attempts. I figure that these may come in a couple of ways:
- A username which exists in the database has repeated failed password attempts
- Attempts are made with usernames (likely machine generated) that do not exist in the database
I am currently only concerned with (2).
This server is behind a reverse proxy, which would make tracking the IPs attempts come from difficult.
After a few fruitless hours of Googling I am none the wiser about how to implement logic whereby, in the case of (2), the failed attempts may be logged and some sort of lockout takes place. Another thought I had was that maybe a lockout isn't necessary, and instead implement some sort of CAPTCHA system. Again, I find no good resources on how to implement this within my current authentication scheme.
What are the suggested practices to deal with this?