org.jboss.messaging.integration.security
Class JBossASSecurityManager

java.lang.Object
  extended by org.jboss.messaging.integration.security.JBossASSecurityManager
All Implemented Interfaces:
JBMSecurityManager, MessagingComponent

public class JBossASSecurityManager
extends java.lang.Object
implements JBMSecurityManager, MessagingComponent

This implementation delegates to the JBoss AS security interfaces (which in turn use JAAS) It can be used when running JBM in JBoss AS

Author:
Andy Taylor, Tim Fox

Constructor Summary
JBossASSecurityManager()
           
 
Method Summary
 void addRole(java.lang.String user, java.lang.String role)
          adds a new role for a user.
 void addUser(java.lang.String user, java.lang.String password)
          adds a new user
 boolean isStarted()
           
 void removeRole(java.lang.String user, java.lang.String role)
          removes a role from a user
 void removeUser(java.lang.String user)
          removes a user and any roles they may have.
 void setAuthenticationManager(AuthenticationManager authenticationManager)
           
 void setDefaultUser(java.lang.String username)
           
 void setRealmMapping(RealmMapping realmMapping)
           
 void setSecurityDomainName(java.lang.String securityDomainName)
           
 void start()
          lifecycle method, needs to be called
 void stop()
           
 boolean validateUser(java.lang.String user, java.lang.String password)
          is this a valid user.
 boolean validateUserAndRole(java.lang.String user, java.lang.String password, java.util.Set<Role> roles, CheckType checkType)
          is this a valid user and do they have the correct role
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JBossASSecurityManager

public JBossASSecurityManager()
Method Detail

validateUser

public boolean validateUser(java.lang.String user,
                            java.lang.String password)
Description copied from interface: JBMSecurityManager
is this a valid user.

Specified by:
validateUser in interface JBMSecurityManager
Parameters:
user - the user
password - the users password
Returns:
true if a valid user

validateUserAndRole

public boolean validateUserAndRole(java.lang.String user,
                                   java.lang.String password,
                                   java.util.Set<Role> roles,
                                   CheckType checkType)
Description copied from interface: JBMSecurityManager
is this a valid user and do they have the correct role

Specified by:
validateUserAndRole in interface JBMSecurityManager
Parameters:
user - the user
password - the users password
roles - the roles the user has
checkType - the type of check to perform
Returns:
true if the user is valid and they have the correct roles

addRole

public void addRole(java.lang.String user,
                    java.lang.String role)
Description copied from interface: JBMSecurityManager
adds a new role for a user.

Specified by:
addRole in interface JBMSecurityManager
Parameters:
user - the user
role - the role to add

addUser

public void addUser(java.lang.String user,
                    java.lang.String password)
Description copied from interface: JBMSecurityManager
adds a new user

Specified by:
addUser in interface JBMSecurityManager
Parameters:
user - the user to add
password - theusers password

removeRole

public void removeRole(java.lang.String user,
                       java.lang.String role)
Description copied from interface: JBMSecurityManager
removes a role from a user

Specified by:
removeRole in interface JBMSecurityManager
Parameters:
user - the user
role - the role to remove

removeUser

public void removeUser(java.lang.String user)
Description copied from interface: JBMSecurityManager
removes a user and any roles they may have.

Specified by:
removeUser in interface JBMSecurityManager
Parameters:
user - the user to remove

setDefaultUser

public void setDefaultUser(java.lang.String username)
Specified by:
setDefaultUser in interface JBMSecurityManager

setRealmMapping

public void setRealmMapping(RealmMapping realmMapping)

setAuthenticationManager

public void setAuthenticationManager(AuthenticationManager authenticationManager)

start

public void start()
           throws java.lang.Exception
lifecycle method, needs to be called

Specified by:
start in interface MessagingComponent
Throws:
java.lang.Exception

stop

public void stop()
Specified by:
stop in interface MessagingComponent

isStarted

public boolean isStarted()
Specified by:
isStarted in interface MessagingComponent

setSecurityDomainName

public void setSecurityDomainName(java.lang.String securityDomainName)


Copyright © 2006 JBoss Inc. All Rights Reserved.