Class GFServerConfigProvider
- java.lang.Object
-
- com.sun.enterprise.security.jaspic.config.GFServerConfigProvider
-
- All Implemented Interfaces:
jakarta.security.auth.message.config.AuthConfigProvider
public class GFServerConfigProvider extends Object implements jakarta.security.auth.message.config.AuthConfigProvider
This class implements the interface AuthConfigProvider.- Author:
- Shing Wai Chan, Ronald Monzillo
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classGFServerConfigProvider.GFClientAuthContextprotected static classGFServerConfigProvider.GFServerAuthContextstatic classGFServerConfigProvider.IDEntryparsed ID entrystatic classGFServerConfigProvider.InterceptEntryprotected static classGFServerConfigProvider.ModuleInfoA data object contains module object and the corresponding map.
-
Field Summary
Fields Modifier and Type Field Description protected static StringCLIENTprotected jakarta.security.auth.message.config.AuthConfigFactoryfactorystatic StringHTTPSERVLETprotected static Map<String,String>layerDefaultRegisIDMapprotected static StringMANAGES_SESSIONS_OPTIONprotected static ReadWriteLockrwLockprotected static StringSERVERstatic StringSOAP
-
Constructor Summary
Constructors Constructor Description GFServerConfigProvider(Map properties, jakarta.security.auth.message.config.AuthConfigFactory factory)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static ClassLoadergetClassLoader()jakarta.security.auth.message.config.ClientAuthConfiggetClientAuthConfig(String layer, String appContext, CallbackHandler handler)Get an instance of ClientAuthConfig from this provider.jakarta.security.auth.message.config.ServerAuthConfiggetServerAuthConfig(String layer, String appContext, CallbackHandler handler)Get an instance of ServerAuthConfig from this provider.static voidloadConfigContext(Object config)this method is intended to be called by the admin configuration system when the corresponding config object has changed.protected static voidloadParser(jakarta.security.auth.message.config.AuthConfigProvider aProvider, jakarta.security.auth.message.config.AuthConfigFactory aFactory, Object config)voidrefresh()Causes a dynamic configuration provider to update its internal state such that any resulting change to its state is reflected in the corresponding authentication context configuration objects previously created by the provider within the current process context.static voidsetValidateRequestSubject(Subject subject)
-
-
-
Field Detail
-
SOAP
public static final String SOAP
- See Also:
- Constant Field Values
-
HTTPSERVLET
public static final String HTTPSERVLET
- See Also:
- Constant Field Values
-
CLIENT
protected static final String CLIENT
- See Also:
- Constant Field Values
-
SERVER
protected static final String SERVER
- See Also:
- Constant Field Values
-
MANAGES_SESSIONS_OPTION
protected static final String MANAGES_SESSIONS_OPTION
- See Also:
- Constant Field Values
-
rwLock
protected static final ReadWriteLock rwLock
-
factory
protected jakarta.security.auth.message.config.AuthConfigFactory factory
-
-
Constructor Detail
-
GFServerConfigProvider
public GFServerConfigProvider(Map properties, jakarta.security.auth.message.config.AuthConfigFactory factory)
-
-
Method Detail
-
getClientAuthConfig
public jakarta.security.auth.message.config.ClientAuthConfig getClientAuthConfig(String layer, String appContext, CallbackHandler handler) throws jakarta.security.auth.message.AuthException
Get an instance of ClientAuthConfig from this provider.The implementation of this method returns a ClientAuthConfig instance that describes the configuration of ClientAuthModules at a given message layer, and for use in an identified application context.
- Specified by:
getClientAuthConfigin interfacejakarta.security.auth.message.config.AuthConfigProvider- Parameters:
layer- a String identifying the message layer for the returned ClientAuthConfig object. This argument must not be null.appContext- a String that identifies the messaging context for the returned ClientAuthConfig object. This argument must not be null.handler- a CallbackHandler to be passed to the ClientAuthModules encapsulated by ClientAuthContext objects derived from the returned ClientAuthConfig. This argument may be null, in which case the implementation may assign a default handler to the configuration.- Returns:
- a ClientAuthConfig Object that describes the configuration of ClientAuthModules at the message layer and messaging context identified by the layer and appContext arguments. This method does not return null.
- Throws:
jakarta.security.auth.message.AuthException- if this provider does not support the assignment of a default CallbackHandler to the returned ClientAuthConfig.SecurityException- if the caller does not have permission to retrieve the configuration. The CallbackHandler assigned to the configuration must support the Callback objects required to be supported by the profile of this specification being followed by the messaging runtime. The CallbackHandler instance must be initialized with any application context needed to process the required callbacks on behalf of the corresponding application.
-
getServerAuthConfig
public jakarta.security.auth.message.config.ServerAuthConfig getServerAuthConfig(String layer, String appContext, CallbackHandler handler) throws jakarta.security.auth.message.AuthException
Get an instance of ServerAuthConfig from this provider.The implementation of this method returns a ServerAuthConfig instance that describes the configuration of ServerAuthModules at a given message layer, and for a particular application context.
- Specified by:
getServerAuthConfigin interfacejakarta.security.auth.message.config.AuthConfigProvider- Parameters:
layer- a String identifying the message layer for the returned ServerAuthConfig object. This argument must not be null.appContext- a String that identifies the messaging context for the returned ServerAuthConfig object. This argument must not be null.handler- a CallbackHandler to be passed to the ServerAuthModules encapsulated by ServerAuthContext objects derived from thr returned ServerAuthConfig. This argument may be null, in which case the implementation may assign a default handler to the configuration.- Returns:
- a ServerAuthConfig Object that describes the configuration of ServerAuthModules at a given message layer, and for a particular application context. This method does not return null.
- Throws:
jakarta.security.auth.message.AuthException- if this provider does not support the assignment of a default CallbackHandler to the returned ServerAuthConfig.SecurityException- if the caller does not have permission to retrieve the configuration.The CallbackHandler assigned to the configuration must support the Callback objects required to be supported by the profile of this specification being followed by the messaging runtime. The CallbackHandler instance must be initialized with any application context needed to process the required callbacks on behalf of the corresponding application.
-
refresh
public void refresh()
Causes a dynamic configuration provider to update its internal state such that any resulting change to its state is reflected in the corresponding authentication context configuration objects previously created by the provider within the current process context.- Specified by:
refreshin interfacejakarta.security.auth.message.config.AuthConfigProvider- Throws:
jakarta.security.auth.message.AuthException- if an error occured during the refresh.SecurityException- if the caller does not have permission to refresh the provider.
-
loadConfigContext
public static void loadConfigContext(Object config)
this method is intended to be called by the admin configuration system when the corresponding config object has changed. It relies on the slaves, since it is a static method.- Parameters:
config- a config object of type understood by the parser. NOTE: there appears to be a thread saftey problem, and this method will fail if a slaveProvider has not been established prior to its call.
-
loadParser
protected static void loadParser(jakarta.security.auth.message.config.AuthConfigProvider aProvider, jakarta.security.auth.message.config.AuthConfigFactory aFactory, Object config)
-
getClassLoader
protected static ClassLoader getClassLoader()
-
setValidateRequestSubject
public static void setValidateRequestSubject(Subject subject)
-
-