Continuation of changes to start using log4j.
This commit is contained in:
parent
5a41aba791
commit
1d3f1b039a
@ -35,7 +35,8 @@ EXTRA_DIST = CasaAuthtokenSvcD \
|
|||||||
CasaAuthPolicyEditor.sh \
|
CasaAuthPolicyEditor.sh \
|
||||||
CasaAuthTokenSettingsEditor.sh \
|
CasaAuthTokenSettingsEditor.sh \
|
||||||
CasaIdenTokenSettingsEditor.sh \
|
CasaIdenTokenSettingsEditor.sh \
|
||||||
CasaSvcSettingsEditor.sh
|
CasaSvcSettingsEditor.sh \
|
||||||
|
log4j.properties
|
||||||
|
|
||||||
ROOT = ../..
|
ROOT = ../..
|
||||||
|
|
||||||
@ -129,7 +130,7 @@ CLASSES = $(addprefix $(BUILDDIR)/, $(JAVAFILES:%.java=%.class))
|
|||||||
AXIS_LIBS = $(AXIS_JARS_DIR)/axis.jar:$(AXIS_JARS_DIR)/saaj.jar:$(AXIS_JARS_DIR)/wss4j-1.5.0.jar:$(AXIS_JARS_DIR)/xmlsec-1.2.1.jar
|
AXIS_LIBS = $(AXIS_JARS_DIR)/axis.jar:$(AXIS_JARS_DIR)/saaj.jar:$(AXIS_JARS_DIR)/wss4j-1.5.0.jar:$(AXIS_JARS_DIR)/xmlsec-1.2.1.jar
|
||||||
#AXIS_LIBS = $(AXIS_JARS_DIR)/wss4j-1.5.0.jar
|
#AXIS_LIBS = $(AXIS_JARS_DIR)/wss4j-1.5.0.jar
|
||||||
|
|
||||||
LIBS = /usr/share/java/servletapi5.jar:/usr/share/java/xerces-j2.jar
|
LIBS = /usr/share/java/servletapi5.jar:/usr/share/java/xerces-j2.jar:/usr/share/java/log4j.jar
|
||||||
CLASSPATH = $(AXIS_LIBS):$(IDENT_ABSTRACTION_DIR)/identity-abstraction.jar:$(IDENT_ABSTRACTION_DIR)/bandit-util.jar:$(IDENT_ABSTRACTION_DIR)/castor-1.0.4.jar:$(LIBS)
|
CLASSPATH = $(AXIS_LIBS):$(IDENT_ABSTRACTION_DIR)/identity-abstraction.jar:$(IDENT_ABSTRACTION_DIR)/bandit-util.jar:$(IDENT_ABSTRACTION_DIR)/castor-1.0.4.jar:$(LIBS)
|
||||||
|
|
||||||
CUR_DIR := $(shell pwd)
|
CUR_DIR := $(shell pwd)
|
||||||
|
@ -18,6 +18,6 @@ JAVA_HOME="/usr/$LIB/jvm/jre-1.5.0"
|
|||||||
CATALINA_BASE="/srv/www/casaats"
|
CATALINA_BASE="/srv/www/casaats"
|
||||||
CATALINA_HOME="/usr/share/tomcat5"
|
CATALINA_HOME="/usr/share/tomcat5"
|
||||||
CATALINA_PID="/var/lib/CASA/authtoken/svc/casaatsd.pid"
|
CATALINA_PID="/var/lib/CASA/authtoken/svc/casaatsd.pid"
|
||||||
JAVA_OPTS="-Dcom.novell.casa.authtoksvc.config=/etc/CASA/authtoken/svc"
|
JAVA_OPTS="-Dcom.novell.casa.authtoksvc.config=/etc/CASA/authtoken/svc -Dlog4j.configuration=file:/etc/CASA/authtoken/svc/log4j.properties"
|
||||||
export CATALINA_BASE CATALINA_HOME CATALINA_PID JAVA_HOME JAVA_OPTS
|
export CATALINA_BASE CATALINA_HOME CATALINA_PID JAVA_HOME JAVA_OPTS
|
||||||
|
|
||||||
|
@ -12,6 +12,6 @@ JAVA_HOME="/opt/novell/zenworks/share/java"
|
|||||||
CATALINA_BASE="/srv/www/casaats"
|
CATALINA_BASE="/srv/www/casaats"
|
||||||
CATALINA_HOME="/opt/novell/zenworks/share/tomcat"
|
CATALINA_HOME="/opt/novell/zenworks/share/tomcat"
|
||||||
CATALINA_PID="/var/lib/CASA/authtoken/svc/casaatsd.pid"
|
CATALINA_PID="/var/lib/CASA/authtoken/svc/casaatsd.pid"
|
||||||
JAVA_OPTS="-Dcom.novell.casa.authtoksvc.config=/etc/CASA/authtoken/svc"
|
JAVA_OPTS="-Dcom.novell.casa.authtoksvc.config=/etc/CASA/authtoken/svc -Dlog4j.configuration=file:/etc/CASA/authtoken/svc/log4j.properties"
|
||||||
export CATALINA_BASE CATALINA_HOME CATALINA_PID JAVA_HOME JAVA_OPTS
|
export CATALINA_BASE CATALINA_HOME CATALINA_PID JAVA_HOME JAVA_OPTS
|
||||||
|
|
||||||
|
20
CASA-auth-token/server-java/Svc/linux/log4j.properties
Normal file
20
CASA-auth-token/server-java/Svc/linux/log4j.properties
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
########################################################
|
||||||
|
#
|
||||||
|
# log4j properties
|
||||||
|
#
|
||||||
|
########################################################
|
||||||
|
|
||||||
|
#
|
||||||
|
# Root logger configuration.
|
||||||
|
#
|
||||||
|
log4j.rootLogger=debug, DefaultAppender
|
||||||
|
|
||||||
|
#
|
||||||
|
# DefaultAppender configuration.
|
||||||
|
#
|
||||||
|
log4j.appender.DefaultAppender=org.apache.log4j.RollingFileAppender
|
||||||
|
log4j.appender.DefaultAppender.File=/srv/www/casaats/logs/ats.log
|
||||||
|
log4j.appender.DefaultAppender.MaxFileSize=100KB
|
||||||
|
log4j.appender.DefaultAppender.MaxBackupIndex=2
|
||||||
|
log4j.appender.DefaultAppender.layout=org.apache.log4j.PatternLayout
|
||||||
|
log4j.appender.DefaultAppender.layout.ConversionPattern=%d{ISO8601} %p %C{2} %m%n
|
@ -56,7 +56,7 @@ import org.apache.log4j.Logger;
|
|||||||
*/
|
*/
|
||||||
public final class Krb5Authenticate implements AuthMechanism, Serializable
|
public final class Krb5Authenticate implements AuthMechanism, Serializable
|
||||||
{
|
{
|
||||||
private static final Logger m_log = Logger.getLogger(Krb5Authenticate.class);
|
private static Logger m_log = null;
|
||||||
|
|
||||||
private SvcConfig m_svcConfig;
|
private SvcConfig m_svcConfig;
|
||||||
private AuthMechConfig m_mechConfig;
|
private AuthMechConfig m_mechConfig;
|
||||||
@ -144,6 +144,8 @@ public final class Krb5Authenticate implements AuthMechanism, Serializable
|
|||||||
m_svcConfig = svcConfig;
|
m_svcConfig = svcConfig;
|
||||||
m_mechConfig = mechConfig;
|
m_mechConfig = mechConfig;
|
||||||
|
|
||||||
|
m_log = Logger.getLogger(Krb5Authenticate.class);
|
||||||
|
|
||||||
String servicePrincipal = mechConfig.getSetting(AuthMechConfig.Krb5ServicePrincipalName);
|
String servicePrincipal = mechConfig.getSetting(AuthMechConfig.Krb5ServicePrincipalName);
|
||||||
if (servicePrincipal != null)
|
if (servicePrincipal != null)
|
||||||
{
|
{
|
||||||
|
@ -53,7 +53,7 @@ import org.apache.log4j.Logger;
|
|||||||
*/
|
*/
|
||||||
public final class PwdAuthenticate implements AuthMechanism, Serializable
|
public final class PwdAuthenticate implements AuthMechanism, Serializable
|
||||||
{
|
{
|
||||||
private static final Logger m_log = Logger.getLogger(PwdAuthenticate.class);
|
private static Logger m_log = null;
|
||||||
|
|
||||||
private SvcConfig m_svcConfig;
|
private SvcConfig m_svcConfig;
|
||||||
private AuthMechConfig m_mechConfig;
|
private AuthMechConfig m_mechConfig;
|
||||||
@ -159,6 +159,7 @@ public final class PwdAuthenticate implements AuthMechanism, Serializable
|
|||||||
{
|
{
|
||||||
m_svcConfig = svcConfig;
|
m_svcConfig = svcConfig;
|
||||||
m_mechConfig = mechConfig;
|
m_mechConfig = mechConfig;
|
||||||
|
m_log = Logger.getLogger(PwdAuthenticate.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
Name: @PACKAGE@
|
Name: @PACKAGE@
|
||||||
URL: http://www.novell.com/products
|
URL: http://www.novell.com/products
|
||||||
BuildRequires: gcc-c++ glib2-devel identity-abstraction insserv libstdc++ libstdc++-devel mono-devel pkgconfig servletapi5 sysvinit xerces-j2 xml-commons-apis
|
BuildRequires: gcc-c++ glib2-devel identity-abstraction insserv libstdc++ libstdc++-devel mono-devel pkgconfig servletapi5 sysvinit xerces-j2 xml-commons-apis
|
||||||
BuildRequires: java-sdk-1.5.0 update-alternatives
|
BuildRequires: java-sdk-1.5.0 update-alternatives log4j
|
||||||
%define prefix /usr
|
%define prefix /usr
|
||||||
License: LGPL
|
License: LGPL
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
@ -30,7 +30,7 @@ Summary: Novell Common Authentication Services Adapter Authentication Toke
|
|||||||
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
|
||||||
Requires: servletapi5 tomcat5 sysvinit insserv identity-abstraction sed
|
Requires: servletapi5 tomcat5 sysvinit insserv identity-abstraction sed log4j
|
||||||
PreReq: %fillup_prereq %insserv_prereq
|
PreReq: %fillup_prereq %insserv_prereq
|
||||||
PreReq: /usr/bin/awk, /usr/bin/test, /bin/grep, /bin/cat, /usr/bin/install, /bin/pwd
|
PreReq: /usr/bin/awk, /usr/bin/test, /bin/grep, /bin/cat, /usr/bin/install, /bin/pwd
|
||||||
PreReq: /usr/sbin/groupadd, /usr/sbin/useradd, /usr/sbin/userdel, /usr/bin/getent
|
PreReq: /usr/sbin/groupadd, /usr/sbin/useradd, /usr/sbin/userdel, /usr/bin/getent
|
||||||
@ -161,6 +161,8 @@ install -m 600 Svc/templates/authtoken.settings %{buildroot}/etc/CASA/authtoken/
|
|||||||
install -m 600 Svc/templates/identoken.settings %{buildroot}/etc/CASA/authtoken/svc/identoken.settings
|
install -m 600 Svc/templates/identoken.settings %{buildroot}/etc/CASA/authtoken/svc/identoken.settings
|
||||||
install -m 600 Svc/src/com/novell/casa/authtoksvc/Krb5_mechanism.settings %{buildroot}/etc/CASA/authtoken/svc/auth_mechanisms/Krb5Authenticate/mechanism.settings
|
install -m 600 Svc/src/com/novell/casa/authtoksvc/Krb5_mechanism.settings %{buildroot}/etc/CASA/authtoken/svc/auth_mechanisms/Krb5Authenticate/mechanism.settings
|
||||||
install -m 600 Svc/src/com/novell/casa/authtoksvc/Pwd_mechanism.settings %{buildroot}/etc/CASA/authtoken/svc/auth_mechanisms/PwdAuthenticate/mechanism.settings
|
install -m 600 Svc/src/com/novell/casa/authtoksvc/Pwd_mechanism.settings %{buildroot}/etc/CASA/authtoken/svc/auth_mechanisms/PwdAuthenticate/mechanism.settings
|
||||||
|
install -m 700 Svc/linux/envvars %{buildroot}/etc/CASA/authtoken/svc/envvars
|
||||||
|
install -m 700 Svc/linux/log4j.properties %{buildroot}/etc/CASA/authtoken/svc/log4j.properties
|
||||||
|
|
||||||
# Others
|
# Others
|
||||||
install -m 700 Svc/linux/server_keystore_setup.sh %{buildroot}%{prefix}/share/java/CASA/authtoken/bin/server_keystore_setup.sh
|
install -m 700 Svc/linux/server_keystore_setup.sh %{buildroot}%{prefix}/share/java/CASA/authtoken/bin/server_keystore_setup.sh
|
||||||
@ -170,7 +172,6 @@ install -m 700 Svc/linux/CasaAuthTokenSettingsEditor.sh %{buildroot}%{prefix}/sh
|
|||||||
install -m 700 Svc/linux/CasaIdenTokenSettingsEditor.sh %{buildroot}%{prefix}/share/java/CASA/authtoken/bin/CasaIdenTokenSettingsEditor.sh
|
install -m 700 Svc/linux/CasaIdenTokenSettingsEditor.sh %{buildroot}%{prefix}/share/java/CASA/authtoken/bin/CasaIdenTokenSettingsEditor.sh
|
||||||
install -m 700 Svc/linux/CasaSvcSettingsEditor.sh %{buildroot}%{prefix}/share/java/CASA/authtoken/bin/CasaSvcSettingsEditor.sh
|
install -m 700 Svc/linux/CasaSvcSettingsEditor.sh %{buildroot}%{prefix}/share/java/CASA/authtoken/bin/CasaSvcSettingsEditor.sh
|
||||||
install -m 755 Svc/linux/CasaAuthtokenSvcD %{buildroot}/etc/init.d/casa_atsd
|
install -m 755 Svc/linux/CasaAuthtokenSvcD %{buildroot}/etc/init.d/casa_atsd
|
||||||
install -m 700 Svc/linux/envvars %{buildroot}/etc/CASA/authtoken/svc/envvars
|
|
||||||
|
|
||||||
# Tomcat Base files
|
# Tomcat Base files
|
||||||
install -m 600 Svc/tomcat5/conf/catalina.policy %{buildroot}/srv/www/casaats/conf/catalina.policy
|
install -m 600 Svc/tomcat5/conf/catalina.policy %{buildroot}/srv/www/casaats/conf/catalina.policy
|
||||||
@ -240,7 +241,10 @@ 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"
|
||||||
rm -drf /srv/www/casaats/webapps/CasaAuthTokenSvc
|
rm -drf /srv/www/casaats/webapps/CasaAuthTokenSvc
|
||||||
rm -drf /srv/www/casaats/work/Catalina
|
rm -drf /srv/www/casaats/work/Catalina
|
||||||
rm -f /srv/www/casaats/conf/server.xml
|
rm -f /srv/www/casaats/conf/server.xml
|
||||||
@ -311,6 +315,7 @@ fi
|
|||||||
%config /srv/www/casaats/conf/tomcat-users.xml
|
%config /srv/www/casaats/conf/tomcat-users.xml
|
||||||
%config /srv/www/casaats/conf/web.xml
|
%config /srv/www/casaats/conf/web.xml
|
||||||
%config /etc/CASA/authtoken/svc/envvars
|
%config /etc/CASA/authtoken/svc/envvars
|
||||||
|
%config /etc/CASA/authtoken/svc/log4j.properties
|
||||||
/etc/CASA/authtoken/svc/templates/svc.settings
|
/etc/CASA/authtoken/svc/templates/svc.settings
|
||||||
/etc/CASA/authtoken/svc/templates/auth.policy
|
/etc/CASA/authtoken/svc/templates/auth.policy
|
||||||
/etc/CASA/authtoken/svc/templates/iaRealms.xml
|
/etc/CASA/authtoken/svc/templates/iaRealms.xml
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
Name: @PACKAGE@
|
Name: @PACKAGE@
|
||||||
URL: http://www.novell.com/products
|
URL: http://www.novell.com/products
|
||||||
BuildRequires: gcc-c++ glib2-devel identity-abstraction insserv libstdc++ libstdc++-devel mono-devel pkgconfig servletapi5 sysvinit xerces-j2 jdk novell-zenworks-java-links
|
BuildRequires: gcc-c++ glib2-devel identity-abstraction insserv libstdc++ libstdc++-devel mono-devel pkgconfig servletapi5 sysvinit xerces-j2 jdk novell-zenworks-java-links
|
||||||
BuildRequires: java-sdk-1.5.0 update-alternatives
|
BuildRequires: java-sdk-1.5.0 update-alternatives log4j
|
||||||
%define prefix /usr
|
%define prefix /usr
|
||||||
License: LGPL
|
License: LGPL
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
@ -30,7 +30,7 @@ Summary: Novell Common Authentication Services Adapter Authentication Toke
|
|||||||
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
|
||||||
Requires: novell-zenworks-tomcat sysvinit insserv identity-abstraction sed jdk novell-zenworks-java-links
|
Requires: novell-zenworks-tomcat sysvinit insserv identity-abstraction sed jdk novell-zenworks-java-links log4j
|
||||||
PreReq: %fillup_prereq %insserv_prereq
|
PreReq: %fillup_prereq %insserv_prereq
|
||||||
PreReq: /usr/bin/awk, /usr/bin/test, /bin/grep, /bin/cat, /usr/bin/install, /bin/pwd
|
PreReq: /usr/bin/awk, /usr/bin/test, /bin/grep, /bin/cat, /usr/bin/install, /bin/pwd
|
||||||
PreReq: /usr/sbin/groupadd, /usr/sbin/useradd, /usr/sbin/userdel, /usr/bin/getent
|
PreReq: /usr/sbin/groupadd, /usr/sbin/useradd, /usr/sbin/userdel, /usr/bin/getent
|
||||||
@ -161,6 +161,8 @@ install -m 600 Svc/templates/authtoken.settings %{buildroot}/etc/CASA/authtoken/
|
|||||||
install -m 600 Svc/templates/identoken.settings %{buildroot}/etc/CASA/authtoken/svc/identoken.settings
|
install -m 600 Svc/templates/identoken.settings %{buildroot}/etc/CASA/authtoken/svc/identoken.settings
|
||||||
install -m 600 Svc/src/com/novell/casa/authtoksvc/Krb5_mechanism.settings %{buildroot}/etc/CASA/authtoken/svc/auth_mechanisms/Krb5Authenticate/mechanism.settings
|
install -m 600 Svc/src/com/novell/casa/authtoksvc/Krb5_mechanism.settings %{buildroot}/etc/CASA/authtoken/svc/auth_mechanisms/Krb5Authenticate/mechanism.settings
|
||||||
install -m 600 Svc/src/com/novell/casa/authtoksvc/Pwd_mechanism.settings %{buildroot}/etc/CASA/authtoken/svc/auth_mechanisms/PwdAuthenticate/mechanism.settings
|
install -m 600 Svc/src/com/novell/casa/authtoksvc/Pwd_mechanism.settings %{buildroot}/etc/CASA/authtoken/svc/auth_mechanisms/PwdAuthenticate/mechanism.settings
|
||||||
|
install -m 700 Svc/linux/envvars.zen %{buildroot}/etc/CASA/authtoken/svc/envvars
|
||||||
|
install -m 700 Svc/linux/log4j.properties %{buildroot}/etc/CASA/authtoken/svc/log4j.properties
|
||||||
|
|
||||||
# Others
|
# Others
|
||||||
install -m 700 Svc/linux/server_keystore_setup.sh %{buildroot}%{prefix}/share/java/CASA/authtoken/bin/server_keystore_setup.sh
|
install -m 700 Svc/linux/server_keystore_setup.sh %{buildroot}%{prefix}/share/java/CASA/authtoken/bin/server_keystore_setup.sh
|
||||||
@ -170,7 +172,6 @@ install -m 700 Svc/linux/CasaAuthTokenSettingsEditor.sh %{buildroot}%{prefix}/sh
|
|||||||
install -m 700 Svc/linux/CasaIdenTokenSettingsEditor.sh %{buildroot}%{prefix}/share/java/CASA/authtoken/bin/CasaIdenTokenSettingsEditor.sh
|
install -m 700 Svc/linux/CasaIdenTokenSettingsEditor.sh %{buildroot}%{prefix}/share/java/CASA/authtoken/bin/CasaIdenTokenSettingsEditor.sh
|
||||||
install -m 700 Svc/linux/CasaSvcSettingsEditor.sh %{buildroot}%{prefix}/share/java/CASA/authtoken/bin/CasaSvcSettingsEditor.sh
|
install -m 700 Svc/linux/CasaSvcSettingsEditor.sh %{buildroot}%{prefix}/share/java/CASA/authtoken/bin/CasaSvcSettingsEditor.sh
|
||||||
install -m 755 Svc/linux/CasaAuthtokenSvcD %{buildroot}/etc/init.d/casa_atsd
|
install -m 755 Svc/linux/CasaAuthtokenSvcD %{buildroot}/etc/init.d/casa_atsd
|
||||||
install -m 700 Svc/linux/envvars.zen %{buildroot}/etc/CASA/authtoken/svc/envvars
|
|
||||||
|
|
||||||
# Tomcat Base files
|
# Tomcat Base files
|
||||||
install -m 600 Svc/tomcat5/conf/catalina.policy %{buildroot}/srv/www/casaats/conf/catalina.policy
|
install -m 600 Svc/tomcat5/conf/catalina.policy %{buildroot}/srv/www/casaats/conf/catalina.policy
|
||||||
@ -309,6 +310,7 @@ fi
|
|||||||
%config /srv/www/casaats/conf/tomcat-users.xml
|
%config /srv/www/casaats/conf/tomcat-users.xml
|
||||||
%config /srv/www/casaats/conf/web.xml
|
%config /srv/www/casaats/conf/web.xml
|
||||||
%config /etc/CASA/authtoken/svc/envvars
|
%config /etc/CASA/authtoken/svc/envvars
|
||||||
|
%config /etc/CASA/authtoken/svc/log4j.properties
|
||||||
/etc/CASA/authtoken/svc/templates/svc.settings
|
/etc/CASA/authtoken/svc/templates/svc.settings
|
||||||
/etc/CASA/authtoken/svc/templates/auth.policy
|
/etc/CASA/authtoken/svc/templates/auth.policy
|
||||||
/etc/CASA/authtoken/svc/templates/iaRealms.xml
|
/etc/CASA/authtoken/svc/templates/iaRealms.xml
|
||||||
|
Loading…
Reference in New Issue
Block a user