Continuation of changes to switch over to using log4j.
This commit is contained in:
parent
a5d4983177
commit
f33278929d
@ -47,7 +47,7 @@ BUILDDIR = ../build
|
|||||||
|
|
||||||
CLASSES = $(addprefix $(BUILDDIR)/, $(JAVAFILES:%.java=%.class))
|
CLASSES = $(addprefix $(BUILDDIR)/, $(JAVAFILES:%.java=%.class))
|
||||||
|
|
||||||
LIBS =
|
LIBS = :/usr/share/java/log4j.jar
|
||||||
CLASSPATH = $(LIBDIR)/java/CasaAuthToken.jar:$(LIBS)
|
CLASSPATH = $(LIBDIR)/java/CasaAuthToken.jar:$(LIBS)
|
||||||
|
|
||||||
all: $(BUILDDIR)/$(MODULE_NAME).$(MODULE_EXT)
|
all: $(BUILDDIR)/$(MODULE_NAME).$(MODULE_EXT)
|
||||||
|
@ -27,6 +27,8 @@ package com.novell.casa.jaas;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
import javax.security.auth.Subject;
|
import javax.security.auth.Subject;
|
||||||
import javax.security.auth.callback.Callback;
|
import javax.security.auth.callback.Callback;
|
||||||
import javax.security.auth.callback.CallbackHandler;
|
import javax.security.auth.callback.CallbackHandler;
|
||||||
@ -49,6 +51,8 @@ import com.novell.casa.authtoksvc.CasaIdentityToken;
|
|||||||
*/
|
*/
|
||||||
public final class CasaLoginModule implements LoginModule
|
public final class CasaLoginModule implements LoginModule
|
||||||
{
|
{
|
||||||
|
private static final Logger m_log = Logger.getLogger(CasaLoginModule.class);
|
||||||
|
|
||||||
private final static String casaUsername = "CasaIdentityUser";
|
private final static String casaUsername = "CasaIdentityUser";
|
||||||
|
|
||||||
private Subject m_subject = null;
|
private Subject m_subject = null;
|
||||||
@ -96,7 +100,7 @@ public final class CasaLoginModule implements LoginModule
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
System.err.println("CasaLoginModule.commit()- Exception caught associating principal, msg: " + e.getMessage());
|
m_log.error("CasaLoginModule.commit()- Exception caught associating principal, msg: " + e.getMessage());
|
||||||
throw new LoginException("Error encountered");
|
throw new LoginException("Error encountered");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -119,7 +123,7 @@ public final class CasaLoginModule implements LoginModule
|
|||||||
// Verify that a CallbackHandler was specified
|
// Verify that a CallbackHandler was specified
|
||||||
if (m_callbackHandler == null)
|
if (m_callbackHandler == null)
|
||||||
{
|
{
|
||||||
System.err.println("CasaLoginModule.login()- Null CallbackHandler");
|
m_log.error("CasaLoginModule.login()- Null CallbackHandler");
|
||||||
throw new LoginException("Null CallbackHandler");
|
throw new LoginException("Null CallbackHandler");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -153,7 +157,7 @@ public final class CasaLoginModule implements LoginModule
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
System.err.println("CasaLoginModule.login()- Exception caught during nameCallback, msg: " + e.getMessage());
|
m_log.warn("CasaLoginModule.login()- Exception caught during nameCallback, msg: " + e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check the username
|
// Check the username
|
||||||
@ -187,7 +191,7 @@ public final class CasaLoginModule implements LoginModule
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
System.err.println("CasaLoginModule.login()- Exception caught during passwordCallback, msg: " + e.getMessage());
|
m_log.warn("CasaLoginModule.login()- Exception caught during passwordCallback, msg: " + e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check the CasaAuthenticationToken
|
// Check the CasaAuthenticationToken
|
||||||
@ -209,15 +213,14 @@ public final class CasaLoginModule implements LoginModule
|
|||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
// The validation of one of the tokens failed
|
// The validation of one of the tokens failed
|
||||||
// tbd - Log
|
m_log.info("CasaLoginModule.login()- Exception caught during token processing, msg: " + e.getMessage());
|
||||||
System.err.println("CasaLoginModule.login()- Exception caught during token processing, msg: " + e.getMessage());
|
|
||||||
throw new FailedLoginException("Token validation failed");
|
throw new FailedLoginException("Token validation failed");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Token not provided
|
// Token not provided
|
||||||
System.err.println("CasaLoginModule.login()- Token not provided");
|
m_log.warn("CasaLoginModule.login()- Token not provided");
|
||||||
throw new FailedLoginException("CasaAuthenticationToken not obtained");
|
throw new FailedLoginException("CasaAuthenticationToken not obtained");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -156,6 +156,7 @@ $(BUILDDIR)/$(WEBAPP): $(BUILDDIR) $(CLASSES)
|
|||||||
cp ../src/com/novell/casa/authtoksvc/Pwd_mechanism.settings $(BUILDDIR)/webapp/WEB-INF/conf/installed_auth_mechanisms/PwdAuthenticate/mechanism.settings
|
cp ../src/com/novell/casa/authtoksvc/Pwd_mechanism.settings $(BUILDDIR)/webapp/WEB-INF/conf/installed_auth_mechanisms/PwdAuthenticate/mechanism.settings
|
||||||
cp $(AXIS_JARS_DIR)/*.jar $(BUILDDIR)/webapp/WEB-INF/lib/
|
cp $(AXIS_JARS_DIR)/*.jar $(BUILDDIR)/webapp/WEB-INF/lib/
|
||||||
rm $(BUILDDIR)/webapp/WEB-INF/lib/xercesImpl.jar
|
rm $(BUILDDIR)/webapp/WEB-INF/lib/xercesImpl.jar
|
||||||
|
rm $(BUILDDIR)/webapp/WEB-INF/lib/log4j-1.2.8.jar
|
||||||
ls $(BUILDDIR)/webapp/WEB-INF/lib/
|
ls $(BUILDDIR)/webapp/WEB-INF/lib/
|
||||||
jar cvf $(BUILDDIR)/$(WEBAPP) -C $(BUILDDIR)/webapp .
|
jar cvf $(BUILDDIR)/$(WEBAPP) -C $(BUILDDIR)/webapp .
|
||||||
cp $(BUILDDIR)/$(WEBAPP) $(LIBDIR)/java/
|
cp $(BUILDDIR)/$(WEBAPP) $(LIBDIR)/java/
|
||||||
|
@ -4,17 +4,17 @@
|
|||||||
#
|
#
|
||||||
########################################################
|
########################################################
|
||||||
|
|
||||||
#
|
#
|
||||||
# Root logger configuration.
|
# Root logger configuration.
|
||||||
#
|
#
|
||||||
log4j.rootLogger=debug, DefaultAppender
|
log4j.rootLogger=info, DefaultAppender
|
||||||
|
|
||||||
#
|
#
|
||||||
# DefaultAppender configuration.
|
# DefaultAppender configuration.
|
||||||
#
|
#
|
||||||
log4j.appender.DefaultAppender=org.apache.log4j.RollingFileAppender
|
log4j.appender.DefaultAppender=org.apache.log4j.RollingFileAppender
|
||||||
log4j.appender.DefaultAppender.File=/srv/www/casaats/logs/ats.log
|
log4j.appender.DefaultAppender.File=/srv/www/casaats/logs/ats.log
|
||||||
log4j.appender.DefaultAppender.MaxFileSize=100KB
|
log4j.appender.DefaultAppender.MaxFileSize=100KB
|
||||||
log4j.appender.DefaultAppender.MaxBackupIndex=2
|
log4j.appender.DefaultAppender.MaxBackupIndex=2
|
||||||
log4j.appender.DefaultAppender.layout=org.apache.log4j.PatternLayout
|
log4j.appender.DefaultAppender.layout=org.apache.log4j.PatternLayout
|
||||||
log4j.appender.DefaultAppender.layout.ConversionPattern=%d{ISO8601} %p %C{2} %m%n
|
log4j.appender.DefaultAppender.layout.ConversionPattern=%d{ISO8601} %p %C{2} %m%n
|
||||||
|
@ -59,7 +59,7 @@ public final class AuthMechConfig
|
|||||||
*/
|
*/
|
||||||
public AuthMechConfig()
|
public AuthMechConfig()
|
||||||
{
|
{
|
||||||
m_log.debug("AuthMechConfig()- Default");
|
m_log.debug("Constructor- Default");
|
||||||
|
|
||||||
// Create a map to keep track of the token settings
|
// Create a map to keep track of the token settings
|
||||||
m_mechSettingsMap = new HashMap<String, String>();
|
m_mechSettingsMap = new HashMap<String, String>();
|
||||||
@ -73,7 +73,7 @@ public final class AuthMechConfig
|
|||||||
*/
|
*/
|
||||||
public AuthMechConfig(String mechSettingsFileName) throws Exception
|
public AuthMechConfig(String mechSettingsFileName) throws Exception
|
||||||
{
|
{
|
||||||
m_log.debug("AuthMechConfig()-");
|
m_log.debug("Constructor-");
|
||||||
|
|
||||||
// Create a map to keep track of the token settings
|
// Create a map to keep track of the token settings
|
||||||
m_mechSettingsMap = new HashMap<String, String>();
|
m_mechSettingsMap = new HashMap<String, String>();
|
||||||
@ -96,23 +96,23 @@ public final class AuthMechConfig
|
|||||||
}
|
}
|
||||||
catch (SAXException e)
|
catch (SAXException e)
|
||||||
{
|
{
|
||||||
m_log.warn("AuthMechConfig()- " + mechSettingsFileName + " format error, exception: " + e.toString());
|
m_log.warn("Constructor- " + mechSettingsFileName + " format error, exception: " + e.toString());
|
||||||
throw new Exception("AuthMechConfig()- authtoken.settings format error", e);
|
throw new Exception("Constructor- authtoken.settings format error", e);
|
||||||
}
|
}
|
||||||
catch (SecurityException e)
|
catch (SecurityException e)
|
||||||
{
|
{
|
||||||
m_log.warn("AuthMechConfig()- SecurityException accessing " + mechSettingsFileName + " Exception=" + e.toString());
|
m_log.warn("Constructor- SecurityException accessing " + mechSettingsFileName + " Exception=" + e.toString());
|
||||||
throw new Exception("AuthMechConfig()- Not able to access file", e);
|
throw new Exception("Constructor- Not able to access file", e);
|
||||||
}
|
}
|
||||||
catch (FileNotFoundException e)
|
catch (FileNotFoundException e)
|
||||||
{
|
{
|
||||||
m_log.warn("AuthMechConfig()- File " + mechSettingsFileName + " not found");
|
m_log.warn("Constructor- File " + mechSettingsFileName + " not found");
|
||||||
throw new Exception("AuthMechConfig()- File not found", e);
|
throw new Exception("Constructor- File not found", e);
|
||||||
}
|
}
|
||||||
catch (IOException e)
|
catch (IOException e)
|
||||||
{
|
{
|
||||||
m_log.warn("AuthMechConfig()- IOException accessing " + mechSettingsFileName + " Exception=" + e.toString());
|
m_log.warn("Constructor- IOException accessing " + mechSettingsFileName + " Exception=" + e.toString());
|
||||||
throw new Exception("AuthMechConfig()- Read error", e);
|
throw new Exception("Constructor- Read error", e);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
@ -143,14 +143,14 @@ public final class AuthMechConfig
|
|||||||
if (value == null)
|
if (value == null)
|
||||||
{
|
{
|
||||||
|
|
||||||
m_log.info("AuthMechConfig.getSetting()- Did not find setting " + settingName);
|
m_log.debug("getSetting()- Did not find setting " + settingName);
|
||||||
|
|
||||||
// The setting is not in our map, check if it is one to
|
// The setting is not in our map, check if it is one to
|
||||||
// which we have defaults.
|
// which we have defaults.
|
||||||
if (settingName.equals(Krb5ServicePrincipalName))
|
if (settingName.equals(Krb5ServicePrincipalName))
|
||||||
{
|
{
|
||||||
value = m_defaultKrb5ServicePrincipalNameValue;
|
value = m_defaultKrb5ServicePrincipalNameValue;
|
||||||
m_log.info("AuthMechConfig.getSetting()- Assigning default value " + value);
|
m_log.debug("getSetting()- Assigning default value " + value);
|
||||||
|
|
||||||
// Add the key to the map so that it can be found quicker next time
|
// Add the key to the map so that it can be found quicker next time
|
||||||
m_mechSettingsMap.put(Krb5ServicePrincipalName, m_defaultKrb5ServicePrincipalNameValue);
|
m_mechSettingsMap.put(Krb5ServicePrincipalName, m_defaultKrb5ServicePrincipalNameValue);
|
||||||
@ -158,8 +158,8 @@ public final class AuthMechConfig
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_log.info("AuthMechConfig.getSetting()- Found setting " + settingName);
|
m_log.debug("getSetting()- Found setting " + settingName);
|
||||||
m_log.info("AuthMechConfig.getSetting()- Setting value = " + value);
|
m_log.debug("getSetting()- Setting value = " + value);
|
||||||
}
|
}
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
|
@ -112,8 +112,8 @@ public final class AuthTokenConfig
|
|||||||
tokenLifetime = Integer.valueOf(getSetting(TokenLifetime)).intValue();
|
tokenLifetime = Integer.valueOf(getSetting(TokenLifetime)).intValue();
|
||||||
if (tokenLifetime < m_minimumTokenLifetimeValue)
|
if (tokenLifetime < m_minimumTokenLifetimeValue)
|
||||||
{
|
{
|
||||||
m_log.info("AuthTokenConfig()- Configured token lifetime too small, defaulting to "
|
m_log.debug("AuthTokenConfig()- Configured token lifetime too small, defaulting to "
|
||||||
+ Integer.toString(m_minimumTokenLifetimeValue) + " seconds");
|
+ Integer.toString(m_minimumTokenLifetimeValue) + " seconds");
|
||||||
tokenLifetime = m_minimumTokenLifetimeValue;
|
tokenLifetime = m_minimumTokenLifetimeValue;
|
||||||
|
|
||||||
// Update the map with the new value for the setting
|
// Update the map with the new value for the setting
|
||||||
@ -122,8 +122,8 @@ public final class AuthTokenConfig
|
|||||||
}
|
}
|
||||||
catch (NumberFormatException e)
|
catch (NumberFormatException e)
|
||||||
{
|
{
|
||||||
m_log.info("AuthTokenConfig()- Invalid configured token lifetime value, defaulting to "
|
m_log.debug("AuthTokenConfig()- Invalid configured token lifetime value, defaulting to "
|
||||||
+ Integer.toString(m_minimumTokenLifetimeValue) + " seconds");
|
+ Integer.toString(m_minimumTokenLifetimeValue) + " seconds");
|
||||||
tokenLifetime = m_minimumTokenLifetimeValue;
|
tokenLifetime = m_minimumTokenLifetimeValue;
|
||||||
|
|
||||||
// Update the map with the new value for the setting
|
// Update the map with the new value for the setting
|
||||||
@ -136,8 +136,8 @@ public final class AuthTokenConfig
|
|||||||
lifetimeShorter = Integer.valueOf(getSetting(LifetimeShorter)).intValue();
|
lifetimeShorter = Integer.valueOf(getSetting(LifetimeShorter)).intValue();
|
||||||
if (lifetimeShorter < m_minimumLifetimeShorterValue)
|
if (lifetimeShorter < m_minimumLifetimeShorterValue)
|
||||||
{
|
{
|
||||||
m_log.info("AuthTokenConfig()- Configured lifetime shorter too small, defaulting to "
|
m_log.debug("AuthTokenConfig()- Configured lifetime shorter too small, defaulting to "
|
||||||
+ Integer.toString(m_minimumLifetimeShorterValue) + " seconds");
|
+ Integer.toString(m_minimumLifetimeShorterValue) + " seconds");
|
||||||
lifetimeShorter = m_minimumLifetimeShorterValue;
|
lifetimeShorter = m_minimumLifetimeShorterValue;
|
||||||
|
|
||||||
// Update the map with the new value for the setting
|
// Update the map with the new value for the setting
|
||||||
@ -146,8 +146,8 @@ public final class AuthTokenConfig
|
|||||||
}
|
}
|
||||||
catch (NumberFormatException e)
|
catch (NumberFormatException e)
|
||||||
{
|
{
|
||||||
m_log.info("AuthTokenConfig()- Invalid configured lifetime shorter value, defaulting to "
|
m_log.debug("AuthTokenConfig()- Invalid configured lifetime shorter value, defaulting to "
|
||||||
+ Integer.toString(m_minimumLifetimeShorterValue) + " seconds");
|
+ Integer.toString(m_minimumLifetimeShorterValue) + " seconds");
|
||||||
lifetimeShorter = m_minimumLifetimeShorterValue;
|
lifetimeShorter = m_minimumLifetimeShorterValue;
|
||||||
|
|
||||||
// Update the map with the new value for the setting
|
// Update the map with the new value for the setting
|
||||||
@ -157,8 +157,8 @@ public final class AuthTokenConfig
|
|||||||
if (lifetimeShorter > tokenLifetime
|
if (lifetimeShorter > tokenLifetime
|
||||||
|| (tokenLifetime - lifetimeShorter) < m_minimumLifetimeShorterDifferential)
|
|| (tokenLifetime - lifetimeShorter) < m_minimumLifetimeShorterDifferential)
|
||||||
{
|
{
|
||||||
m_log.info("AuthTokenConfig()- Invalid lifetime shorter value, defaulting to "
|
m_log.debug("AuthTokenConfig()- Invalid lifetime shorter value, defaulting to "
|
||||||
+ Integer.toString(m_minimumLifetimeShorterValue) + " seconds");
|
+ Integer.toString(m_minimumLifetimeShorterValue) + " seconds");
|
||||||
|
|
||||||
// Update the map with the new value for the setting
|
// Update the map with the new value for the setting
|
||||||
m_tokenSettingsMap.put(LifetimeShorter, Integer.toString(m_minimumLifetimeShorterValue));
|
m_tokenSettingsMap.put(LifetimeShorter, Integer.toString(m_minimumLifetimeShorterValue));
|
||||||
@ -212,14 +212,14 @@ public final class AuthTokenConfig
|
|||||||
String value = m_tokenSettingsMap.get(settingName);
|
String value = m_tokenSettingsMap.get(settingName);
|
||||||
if (value == null)
|
if (value == null)
|
||||||
{
|
{
|
||||||
m_log.info("AuthTokenConfig.getSetting()- Did not find setting " + settingName);
|
m_log.debug("AuthTokenConfig.getSetting()- Did not find setting " + settingName);
|
||||||
|
|
||||||
// The setting is not in our map, check if it is one to
|
// The setting is not in our map, check if it is one to
|
||||||
// which we have defaults.
|
// which we have defaults.
|
||||||
if (settingName.equalsIgnoreCase(TokenLifetime))
|
if (settingName.equalsIgnoreCase(TokenLifetime))
|
||||||
{
|
{
|
||||||
value = m_defaultTokenLifetimeValue;
|
value = m_defaultTokenLifetimeValue;
|
||||||
m_log.info("AuthTokenConfig.getSetting()- Assigning default value " + value);
|
m_log.debug("AuthTokenConfig.getSetting()- Assigning default value " + value);
|
||||||
|
|
||||||
// Add the key to the map so that it can be found quicker next time
|
// Add the key to the map so that it can be found quicker next time
|
||||||
m_tokenSettingsMap.put(TokenLifetime, m_defaultTokenLifetimeValue);
|
m_tokenSettingsMap.put(TokenLifetime, m_defaultTokenLifetimeValue);
|
||||||
@ -227,7 +227,7 @@ public final class AuthTokenConfig
|
|||||||
else if (settingName.equalsIgnoreCase(LifetimeShorter))
|
else if (settingName.equalsIgnoreCase(LifetimeShorter))
|
||||||
{
|
{
|
||||||
value = m_defaultLifetimeShorterValue;
|
value = m_defaultLifetimeShorterValue;
|
||||||
m_log.info("AuthTokenConfig.getSetting()- Assigning default value " + value);
|
m_log.debug("AuthTokenConfig.getSetting()- Assigning default value " + value);
|
||||||
|
|
||||||
// Add the key to the map so that it can be found quicker next time
|
// Add the key to the map so that it can be found quicker next time
|
||||||
m_tokenSettingsMap.put(LifetimeShorter, m_defaultLifetimeShorterValue);
|
m_tokenSettingsMap.put(LifetimeShorter, m_defaultLifetimeShorterValue);
|
||||||
@ -235,7 +235,7 @@ public final class AuthTokenConfig
|
|||||||
else if (settingName.equalsIgnoreCase(IdentityTokenType))
|
else if (settingName.equalsIgnoreCase(IdentityTokenType))
|
||||||
{
|
{
|
||||||
value = m_defaultLifetimeShorterValue;
|
value = m_defaultLifetimeShorterValue;
|
||||||
m_log.info("AuthTokenConfig.getSetting()- Assigning default value " + value);
|
m_log.debug("AuthTokenConfig.getSetting()- Assigning default value " + value);
|
||||||
|
|
||||||
// Add the key to the map so that it can be found quicker next time
|
// Add the key to the map so that it can be found quicker next time
|
||||||
m_tokenSettingsMap.put(IdentityTokenType, m_defaultIdentityTokenTypeValue);
|
m_tokenSettingsMap.put(IdentityTokenType, m_defaultIdentityTokenTypeValue);
|
||||||
@ -243,8 +243,8 @@ public final class AuthTokenConfig
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_log.info("AuthTokenConfig.getSetting()- Found setting " + settingName);
|
m_log.debug("AuthTokenConfig.getSetting()- Found setting " + settingName);
|
||||||
m_log.info("AuthTokenConfig.getSetting()- Setting value = " + value);
|
m_log.debug("AuthTokenConfig.getSetting()- Setting value = " + value);
|
||||||
}
|
}
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
|
@ -101,7 +101,7 @@ public final class Authenticate implements RpcMethod
|
|||||||
{
|
{
|
||||||
if (mechanismFolder.isDirectory())
|
if (mechanismFolder.isDirectory())
|
||||||
{
|
{
|
||||||
m_log.debug("Authenticate.init()- Mechanism folder " + mechanismFolder + " is directory");
|
m_log.debug("init()- Mechanism folder " + mechanismFolder + " is directory");
|
||||||
|
|
||||||
// Try to obtain the mechanism settings
|
// Try to obtain the mechanism settings
|
||||||
try
|
try
|
||||||
@ -123,7 +123,7 @@ public final class Authenticate implements RpcMethod
|
|||||||
// ultimately instantiate objects from a class loaded by the same class loader that
|
// ultimately instantiate objects from a class loaded by the same class loader that
|
||||||
// loads the AuthMechanism class to avoid ClassCastExceptions.
|
// loads the AuthMechanism class to avoid ClassCastExceptions.
|
||||||
File mechClassPathFile = new File(svcConfig.getSetting(SvcConfig.AppRootPath) + relativePath);
|
File mechClassPathFile = new File(svcConfig.getSetting(SvcConfig.AppRootPath) + relativePath);
|
||||||
m_log.debug("Authenticate.init()- Mechanism path = " + mechClassPathFile);
|
m_log.debug("init()- Mechanism path = " + mechClassPathFile);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
URL methClassPathUrl = mechClassPathFile.toURL();
|
URL methClassPathUrl = mechClassPathFile.toURL();
|
||||||
@ -149,19 +149,19 @@ public final class Authenticate implements RpcMethod
|
|||||||
}
|
}
|
||||||
catch (MalformedURLException e)
|
catch (MalformedURLException e)
|
||||||
{
|
{
|
||||||
m_log.warn("Authenticate.init()- MalformedURLException for " + mechanismFolder + File.separator + m_mechanismSettingsFileName + " Exception=" + e.toString());
|
m_log.warn("init()- MalformedURLException for " + mechanismFolder + File.separator + m_mechanismSettingsFileName + " Exception=" + e.toString());
|
||||||
}
|
}
|
||||||
catch (ClassNotFoundException e)
|
catch (ClassNotFoundException e)
|
||||||
{
|
{
|
||||||
m_log.warn("Authenticate.init()- ClassNotFoundException for " + mechanismFolder + File.separator + m_mechanismSettingsFileName + " Exception=" + e.toString());
|
m_log.warn("init()- ClassNotFoundException for " + mechanismFolder + File.separator + m_mechanismSettingsFileName + " Exception=" + e.toString());
|
||||||
}
|
}
|
||||||
catch (InstantiationException e)
|
catch (InstantiationException e)
|
||||||
{
|
{
|
||||||
m_log.warn("Authenticate.init()- InstantiationException for " + mechanismFolder + File.separator + m_mechanismSettingsFileName + " Exception=" + e.toString());
|
m_log.warn("init()- InstantiationException for " + mechanismFolder + File.separator + m_mechanismSettingsFileName + " Exception=" + e.toString());
|
||||||
}
|
}
|
||||||
catch (IllegalAccessException e)
|
catch (IllegalAccessException e)
|
||||||
{
|
{
|
||||||
m_log.warn("Authenticate.init()- IllegalAccessException for " + mechanismFolder + File.separator + m_mechanismSettingsFileName + " Exception=" + e.toString());
|
m_log.warn("init()- IllegalAccessException for " + mechanismFolder + File.separator + m_mechanismSettingsFileName + " Exception=" + e.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -174,7 +174,7 @@ public final class Authenticate implements RpcMethod
|
|||||||
// ultimately instantiate objects from a class loaded by the same class loader that
|
// ultimately instantiate objects from a class loaded by the same class loader that
|
||||||
// loads the AuthMechanism class to avoid ClassCastExceptions.
|
// loads the AuthMechanism class to avoid ClassCastExceptions.
|
||||||
File mechClassPathFile = new File(classPath);
|
File mechClassPathFile = new File(classPath);
|
||||||
m_log.debug("Authenticate.init()- Mechanism path = " + mechClassPathFile);
|
m_log.debug("init()- Mechanism path = " + mechClassPathFile);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
URL methClassPathUrl = mechClassPathFile.toURL();
|
URL methClassPathUrl = mechClassPathFile.toURL();
|
||||||
@ -199,53 +199,53 @@ public final class Authenticate implements RpcMethod
|
|||||||
}
|
}
|
||||||
catch (MalformedURLException e)
|
catch (MalformedURLException e)
|
||||||
{
|
{
|
||||||
m_log.warn("Authenticate.init()- MalformedURLException for " + mechanismFolder + File.separator + m_mechanismSettingsFileName + " Exception=" + e.toString());
|
m_log.warn("init()- MalformedURLException for " + mechanismFolder + File.separator + m_mechanismSettingsFileName + " Exception=" + e.toString());
|
||||||
}
|
}
|
||||||
catch (ClassNotFoundException e)
|
catch (ClassNotFoundException e)
|
||||||
{
|
{
|
||||||
m_log.warn("Authenticate.init()- ClassNotFoundException for " + mechanismFolder + File.separator + m_mechanismSettingsFileName + " Exception=" + e.toString());
|
m_log.warn("init()- ClassNotFoundException for " + mechanismFolder + File.separator + m_mechanismSettingsFileName + " Exception=" + e.toString());
|
||||||
}
|
}
|
||||||
catch (InstantiationException e)
|
catch (InstantiationException e)
|
||||||
{
|
{
|
||||||
m_log.warn("Authenticate.init()- InstantiationException for " + mechanismFolder + File.separator + m_mechanismSettingsFileName + " Exception=" + e.toString());
|
m_log.warn("init()- InstantiationException for " + mechanismFolder + File.separator + m_mechanismSettingsFileName + " Exception=" + e.toString());
|
||||||
}
|
}
|
||||||
catch (IllegalAccessException e)
|
catch (IllegalAccessException e)
|
||||||
{
|
{
|
||||||
m_log.warn("Authenticate.init()- IllegalAccessException for " + mechanismFolder + File.separator + m_mechanismSettingsFileName + " Exception=" + e.toString());
|
m_log.warn("init()- IllegalAccessException for " + mechanismFolder + File.separator + m_mechanismSettingsFileName + " Exception=" + e.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_log.warn("Authenticate.init()- No configuration to find class path to load " + mechanismFolder + File.separator + m_mechanismSettingsFileName);
|
m_log.warn("init()- No configuration to find class path to load " + mechanismFolder + File.separator + m_mechanismSettingsFileName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_log.warn("Authenticate.init()- No configured mechanism class name for " + mechanismFolder + File.separator + m_mechanismSettingsFileName);
|
m_log.warn("init()- No configured mechanism class name for " + mechanismFolder + File.separator + m_mechanismSettingsFileName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (SecurityException e)
|
catch (SecurityException e)
|
||||||
{
|
{
|
||||||
m_log.warn("Authenticate.init()- SecurityException accessing " + mechanismFolder + File.separator + m_mechanismSettingsFileName + " Exception=" + e.toString());
|
m_log.warn("init()- SecurityException accessing " + mechanismFolder + File.separator + m_mechanismSettingsFileName + " Exception=" + e.toString());
|
||||||
}
|
}
|
||||||
catch (FileNotFoundException e)
|
catch (FileNotFoundException e)
|
||||||
{
|
{
|
||||||
m_log.warn("Authenticate.init()- No authentication policy file for " + mechanismFolder);
|
m_log.warn("init()- No authentication policy file for " + mechanismFolder);
|
||||||
}
|
}
|
||||||
catch (IOException e)
|
catch (IOException e)
|
||||||
{
|
{
|
||||||
m_log.warn("Authenticate.init()- IOException reading " + mechanismFolder + File.separator + m_mechanismSettingsFileName + " Exception=" + e.toString());
|
m_log.warn("init()- IOException reading " + mechanismFolder + File.separator + m_mechanismSettingsFileName + " Exception=" + e.toString());
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
m_log.warn("Authenticate.init()- Exception instantiating mechConfig or mechanism " + mechanismFolder + File.separator + m_mechanismSettingsFileName + " Exception=" + e.toString());
|
m_log.warn("init()- Exception instantiating mechConfig or mechanism " + mechanismFolder + File.separator + m_mechanismSettingsFileName + " Exception=" + e.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (SecurityException e)
|
catch (SecurityException e)
|
||||||
{
|
{
|
||||||
m_log.warn("Authenticate.init()- SecurityException accessing " + mechanismFolder + " Exception=" + e.toString());
|
m_log.warn("init()- SecurityException accessing " + mechanismFolder + " Exception=" + e.toString());
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
@ -300,12 +300,12 @@ public final class Authenticate implements RpcMethod
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_log.warn("Authenticate.init()- Unable to obtain mechanisms folder " + mechanismsConfigFolder + " objects");
|
m_log.warn("init()- Unable to obtain mechanisms folder " + mechanismsConfigFolder + " objects");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (SecurityException e)
|
catch (SecurityException e)
|
||||||
{
|
{
|
||||||
m_log.warn("Authenticate.init()- SecurityException accessing " + mechanismsConfigFolder + " Exception=" + e.toString());
|
m_log.warn("init()- SecurityException accessing " + mechanismsConfigFolder + " Exception=" + e.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -321,7 +321,7 @@ public final class Authenticate implements RpcMethod
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
m_log.debug("Authenticate.invoke()");
|
m_log.debug("invoke()");
|
||||||
|
|
||||||
// Parse the AuthReqMsg sent from the client
|
// Parse the AuthReqMsg sent from the client
|
||||||
authReqMsg = new AuthReqMsg(inStream);
|
authReqMsg = new AuthReqMsg(inStream);
|
||||||
@ -336,7 +336,7 @@ public final class Authenticate implements RpcMethod
|
|||||||
// Create response based on the identity resolution results
|
// Create response based on the identity resolution results
|
||||||
if (identId != null && identId.length() != 0)
|
if (identId != null && identId.length() != 0)
|
||||||
{
|
{
|
||||||
m_log.info("Authenticate.invoke()- identId resolved, " + identId);
|
m_log.info("invoke()- identId resolved, " + identId);
|
||||||
|
|
||||||
// An identity was resolved, get a SessionToken for it.
|
// An identity was resolved, get a SessionToken for it.
|
||||||
SessionToken sessionToken = new SessionToken(identId,
|
SessionToken sessionToken = new SessionToken(identId,
|
||||||
@ -355,7 +355,7 @@ public final class Authenticate implements RpcMethod
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_log.info("Authenticate.invoke()- identId not resolved");
|
m_log.info("invoke()- identId not resolved");
|
||||||
|
|
||||||
// Write out the response
|
// Write out the response
|
||||||
AuthRespMsg authRespMsg = new AuthRespMsg(ProtoDefs.httpUnauthorizedStatusMsg,
|
AuthRespMsg authRespMsg = new AuthRespMsg(ProtoDefs.httpUnauthorizedStatusMsg,
|
||||||
@ -365,7 +365,7 @@ public final class Authenticate implements RpcMethod
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_log.warn("Authenticate.invoke()- Unsupported mechanism " + authReqMsg.getMechanismId());
|
m_log.warn("invoke()- Unsupported mechanism " + authReqMsg.getMechanismId());
|
||||||
|
|
||||||
// Write out the response
|
// Write out the response
|
||||||
AuthRespMsg authRespMsg = new AuthRespMsg(ProtoDefs.httpNotFoundStatusMsg,
|
AuthRespMsg authRespMsg = new AuthRespMsg(ProtoDefs.httpNotFoundStatusMsg,
|
||||||
@ -375,7 +375,7 @@ public final class Authenticate implements RpcMethod
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
m_log.error("Authenticate.invoke()- Exception: " + e.toString());
|
m_log.error("invoke()- Exception: " + e.toString());
|
||||||
|
|
||||||
// Write out the response
|
// Write out the response
|
||||||
try
|
try
|
||||||
@ -386,7 +386,7 @@ public final class Authenticate implements RpcMethod
|
|||||||
}
|
}
|
||||||
catch (Exception e2)
|
catch (Exception e2)
|
||||||
{
|
{
|
||||||
m_log.error("Authenticate.invoke()- Exception trying to construct response msg: " + e2.toString());
|
m_log.error("invoke()- Exception trying to construct response msg: " + e2.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
|
@ -96,7 +96,7 @@ public final class EnabledSvcsConfig
|
|||||||
boolean enabledSvcsOnly) throws Exception
|
boolean enabledSvcsOnly) throws Exception
|
||||||
{
|
{
|
||||||
m_log.debug("EnabledSvcsConfig()-");
|
m_log.debug("EnabledSvcsConfig()-");
|
||||||
m_log.info("EnabledSvcsConfig()- SvcConfigPath = " + svcConfigPath);
|
m_log.debug("EnabledSvcsConfig()- SvcConfigPath = " + svcConfigPath);
|
||||||
|
|
||||||
// Remember the enabledSvcsOnly setting
|
// Remember the enabledSvcsOnly setting
|
||||||
m_enabledSvcsOnly = enabledSvcsOnly;
|
m_enabledSvcsOnly = enabledSvcsOnly;
|
||||||
@ -204,7 +204,7 @@ public final class EnabledSvcsConfig
|
|||||||
{
|
{
|
||||||
// Check if we are dealing with a file or a folder
|
// Check if we are dealing with a file or a folder
|
||||||
File serviceFolder = new File(hostFolder, hostFolderObjs[ii]);
|
File serviceFolder = new File(hostFolder, hostFolderObjs[ii]);
|
||||||
m_log.info("EnabledSvcsConfig()- Service folder " + serviceFolder);
|
m_log.debug("EnabledSvcsConfig()- Service folder " + serviceFolder);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (serviceFolder.isDirectory())
|
if (serviceFolder.isDirectory())
|
||||||
@ -285,7 +285,7 @@ public final class EnabledSvcsConfig
|
|||||||
(idenTokenConfig != null) ? idenTokenConfig : m_defaultIdenTokenConfig);
|
(idenTokenConfig != null) ? idenTokenConfig : m_defaultIdenTokenConfig);
|
||||||
|
|
||||||
// Add this entry to our map
|
// Add this entry to our map
|
||||||
m_log.info("EnabledSvcsConfig()- Adding entry in map for " + servicesConfigFolderObjs[i] + " " + hostFolderObjs[ii]);
|
m_log.debug("EnabledSvcsConfig()- Adding entry in map for " + servicesConfigFolderObjs[i] + " " + hostFolderObjs[ii]);
|
||||||
enabledSvcsConfigMap.put(hostFolderObjs[ii], svcConfigEntry);
|
enabledSvcsConfigMap.put(hostFolderObjs[ii], svcConfigEntry);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -305,7 +305,7 @@ public final class EnabledSvcsConfig
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_log.info("EnabledSvcsConfig()- No services configured for " + hostFolder);
|
m_log.debug("EnabledSvcsConfig()- No services configured for " + hostFolder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -100,7 +100,7 @@ public final class IdenTokenConfig
|
|||||||
// Process the specified attributes
|
// Process the specified attributes
|
||||||
if (m_tokenSettingsMap.containsKey(Attributes) == false)
|
if (m_tokenSettingsMap.containsKey(Attributes) == false)
|
||||||
{
|
{
|
||||||
m_log.info("IdenTokenConfig()- Attributes not configured, defaulting them.");
|
m_log.debug("IdenTokenConfig()- Attributes not configured, defaulting them.");
|
||||||
m_tokenSettingsMap.put(Attributes, m_defaultAttributesValue);
|
m_tokenSettingsMap.put(Attributes, m_defaultAttributesValue);
|
||||||
}
|
}
|
||||||
String attributes = m_tokenSettingsMap.get(Attributes);
|
String attributes = m_tokenSettingsMap.get(Attributes);
|
||||||
@ -154,14 +154,14 @@ public final class IdenTokenConfig
|
|||||||
String value = m_tokenSettingsMap.get(settingName);
|
String value = m_tokenSettingsMap.get(settingName);
|
||||||
if (value == null)
|
if (value == null)
|
||||||
{
|
{
|
||||||
m_log.info("IdenTokenConfig.getSetting()- Did not find setting " + settingName);
|
m_log.debug("IdenTokenConfig.getSetting()- Did not find setting " + settingName);
|
||||||
|
|
||||||
// The setting is not in our map, check if it is one to
|
// The setting is not in our map, check if it is one to
|
||||||
// which we have defaults.
|
// which we have defaults.
|
||||||
if (settingName.equalsIgnoreCase(EncryptAttributes))
|
if (settingName.equalsIgnoreCase(EncryptAttributes))
|
||||||
{
|
{
|
||||||
value = m_defaultEncryptAttributesValue;
|
value = m_defaultEncryptAttributesValue;
|
||||||
m_log.info("AuthTokenConfig.getSetting()- Assigning default value " + value);
|
m_log.debug("AuthTokenConfig.getSetting()- Assigning default value " + value);
|
||||||
|
|
||||||
// Add the key to the map so that it can be found quicker next time
|
// Add the key to the map so that it can be found quicker next time
|
||||||
m_tokenSettingsMap.put(EncryptAttributes, m_defaultEncryptAttributesValue);
|
m_tokenSettingsMap.put(EncryptAttributes, m_defaultEncryptAttributesValue);
|
||||||
@ -169,8 +169,8 @@ public final class IdenTokenConfig
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_log.info("IdenTokenConfig.getSetting()- Found setting " + settingName);
|
m_log.debug("IdenTokenConfig.getSetting()- Found setting " + settingName);
|
||||||
m_log.info("IdenTokenConfig.getSetting()- Setting value = " + value);
|
m_log.debug("IdenTokenConfig.getSetting()- Setting value = " + value);
|
||||||
}
|
}
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
|
@ -90,7 +90,7 @@ public final class SvcConfig
|
|||||||
{
|
{
|
||||||
m_log.debug("SvcConfig()-");
|
m_log.debug("SvcConfig()-");
|
||||||
|
|
||||||
m_log.info("SvcConfig()- SvcConfigPath = " + svcConfigPath);
|
m_log.debug("SvcConfig()- SvcConfigPath = " + svcConfigPath);
|
||||||
|
|
||||||
// Create a map to keep track of the service settings
|
// Create a map to keep track of the service settings
|
||||||
m_svcSettingsMap = new HashMap<String, String>();
|
m_svcSettingsMap = new HashMap<String, String>();
|
||||||
@ -122,8 +122,8 @@ public final class SvcConfig
|
|||||||
tokenLifetime = Integer.valueOf(getSetting(SessionTokenLifetime)).intValue();
|
tokenLifetime = Integer.valueOf(getSetting(SessionTokenLifetime)).intValue();
|
||||||
if (tokenLifetime < MinimumTokenLifetimeValue)
|
if (tokenLifetime < MinimumTokenLifetimeValue)
|
||||||
{
|
{
|
||||||
m_log.info("SvcConfig()- Configured token lifetime too small, defaulting to "
|
m_log.debug("SvcConfig()- Configured token lifetime too small, defaulting to "
|
||||||
+ Integer.toString(MinimumTokenLifetimeValue) + " seconds");
|
+ Integer.toString(MinimumTokenLifetimeValue) + " seconds");
|
||||||
tokenLifetime = MinimumTokenLifetimeValue;
|
tokenLifetime = MinimumTokenLifetimeValue;
|
||||||
|
|
||||||
// Update the map with the new value for the setting
|
// Update the map with the new value for the setting
|
||||||
@ -132,8 +132,8 @@ public final class SvcConfig
|
|||||||
}
|
}
|
||||||
catch (NumberFormatException e)
|
catch (NumberFormatException e)
|
||||||
{
|
{
|
||||||
m_log.info("SvcConfig()- Invalid configured token lifetime value, defaulting to "
|
m_log.debug("SvcConfig()- Invalid configured token lifetime value, defaulting to "
|
||||||
+ Integer.toString(MinimumTokenLifetimeValue) + " seconds");
|
+ Integer.toString(MinimumTokenLifetimeValue) + " seconds");
|
||||||
tokenLifetime = MinimumTokenLifetimeValue;
|
tokenLifetime = MinimumTokenLifetimeValue;
|
||||||
|
|
||||||
// Update the map with the new value for the setting
|
// Update the map with the new value for the setting
|
||||||
@ -146,8 +146,8 @@ public final class SvcConfig
|
|||||||
lifetimeShorter = Integer.valueOf(getSetting(LifetimeShorter)).intValue();
|
lifetimeShorter = Integer.valueOf(getSetting(LifetimeShorter)).intValue();
|
||||||
if (lifetimeShorter < MinimumLifetimeShorterValue)
|
if (lifetimeShorter < MinimumLifetimeShorterValue)
|
||||||
{
|
{
|
||||||
m_log.info("SvcConfig()- Configured lifetime shorter too small, defaulting to "
|
m_log.debug("SvcConfig()- Configured lifetime shorter too small, defaulting to "
|
||||||
+ Integer.toString(MinimumLifetimeShorterValue) + " seconds");
|
+ Integer.toString(MinimumLifetimeShorterValue) + " seconds");
|
||||||
lifetimeShorter = MinimumLifetimeShorterValue;
|
lifetimeShorter = MinimumLifetimeShorterValue;
|
||||||
|
|
||||||
// Update the map with the new value for the setting
|
// Update the map with the new value for the setting
|
||||||
@ -156,8 +156,8 @@ public final class SvcConfig
|
|||||||
}
|
}
|
||||||
catch (NumberFormatException e)
|
catch (NumberFormatException e)
|
||||||
{
|
{
|
||||||
m_log.info("SvcConfig()- Invalid configured lifetime shorter value, defaulting to "
|
m_log.debug("SvcConfig()- Invalid configured lifetime shorter value, defaulting to "
|
||||||
+ Integer.toString(MinimumLifetimeShorterValue) + " seconds");
|
+ Integer.toString(MinimumLifetimeShorterValue) + " seconds");
|
||||||
lifetimeShorter = MinimumLifetimeShorterValue;
|
lifetimeShorter = MinimumLifetimeShorterValue;
|
||||||
|
|
||||||
// Update the map with the new value for the setting
|
// Update the map with the new value for the setting
|
||||||
@ -167,8 +167,8 @@ public final class SvcConfig
|
|||||||
if (lifetimeShorter > tokenLifetime
|
if (lifetimeShorter > tokenLifetime
|
||||||
|| (tokenLifetime - lifetimeShorter) < MinimumLifetimeShorterDifferential)
|
|| (tokenLifetime - lifetimeShorter) < MinimumLifetimeShorterDifferential)
|
||||||
{
|
{
|
||||||
m_log.info("SvcConfig()- Invalid lifetime shorter value, defaulting to "
|
m_log.debug("SvcConfig()- Invalid lifetime shorter value, defaulting to "
|
||||||
+ Integer.toString(MinimumLifetimeShorterValue) + " seconds");
|
+ Integer.toString(MinimumLifetimeShorterValue) + " seconds");
|
||||||
|
|
||||||
// Update the map with the new value for the setting
|
// Update the map with the new value for the setting
|
||||||
m_svcSettingsMap.put(LifetimeShorter, Integer.toString(MinimumLifetimeShorterValue));
|
m_svcSettingsMap.put(LifetimeShorter, Integer.toString(MinimumLifetimeShorterValue));
|
||||||
@ -181,8 +181,8 @@ public final class SvcConfig
|
|||||||
if (reconfigureInterval != 0
|
if (reconfigureInterval != 0
|
||||||
&& reconfigureInterval < MinimumReconfigureIntervalValue)
|
&& reconfigureInterval < MinimumReconfigureIntervalValue)
|
||||||
{
|
{
|
||||||
m_log.info("SvcConfig()- Configured reconfigure interval too small, defaulting to "
|
m_log.debug("SvcConfig()- Configured reconfigure interval too small, defaulting to "
|
||||||
+ Integer.toString(MinimumReconfigureIntervalValue) + " seconds");
|
+ Integer.toString(MinimumReconfigureIntervalValue) + " seconds");
|
||||||
|
|
||||||
// Update the map with the new value for the setting
|
// Update the map with the new value for the setting
|
||||||
m_svcSettingsMap.put(ReconfigureInterval, Integer.toString(MinimumReconfigureIntervalValue));
|
m_svcSettingsMap.put(ReconfigureInterval, Integer.toString(MinimumReconfigureIntervalValue));
|
||||||
@ -190,8 +190,8 @@ public final class SvcConfig
|
|||||||
}
|
}
|
||||||
catch (NumberFormatException e)
|
catch (NumberFormatException e)
|
||||||
{
|
{
|
||||||
m_log.info("SvcConfig()- Invalid configured reconfigured interval value, defaulting to "
|
m_log.debug("SvcConfig()- Invalid configured reconfigured interval value, defaulting to "
|
||||||
+ Integer.toString(MinimumReconfigureIntervalValue) + " seconds");
|
+ Integer.toString(MinimumReconfigureIntervalValue) + " seconds");
|
||||||
|
|
||||||
// Update the map with the new value for the setting
|
// Update the map with the new value for the setting
|
||||||
m_svcSettingsMap.put(ReconfigureInterval, Integer.toString(MinimumReconfigureIntervalValue));
|
m_svcSettingsMap.put(ReconfigureInterval, Integer.toString(MinimumReconfigureIntervalValue));
|
||||||
@ -249,14 +249,14 @@ public final class SvcConfig
|
|||||||
String value = m_svcSettingsMap.get(settingName);
|
String value = m_svcSettingsMap.get(settingName);
|
||||||
if (value == null)
|
if (value == null)
|
||||||
{
|
{
|
||||||
m_log.info("SvcConfig.getSetting()- Did not find setting " + settingName);
|
m_log.debug("SvcConfig.getSetting()- Did not find setting " + settingName);
|
||||||
|
|
||||||
// The setting is not in our map, check if it is one to
|
// The setting is not in our map, check if it is one to
|
||||||
// which we have defaults.
|
// which we have defaults.
|
||||||
if (settingName.equalsIgnoreCase(SessionTokenLifetime))
|
if (settingName.equalsIgnoreCase(SessionTokenLifetime))
|
||||||
{
|
{
|
||||||
value = DefaultSessionTokenLifetimeValue;
|
value = DefaultSessionTokenLifetimeValue;
|
||||||
m_log.info("SvcConfig.getSetting()- Assigning default value " + value);
|
m_log.debug("SvcConfig.getSetting()- Assigning default value " + value);
|
||||||
|
|
||||||
// Add the key to the map so that it can be found quicker next time
|
// Add the key to the map so that it can be found quicker next time
|
||||||
m_svcSettingsMap.put(SessionTokenLifetime, DefaultSessionTokenLifetimeValue);
|
m_svcSettingsMap.put(SessionTokenLifetime, DefaultSessionTokenLifetimeValue);
|
||||||
@ -264,7 +264,7 @@ public final class SvcConfig
|
|||||||
else if (settingName.equalsIgnoreCase(LifetimeShorter))
|
else if (settingName.equalsIgnoreCase(LifetimeShorter))
|
||||||
{
|
{
|
||||||
value = DefaultLifetimeShorterValue;
|
value = DefaultLifetimeShorterValue;
|
||||||
m_log.info("SvcConfig.getSetting()- Assigning default value " + value);
|
m_log.debug("SvcConfig.getSetting()- Assigning default value " + value);
|
||||||
|
|
||||||
// Add the key to the map so that it can be found quicker next time
|
// Add the key to the map so that it can be found quicker next time
|
||||||
m_svcSettingsMap.put(LifetimeShorter, DefaultLifetimeShorterValue);
|
m_svcSettingsMap.put(LifetimeShorter, DefaultLifetimeShorterValue);
|
||||||
@ -272,7 +272,7 @@ public final class SvcConfig
|
|||||||
else if (settingName.equalsIgnoreCase(ReconfigureInterval))
|
else if (settingName.equalsIgnoreCase(ReconfigureInterval))
|
||||||
{
|
{
|
||||||
value = DefaultReconfigureIntervalValue;
|
value = DefaultReconfigureIntervalValue;
|
||||||
m_log.info("SvcConfig.getSetting()- Assigning default value " + value);
|
m_log.debug("SvcConfig.getSetting()- Assigning default value " + value);
|
||||||
|
|
||||||
// Add the key to the map so that it can be found quicker next time
|
// Add the key to the map so that it can be found quicker next time
|
||||||
m_svcSettingsMap.put(ReconfigureInterval, DefaultReconfigureIntervalValue);
|
m_svcSettingsMap.put(ReconfigureInterval, DefaultReconfigureIntervalValue);
|
||||||
@ -280,7 +280,7 @@ public final class SvcConfig
|
|||||||
else if (settingName.equalsIgnoreCase(SigningKeyAliasName))
|
else if (settingName.equalsIgnoreCase(SigningKeyAliasName))
|
||||||
{
|
{
|
||||||
value = DefaultSigningKeyAliasNameValue;
|
value = DefaultSigningKeyAliasNameValue;
|
||||||
m_log.info("SvcConfig.getSetting()- Assigning default value " + value);
|
m_log.debug("SvcConfig.getSetting()- Assigning default value " + value);
|
||||||
|
|
||||||
// Add the key to the map so that it can be found quicker next time
|
// Add the key to the map so that it can be found quicker next time
|
||||||
m_svcSettingsMap.put(SigningKeyAliasName, DefaultSigningKeyAliasNameValue);
|
m_svcSettingsMap.put(SigningKeyAliasName, DefaultSigningKeyAliasNameValue);
|
||||||
@ -288,21 +288,21 @@ public final class SvcConfig
|
|||||||
else if (settingName.equalsIgnoreCase(SigningKeyPassword))
|
else if (settingName.equalsIgnoreCase(SigningKeyPassword))
|
||||||
{
|
{
|
||||||
value = DefaultSigningKeyPasswordValue;
|
value = DefaultSigningKeyPasswordValue;
|
||||||
m_log.info("SvcConfig.getSetting()- Assigning default value " + value);
|
m_log.debug("SvcConfig.getSetting()- Assigning default value " + value);
|
||||||
|
|
||||||
// Add the key to the map so that it can be found quicker next time
|
// Add the key to the map so that it can be found quicker next time
|
||||||
m_svcSettingsMap.put(SigningKeyPassword, DefaultSigningKeyPasswordValue);
|
m_svcSettingsMap.put(SigningKeyPassword, DefaultSigningKeyPasswordValue);
|
||||||
}
|
}
|
||||||
else if (settingName.equalsIgnoreCase(IdentityAbstractionConfigFile))
|
else if (settingName.equalsIgnoreCase(IdentityAbstractionConfigFile))
|
||||||
{
|
{
|
||||||
m_log.info("SvcConfig.getSetting()- Mandatory setting " + IdentityAbstractionConfigFile + " not set");
|
m_log.debug("SvcConfig.getSetting()- Mandatory setting " + IdentityAbstractionConfigFile + " not set");
|
||||||
throw new Exception("Missing mandatory configuration setting");
|
throw new Exception("Missing mandatory configuration setting");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_log.info("SvcConfig.getSetting()- Found setting " + settingName);
|
m_log.debug("SvcConfig.getSetting()- Found setting " + settingName);
|
||||||
m_log.info("SvcConfig.getSetting()- Setting value = " + value);
|
m_log.debug("SvcConfig.getSetting()- Setting value = " + value);
|
||||||
}
|
}
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
|
@ -56,6 +56,7 @@ services that are CASA authentication enabled.
|
|||||||
Summary: Novell CASA Authentication Token JAAS Support Components
|
Summary: Novell CASA Authentication Token JAAS Support Components
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
Requires: jre >= 1.5.0
|
Requires: jre >= 1.5.0
|
||||||
|
Requires: log4j
|
||||||
|
|
||||||
%description -n CASA_auth_token_jaas_support
|
%description -n CASA_auth_token_jaas_support
|
||||||
CASA_auth_token is an authentication token infrastructure with support for
|
CASA_auth_token is an authentication token infrastructure with support for
|
||||||
@ -241,8 +242,6 @@ fi
|
|||||||
%stop_on_removal casa_atsd
|
%stop_on_removal casa_atsd
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
%stop_on_update casa_atsd
|
|
||||||
|
|
||||||
# Always undeploy our webapp to force re-deployment on upgrade cases
|
# Always undeploy our webapp to force re-deployment on upgrade cases
|
||||||
echo "Cleaning up webapp folders"
|
echo "Cleaning up webapp folders"
|
||||||
rm -drf /srv/www/casaats/webapps/CasaAuthTokenSvc
|
rm -drf /srv/www/casaats/webapps/CasaAuthTokenSvc
|
||||||
|
@ -26,7 +26,7 @@ Autoreqprov: on
|
|||||||
%define bldno @VERSION@
|
%define bldno @VERSION@
|
||||||
Version: @VERSION@
|
Version: @VERSION@
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Novell Common Authentication Services Adapter Authentication Token Infrastructure "Java" (CASA_auth_token)
|
Summary: Novell CASA Authentication Token Service
|
||||||
Source: %{name}-%{version}.tar.bz2
|
Source: %{name}-%{version}.tar.bz2
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
Requires: jre >= 1.5.0
|
Requires: jre >= 1.5.0
|
||||||
@ -37,40 +37,40 @@ PreReq: /usr/sbin/groupadd, /usr/sbin/useradd, /usr/sbin/userdel, /usr/bi
|
|||||||
BuildArchitectures: noarch
|
BuildArchitectures: noarch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
CASA_auth_token is an authentication token infrastructure with support for multiple
|
CASA_auth_token is an authentication token infrastructure with support for
|
||||||
authentication mechanisms with an emphasis on providing a scalable single
|
multiple authentication mechanisms with an emphasis on providing a scalable
|
||||||
sign-on solution.
|
single sign-on solution.
|
||||||
|
|
||||||
A key feature of CASA_auth_token is that its authentication tokens contain identity
|
A key feature of CASA_auth_token is that its authentication tokens contain
|
||||||
information about the entity being authenticated. This information is made available
|
identity information about the entity being authenticated. This information is
|
||||||
to the consuming services. The amount of information contained in the tokens is
|
made available to the consuming services. The amount of information contained in
|
||||||
configured on a per-service basis. Because of this feature, we say that CASA_auth_token
|
the tokens is configured on a per-service basis. Because of this feature, we say
|
||||||
projects an "Authenticated Identity".
|
that CASA_auth_token projects an "Authenticated Identity".
|
||||||
|
|
||||||
The CASA_auth_token_svc is the infrastructure component responsible for authenticating
|
The CASA_auth_token_svc is the infrastructure component responsible for
|
||||||
entities using the native authentication mechanism and for issuing tokens that can later
|
authenticating entities using the native authentication mechanism and for issuing
|
||||||
be used by applications to authenticate the entity o services that are CASA authentication
|
tokens that can later be used by applications to authenticate the entity or
|
||||||
enabled.
|
services that are CASA authentication enabled.
|
||||||
|
|
||||||
%package -n CASA_auth_token_jaas_support
|
%package -n CASA_auth_token_jaas_support
|
||||||
Summary: Libraries needed for JAAS applications development.
|
Summary: Novell CASA Authentication Token JAAS Support Components
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
Requires: jre >= 1.5.0 CASA_auth_token_svc jdk novell-zenworks-java-links
|
Requires: jre >= 1.5.0 CASA_auth_token_svc jdk novell-zenworks-java-links log4j
|
||||||
|
|
||||||
%description -n CASA_auth_token_jaas_support
|
%description -n CASA_auth_token_jaas_support
|
||||||
CASA_auth_token is an authentication token infrastructure with support for multiple
|
CASA_auth_token is an authentication token infrastructure with support for
|
||||||
authentication mechanisms with an emphasis on providing a scalable single
|
multiple authentication mechanisms with an emphasis on providing a scalable
|
||||||
sign-on solution.
|
single sign-on solution.
|
||||||
|
|
||||||
A key feature of CASA_auth_token is that its authentication tokens contain identity
|
A key feature of CASA_auth_token is that its authentication tokens contain
|
||||||
information about the entity being authenticated. This information is made available
|
identity information about the entity being authenticated. This information is
|
||||||
to the consuming services. The amount of information contained in the tokens is
|
made available to the consuming services. The amount of information contained in
|
||||||
configured on a per-service basis. Because of this feature, we say that CASA_auth_token
|
the tokens is configured on a per-service basis. Because of this feature, we say
|
||||||
projects an "Authenticated Identity".
|
that CASA_auth_token projects an "Authenticated Identity".
|
||||||
|
|
||||||
The CASA_auth_token_jaas_support package contains the CASA (Common Authentication
|
The CASA_auth_token_jaas_support package contains the CASA (Common Authentication
|
||||||
Services Adapter) authentication token infrastructure JAAS module and supporting libraries
|
Services Adapter) authentication token infrastructure JAAS module and supporting
|
||||||
for token verification.
|
libraries for token verification.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
@ -242,16 +242,14 @@ fi
|
|||||||
|
|
||||||
%postun
|
%postun
|
||||||
# Always undeploy our webapp to force re-deployment on upgrade cases
|
# Always undeploy our webapp to force re-deployment on upgrade cases
|
||||||
|
echo "Cleaning up webapp folders"
|
||||||
rm -drf /srv/www/casaats/webapps/CasaAuthTokenSvc
|
rm -drf /srv/www/casaats/webapps/CasaAuthTokenSvc
|
||||||
|
rm -drf /srv/www/casaats/work/Catalina
|
||||||
|
rm -f /srv/www/casaats/conf/server.xml
|
||||||
|
|
||||||
%restart_on_update casa_atsd
|
%restart_on_update casa_atsd
|
||||||
%insserv_cleanup
|
%insserv_cleanup
|
||||||
|
|
||||||
# Do not do anything else if this is an upgrade
|
|
||||||
if test "$1" == 1; then
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
|
Loading…
Reference in New Issue
Block a user