Wicket-Security 1.3.0
Wicket-Security 1.3.0 is an attempt to create an out of the box reusable authenticating and authorization framework for Wicket.
It contains 2 projects Wasp and Swarm.
Wasp defines the api of the framework and Swarm provides a standard implementation.
More information on Wasp can be found here
SWARM
Standard Wicket Authentication and Rights Management, or swarm for short, provides the standard implementation for Wasp.
Swarm comes with a default ActionFactory, WaspAuthorizationStrategy and a Jaas like authorization and authentication mechanism, to get you started right away. Swarm uses an ACL (aka policy file) to control user permissions. Users are represented by one or more Subjects which have Principals. These principals are mapped in the policy file to Permissions. Wicket will check for the correct permissions of a component before it will instantiate, render or enable it.
Authentication
Users in Swarm are represented by one or more Subjects, subjects are generated by LoginContexts. Each time you pass a login context to the session (or directly to the WaspAuthorizationStrategy) a new Subject is added, increasing the permissions you have. Each context may also be removed via the logoff method. A common context is the UsernamePasswordContext which takes 2 simple strings and allows you to verify the username and password and if correct return a subject with the appropriate principals.
Authorization
Authorization is handled by Permissions and Principals. Principals define sets of Permissions and are granted to Subjects. Sounds familiar? You are right this is just like JAAS. Pricipals are collected in a Hive (somewhat like the JAAS Policy). A Hive is usually for one application only, but can be shared between multiple applications in the same vm. Swarm provides a factory so you can populate the hive via a database, a policy file, or another way. The default is to use the policy file.
Downloads
Latest stable release is 1.3.0.
The latest releases are available at SourceForge
Maven 2
Wasp and Swarm can be downloaded from wicket-stuff maven repository by including the following fragments in your project pom.
<repository> <id>wicket-snaps</id> <url>http://wicketstuff.org/maven/repository</url> <snapshots> <enabled>true</enabled> </snapshots> <releases> <enabled>true</enabled> </releases> </repository>
<dependency> <groupId>org.apache.wicket.wicket-security</groupId> <artifactId>swarm</artifactId> <version>1.3.0</version> <scope>compile</scope> </dependency>
A separate dependency on Wasp is not necessary since maven will automatically fetch it with Swarm. However if you are only interested in Wasp you can use the following fragment.
<dependency> <groupId>org.apache.wicket.wicket-security</groupId> <artifactId>wasp</artifactId> <version>1.3.0</version> <scope>compile</scope> </dependency>
SVN Repository
The sourcecode for 1.3.0 is available at
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/wicket-security-1.3.0-final/wasp/wicket-security-wasp
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/wicket-security-1.3.0-final/swarm/wicket-security-swarm
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/wicket-security-1.3.0-final/examples/wicket-security-examples