Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Servlet filters for abuse prevention? (DoS, spam, etc)

I'm looking for a servlet filter library that helps me secure our web service against unauthorized usage and DDoS.

We have "authorized clients" for our web service, so ideally the filter would help detect clients that aren't authorized or behave improperly, or detect multiple people using the same account. Also we need a way to prevent DoS'ing of our various services since we have an open-account policy -- limiting the number of simultaneous connections for a user, etc.

We've looked at the Tomcat LockOutFilter and such but those are fairly primitive and only prevent against one sort of attack.

Of course there are many application-specific components of the solution, but I was wondering if someone had written up a general solution as a starting point.

like image 589
sehugg Avatar asked Nov 06 '22 11:11

sehugg


2 Answers

Apache Shiro is an interesting security solution (it was called jSecurity before joining Apache.org). I find their source code much easier to understand and tweak for my needs, and also to integrate it.

like image 176
A. Ionescu Avatar answered Nov 12 '22 18:11

A. Ionescu


iTransformers DDOS servlet filter is a good example for a servlet filter able to apply Remotely Triggered Black holing https://www.rfc-editor.org/rfc/rfc5635 which is the only real/good and scalable way to defend yourself from a DDOS attacks.

like image 39
Nikolay Milovanov Avatar answered Nov 12 '22 18:11

Nikolay Milovanov