How should I secure my webapp written using Wicket, Spring, and JPA?

Posted by Martin on Stack Overflow See other posts from Stack Overflow or by Martin
Published on 2010-02-23T00:08:04Z Indexed on 2010/04/28 9:53 UTC
Read the original article Hit count: 247

Filed under:
|
|
|
|

So, I have an web-based application that is using the Wicket 1.4 framework, and it uses Spring beans, the Java Persistence API (JPA), and the OpenSessionInView pattern. I'm hoping to find a security model that is declarative, but doesn't require gobs of XML configuration -- I'd prefer annotations.

Here are the options so far:

  1. Spring Security (guide) - looks complete, but every guide I find that combines it with Wicket still calls it Acegi Security, which makes me think it must be old.

  2. Wicket-Auth-Roles (guide 1 and guide 2) - Most guides recommend mixing this with Spring Security, and I love the declarative style of @Authorize("ROLE1","ROLE2",etc). I'm concerned about having to extend AuthenticatedWebApplication, since I'm already extending org.apache.wicket.protocol.http.WebApplication, and Spring is already proxying that behind org.apache.wicket.spring.SpringWebApplicationFactory.

  3. SWARM / WASP (guide) - This looks the newest (though the main contributor passed away years ago), but I hate all of the JAAS-styled text files that declare permissions for principals. I also don't like the idea of making an Action class for every single thing a user might want to do. Secure models also aren't immediately obvious to me. Plus, there isn't an Authn example.

Additionally, it looks like lots of folks recommend mixing the first and second options. I can't tell what the best practice is at all, though.

© Stack Overflow or respective owner

Related posts about wicket

Related posts about security