org.jboss.security.auth.spi
Class CertRolesLoginModule

java.lang.Object
  extended byorg.jboss.security.auth.spi.AbstractServerLoginModule (src) 
      extended byorg.jboss.security.auth.spi.BaseCertLoginModule (src) 
          extended byorg.jboss.security.auth.spi.CertRolesLoginModule
All Implemented Interfaces:
javax.security.auth.spi.LoginModule

public class CertRolesLoginModule
extends BaseCertLoginModule (src)

Certificate Login Module that uses a properties file to store role information. This works just like the UsersRolesLoginModule, only without the users.properties file. In fact, all the role handling code was borrowed directly from that class.

See Also:
BaseCertLoginModule (src)

Field Summary
 
Fields inherited from class org.jboss.security.auth.spi.AbstractServerLoginModule (src)
callbackHandler, log, loginOk, options, principalClassName, sharedState, subject, unauthenticatedIdentity, useFirstPass
 
Constructor Summary
CertRolesLoginModule()
           
 
Method Summary
protected  java.security.acl.Group[] getRoleSets()
          This method is pretty much straight from the UsersRolesLoginModule.
 void initialize(javax.security.auth.Subject subject, javax.security.auth.callback.CallbackHandler callbackHandler, java.util.Map sharedState, java.util.Map options)
          Initialize this LoginModule.
 boolean login()
          Perform the authentication of the username and password.
 
Methods inherited from class org.jboss.security.auth.spi.BaseCertLoginModule (src)
commit, getAliasAndCert, getCredentials, getIdentity, getUsername, validateCredential
 
Methods inherited from class org.jboss.security.auth.spi.AbstractServerLoginModule (src)
abort, createGroup, createIdentity, getUnauthenticatedIdentity, getUseFirstPass, logout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CertRolesLoginModule

public CertRolesLoginModule()
Method Detail

initialize

public void initialize(javax.security.auth.Subject subject,
                       javax.security.auth.callback.CallbackHandler callbackHandler,
                       java.util.Map sharedState,
                       java.util.Map options)
Initialize this LoginModule.

Specified by:
initialize in interface javax.security.auth.spi.LoginModule
Overrides:
initialize in class BaseCertLoginModule (src)
Parameters:
options - - the login module option map. Supported options include: rolesProperties: The name of the properties resource containing user/roles the default is "roles.properties". roleGroupSeperator: The character used to seperate the role group name from the username e.g., '.' in jduke.CallerPrincipal=... . The default = '.'. defaultRolesProperties=string: The name of the properties resource containing the username to roles mappings that will be used as the defaults Properties passed to the usersProperties Properties. This defaults to defaultRoles.properties.
subject - the Subject to update after a successful login.
callbackHandler - the CallbackHandler that will be used to obtain the the user identity and credentials.
sharedState - a Map shared between all configured login module instances
See Also:
SecurityDomain (src) , X509CertificateVerifier (src)

login

public boolean login()
              throws javax.security.auth.login.LoginException
Description copied from class: BaseCertLoginModule (src)
Perform the authentication of the username and password.

Specified by:
login in interface javax.security.auth.spi.LoginModule
Overrides:
login in class BaseCertLoginModule (src)
Throws:
javax.security.auth.login.LoginException

getRoleSets

protected java.security.acl.Group[] getRoleSets()
                                         throws javax.security.auth.login.LoginException
This method is pretty much straight from the UsersRolesLoginModule.

Overrides:
getRoleSets in class BaseCertLoginModule (src)
Returns:
Throws:
javax.security.auth.login.LoginException
See Also:
UsersRolesLoginModule.getRoleSets()