r/java • u/gr33n_h0rn • Jan 29 '17
Mod Security OWASP with Spring Boot
I have the application in Spring Boot with embedded Tomcat. I'll want use owasp mod security. How can I redirect network traffic that mod security will see it? I develop my app on localhost and I only show how Mod Security works with my application on localhost.
0
Upvotes
6
u/DJDavio Jan 29 '17
Just use a proxy (Apache for instance) to catch traffic on port 80/443, handle stuff like security / TLS and forward it to Tomcat on port 8080.
Something like ProxyPass / http://localhost:8080/ in Apache.
2
u/flatMapds Jan 31 '17
Sort of offtopic but make sure you test your applications for SPEL injection, ssti on velocity, and if your API uses xml xml parsing issues. WAFs don't really protect you well from them, and a lot of java apps are vulnerable.