JBoss.org Community Documentation
The IdentityLoginModule
is a simple login module that associates a hard-coded user name a to any subject authenticated against the module. It creates a SimplePrincipal
instance using the name specified by the principal
option. This login module is useful when you need to provide a fixed identity to a service and in development environments when you want to test the security associated with a given principal and associated roles.
The supported login module configuration options include:
principal
: This is the name to use for the SimplePrincipal
all users are authenticated as. The principal name defaults to guest
if no principal option is specified.
roles : This is a comma-delimited list of roles that will be assigned to the user.
A sample XMLLoginConfig configuration entry that would authenticate all users as the principal named jduke
and assign role names of TheDuke
, and AnimatedCharacter
is:
<policy> <application-policy name="testIdentity"> <authentication> <login-module code="org.jboss.security.auth.spi.IdentityLoginModule" flag="required"> <module-option name="principal">jduke</module-option> <module-option name="roles">TheDuke,AnimatedCharater</module-option> </login-module> </authentication> </application-policy> </policy>
This module supports password stacking.