A simple server login module useful to quick setup of security for testing
purposes. It implements the following simple algorithm:
if password is null, authenticate the user and assign an identity of "guest"
and a role of "guest".
else if password is equal to the user name, assign an identity equal to
the username and both "user" and "guest" roles
else authentication fails.
<application-policy name="simple">
<authentication>
<login-module code="org.jboss.security.auth.spi.SimpleServerLoginModule"
flag="required" ></login-module>
</authentication>
</application-policy>
<security-constraint>
<web-resource-collection>
<!-- configure resources to protect here -->
</web-resource-collection>
<auth-constraint>
<role-name>user</role-name>
</auth-constraint>
</security-constraint>
<jboss-web>
<security-domain>java:/jaas/simple</security-domain>
</jboss-web>
There are no comments on this article