org.jboss.security.auth.login
Class DynamicLoginConfig

java.lang.Object
  extended by org.jboss.mx.util.JBossNotificationBroadcasterSupport
      extended by org.jboss.system.ServiceMBeanSupport
          extended by org.jboss.security.auth.login.DynamicLoginConfig
All Implemented Interfaces:
javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, DynamicLoginConfigMBean, org.jboss.system.Service, org.jboss.system.ServiceMBean

public class DynamicLoginConfig
extends org.jboss.system.ServiceMBeanSupport
implements DynamicLoginConfigMBean

A security config mbean that loads an xml login configuration using the XMLLoginConfig.loadConfig(URL config) operation on start, and unloads the contained login module configurations on stop. login-config.xml jboss.security:service=XMLLoginConfig jboss.security:service=JaasSecurityManager

Version:
$Revision: 57203 $
Author:
Scott.Stark@jboss.org, Anil.Saldhana@jboss.org
See Also:
XMLLoginConfig

Field Summary
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport
log, server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.system.ServiceMBean
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Constructor Summary
DynamicLoginConfig()
           
 
Method Summary
 void flushAuthenticationCaches()
          Go through the registered login config names and flush the auth caches if there is a registered SecurityManagerService.
 String getAuthConfig()
          Get the resource path to the JAAS login configuration file to use.
 javax.management.ObjectName getLoginConfigService()
          Get the XMLLoginConfig service to use for loading.
 String getName()
           
 PolicyConfig getPolicyConfig()
          Get the embedded PolicyConfig
 javax.management.ObjectName getSecurityManagerService()
          Get the SecurityManagerService used to flush the registered security domains.
 void setAuthConfig(String authConf)
          Set the resource path to the JAAS login configuration file to use.
 void setLoginConfigService(javax.management.ObjectName serviceName)
          Get the XMLLoginConfig service to use for loading.
 void setPolicyConfig(PolicyConfig config)
          Set the embedded PolicyConfig
 void setSecurityManagerService(javax.management.ObjectName serviceName)
          Set the SecurityManagerService used to flush the registered security domains.
protected  void startService()
          Start the service.
protected  void stopService()
          Start the service.
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
create, createService, destroy, destroyService, getDeploymentInfo, getLog, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop
 
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.system.ServiceMBean
getState, getStateString, jbossInternalLifecycle
 
Methods inherited from interface org.jboss.system.Service
create, destroy, start, stop
 

Constructor Detail

DynamicLoginConfig

public DynamicLoginConfig()
Method Detail

getName

public String getName()
Specified by:
getName in interface org.jboss.system.ServiceMBean
Overrides:
getName in class org.jboss.system.ServiceMBeanSupport

getPolicyConfig

public PolicyConfig getPolicyConfig()
Description copied from interface: DynamicLoginConfigMBean
Get the embedded PolicyConfig

Specified by:
getPolicyConfig in interface DynamicLoginConfigMBean
Returns:
the PolicyConfig if it was specified, null otherwise.

setPolicyConfig

public void setPolicyConfig(PolicyConfig config)
Description copied from interface: DynamicLoginConfigMBean
Set the embedded PolicyConfig

Specified by:
setPolicyConfig in interface DynamicLoginConfigMBean
Parameters:
config - - the embedded PolicyConfig object

getLoginConfigService

public javax.management.ObjectName getLoginConfigService()
Description copied from interface: DynamicLoginConfigMBean
Get the XMLLoginConfig service to use for loading.

Specified by:
getLoginConfigService in interface DynamicLoginConfigMBean
Returns:
the XMLLoginConfig service name.

setLoginConfigService

public void setLoginConfigService(javax.management.ObjectName serviceName)
Get the XMLLoginConfig service to use for loading. This service must support a String[] loadConfig(URL) operation to load the configurations.

Specified by:
setLoginConfigService in interface DynamicLoginConfigMBean
Parameters:
serviceName - - the XMLLoginConfig service name.

getSecurityManagerService

public javax.management.ObjectName getSecurityManagerService()
Description copied from interface: DynamicLoginConfigMBean
Get the SecurityManagerService used to flush the registered security domains.

Specified by:
getSecurityManagerService in interface DynamicLoginConfigMBean
Returns:
the SecurityManagerService service name.

setSecurityManagerService

public void setSecurityManagerService(javax.management.ObjectName serviceName)
Set the SecurityManagerService used to flush the registered security domains. This service must support an flushAuthenticationCache(String) operation to flush the case for the argument security domain. Setting this triggers the flush of the authentication caches when the service is stopped.

Specified by:
setSecurityManagerService in interface DynamicLoginConfigMBean
Parameters:
serviceName - - the SecurityManagerService service name.

getAuthConfig

public String getAuthConfig()
Get the resource path to the JAAS login configuration file to use.

Specified by:
getAuthConfig in interface DynamicLoginConfigMBean

setAuthConfig

public void setAuthConfig(String authConf)
Set the resource path to the JAAS login configuration file to use. The default is "login-config.xml".

Specified by:
setAuthConfig in interface DynamicLoginConfigMBean
Parameters:
authConf - - the classpath resource to load.

flushAuthenticationCaches

public void flushAuthenticationCaches()
                               throws Exception
Go through the registered login config names and flush the auth caches if there is a registered SecurityManagerService.

Specified by:
flushAuthenticationCaches in interface DynamicLoginConfigMBean
Throws:
Exception

startService

protected void startService()
                     throws Exception
Start the service. This entails loading the AuthConf file contents using the LoginConfigService.

Overrides:
startService in class org.jboss.system.ServiceMBeanSupport
Throws:
Exception

stopService

protected void stopService()
                    throws Exception
Start the service. This entails unloading the AuthConf file contents using the LoginConfigService.

Overrides:
stopService in class org.jboss.system.ServiceMBeanSupport
Throws:
Exception


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.