From 826b389d44a81853f262dfeb5fffd5d1737ea8ad Mon Sep 17 00:00:00 2001 From: Juan Carlos Luciani Date: Tue, 7 Nov 2006 05:51:28 +0000 Subject: [PATCH] Enabled the ATS communications over SSL. Created tools for editing settings and policy files. --- CASA-auth-token/java/configure.in | 2 + .../package/linux/CASA_auth_token_svc.changes | 6 ++ .../package/linux/CASA_auth_token_svc.spec.in | 32 ++++++++- CASA-auth-token/java/server/Svc/Makefile.am | 65 +++++++++++++++---- CASA-auth-token/java/server/Svc/README | 2 +- .../server/Svc/linux/CasaAuthPolicyEditor.sh | 3 + .../Svc/linux/CasaAuthTokenSettingsEditor.sh | 3 + .../java/server/Svc/linux/CasaAuthtokenSvcD | 10 ++- .../Svc/linux/CasaIdenTokenSettingsEditor.sh | 3 + .../server/Svc/linux/CasaSvcSettingsEditor.sh | 3 + .../java/server/Svc/linux/Makefile.am | 7 +- .../java/server/Svc/{ => linux}/svc.settings | 0 .../server/Svc/manifest/AuthPolicyEditor.txt | 2 + .../Svc/manifest/AuthTokenSettingsEditor.txt | 2 + .../Svc/manifest/IdenTokenSettingsEditor.txt | 2 + .../java/server/Svc/manifest/Makefile.am | 40 ++++++++++++ .../server/Svc/manifest/SvcSettingsEditor.txt | 2 + .../authtoksvc/AuthTokenSettingsEditor.java | 2 +- .../authtoksvc/IdenTokenSettingsEditor.java | 2 +- .../casa/authtoksvc/SvcSettingsEditor.java | 18 ++--- .../java/server/Svc/tomcat5/conf/Makefile.am | 2 +- .../server/Svc/tomcat5/conf/linux/Makefile.am | 38 +++++++++++ 22 files changed, 216 insertions(+), 30 deletions(-) create mode 100755 CASA-auth-token/java/server/Svc/linux/CasaAuthPolicyEditor.sh create mode 100755 CASA-auth-token/java/server/Svc/linux/CasaAuthTokenSettingsEditor.sh create mode 100755 CASA-auth-token/java/server/Svc/linux/CasaIdenTokenSettingsEditor.sh create mode 100755 CASA-auth-token/java/server/Svc/linux/CasaSvcSettingsEditor.sh rename CASA-auth-token/java/server/Svc/{ => linux}/svc.settings (100%) create mode 100644 CASA-auth-token/java/server/Svc/manifest/AuthPolicyEditor.txt create mode 100644 CASA-auth-token/java/server/Svc/manifest/AuthTokenSettingsEditor.txt create mode 100644 CASA-auth-token/java/server/Svc/manifest/IdenTokenSettingsEditor.txt create mode 100644 CASA-auth-token/java/server/Svc/manifest/Makefile.am create mode 100644 CASA-auth-token/java/server/Svc/manifest/SvcSettingsEditor.txt create mode 100644 CASA-auth-token/java/server/Svc/tomcat5/conf/linux/Makefile.am diff --git a/CASA-auth-token/java/configure.in b/CASA-auth-token/java/configure.in index 53a1c85e..cc99ae63 100644 --- a/CASA-auth-token/java/configure.in +++ b/CASA-auth-token/java/configure.in @@ -277,7 +277,9 @@ server/Svc/tomcat5/Makefile server/Svc/tomcat5/conf/Makefile server/Svc/tomcat5/conf/Catalina/Makefile server/Svc/tomcat5/conf/Catalina/localhost/Makefile +server/Svc/tomcat5/conf/linux/Makefile server/Svc/linux/Makefile +server/Svc/manifest/Makefile server/Jaas/Makefile server/Jaas/src/Makefile server/Jaas/src/com/Makefile diff --git a/CASA-auth-token/java/package/linux/CASA_auth_token_svc.changes b/CASA-auth-token/java/package/linux/CASA_auth_token_svc.changes index 36066cfb..7312c9d7 100644 --- a/CASA-auth-token/java/package/linux/CASA_auth_token_svc.changes +++ b/CASA-auth-token/java/package/linux/CASA_auth_token_svc.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Nov 7 10:42:24 MST 2006 - jluciani@novell.com + +- The service is now only accessible via SSL. +- Created tools for editing settings and policy files. + ------------------------------------------------------------------- Fri Oct 20 09:53:55 MDT 2006 - jluciani@novell.com diff --git a/CASA-auth-token/java/package/linux/CASA_auth_token_svc.spec.in b/CASA-auth-token/java/package/linux/CASA_auth_token_svc.spec.in index 34b97181..a6dfb831 100644 --- a/CASA-auth-token/java/package/linux/CASA_auth_token_svc.spec.in +++ b/CASA-auth-token/java/package/linux/CASA_auth_token_svc.spec.in @@ -137,12 +137,20 @@ install -d -m 755 %{buildroot}/etc/CASA/authtoken/keys/client # Libs install -m 755 %{_lib}/java/CasaAuthTokenSvc.war %{buildroot}%{prefix}/share/java/CASA/authtoken/CasaAuthTokenSvc-%{bldno}.war install -m 700 %{_lib}/java/CasaAuthTokenSvc.war %{buildroot}/srv/www/casaats/webapps/CasaAuthTokenSvc.war +install -m 755 %{_lib}/java/CasaAuthTokenSettingsEditor.jar %{buildroot}%{prefix}/share/java/CASA/authtoken/bin/CasaAuthTokenSettingsEditor-%{bldno}.jar +install -m 755 %{_lib}/java/CasaIdenTokenSettingsEditor.jar %{buildroot}%{prefix}/share/java/CASA/authtoken/bin/CasaIdenTokenSettingsEditor-%{bldno}.jar +install -m 755 %{_lib}/java/CasaSvcSettingsEditor.jar %{buildroot}%{prefix}/share/java/CASA/authtoken/bin/CasaSvcSettingsEditor-%{bldno}.jar +install -m 755 %{_lib}/java/CasaAuthPolicyEditor.jar %{buildroot}%{prefix}/share/java/CASA/authtoken/bin/CasaAuthPolicyEditor-%{bldno}.jar # Symbolic Links ln -sf CasaAuthTokenSvc-%{bldno}.war %{buildroot}%{prefix}/share/java/CASA/authtoken/CasaAuthTokenSvc.war +ln -sf CasaAuthTokenSettingsEditor-%{bldno}.jar %{buildroot}%{prefix}/share/java/CASA/authtoken/bin/CasaAuthTokenSettingsEditor.jar +ln -sf CasaIdenTokenSettingsEditor-%{bldno}.jar %{buildroot}%{prefix}/share/java/CASA/authtoken/bin/CasaIdenTokenSettingsEditor.jar +ln -sf CasaSvcSettingsEditor-%{bldno}.jar %{buildroot}%{prefix}/share/java/CASA/authtoken/bin/CasaSvcSettingsEditor.jar +ln -sf CasaAuthPolicyEditor-%{bldno}.jar %{buildroot}%{prefix}/share/java/CASA/authtoken/bin/CasaAuthPolicyEditor.jar # Settings and configuration files -install -m 600 server/Svc/svc.settings %{buildroot}/etc/CASA/authtoken/svc/svc.settings +install -m 600 server/Svc/linux/svc.settings %{buildroot}/etc/CASA/authtoken/svc/svc.settings install -m 600 server/Svc/authtoken.settings %{buildroot}/etc/CASA/authtoken/svc/authtoken.settings install -m 600 server/Svc/identoken.settings %{buildroot}/etc/CASA/authtoken/svc/identoken.settings install -m 600 server/Svc/src/com/novell/casa/authtoksvc/Krb5_mechanism.settings %{buildroot}/etc/CASA/authtoken/svc/auth_mechanisms/Krb5Authenticate/mechanism.settings @@ -150,6 +158,10 @@ install -m 600 server/Svc/src/com/novell/casa/authtoksvc/Pwd_mechanism.settings # Others install -m 700 server/Svc/linux/server_keystore_setup.sh %{buildroot}%{prefix}/share/java/CASA/authtoken/bin/server_keystore_setup.sh +install -m 700 server/Svc/linux/CasaAuthPolicyEditor.sh %{buildroot}%{prefix}/share/java/CASA/authtoken/bin/CasaAuthPolicyEditor.sh +install -m 700 server/Svc/linux/CasaAuthTokenSettingsEditor.sh %{buildroot}%{prefix}/share/java/CASA/authtoken/bin/CasaAuthTokenSettingsEditor.sh +install -m 700 server/Svc/linux/CasaIdenTokenSettingsEditor.sh %{buildroot}%{prefix}/share/java/CASA/authtoken/bin/CasaIdenTokenSettingsEditor.sh +install -m 700 server/Svc/linux/CasaSvcSettingsEditor.sh %{buildroot}%{prefix}/share/java/CASA/authtoken/bin/CasaSvcSettingsEditor.sh install -m 755 server/Svc/linux/CasaAuthtokenSvcD %{buildroot}/etc/init.d/casa_atsd install -m 700 server/Svc/linux/envvars %{buildroot}/etc/CASA/authtoken/svc/envvars @@ -157,7 +169,8 @@ install -m 700 server/Svc/linux/envvars %{buildroot}/etc/CASA/authtoken/svc/envv install -m 600 server/Svc/tomcat5/conf/catalina.policy %{buildroot}/srv/www/casaats/conf/catalina.policy install -m 600 server/Svc/tomcat5/conf/catalina.properties %{buildroot}/srv/www/casaats/conf/catalina.properties install -m 600 server/Svc/tomcat5/conf/jk2.properties %{buildroot}/srv/www/casaats/conf/jk2.properties -install -m 600 server/Svc/tomcat5/conf/server.xml %{buildroot}/srv/www/casaats/conf/server.xml +install -m 600 server/Svc/tomcat5/conf/linux/server-ibm.xml %{buildroot}/srv/www/casaats/conf/server-ibm.xml +install -m 600 server/Svc/tomcat5/conf/linux/server-sun.xml %{buildroot}/srv/www/casaats/conf/server-sun.xml install -m 600 server/Svc/tomcat5/conf/tomcat-users.xml %{buildroot}/srv/www/casaats/conf/tomcat-users.xml install -m 600 server/Svc/tomcat5/conf/web.xml %{buildroot}/srv/www/casaats/conf/web.xml @@ -248,6 +261,18 @@ userdel casaatsd %{prefix}/share/java/CASA/authtoken/CasaAuthTokenSvc-%{bldno}.war %{prefix}/share/java/CASA/authtoken/CasaAuthTokenSvc.war %{prefix}/share/java/CASA/authtoken/bin/server_keystore_setup.sh +%{prefix}/share/java/CASA/authtoken/bin/CasaAuthPolicyEditor.sh +%{prefix}/share/java/CASA/authtoken/bin/CasaAuthTokenSettingsEditor.sh +%{prefix}/share/java/CASA/authtoken/bin/CasaIdenTokenSettingsEditor.sh +%{prefix}/share/java/CASA/authtoken/bin/CasaSvcSettingsEditor.sh +%{prefix}/share/java/CASA/authtoken/bin/CasaAuthTokenSettingsEditor-%{bldno}.jar +%{prefix}/share/java/CASA/authtoken/bin/CasaAuthTokenSettingsEditor.jar +%{prefix}/share/java/CASA/authtoken/bin/CasaIdenTokenSettingsEditor-%{bldno}.jar +%{prefix}/share/java/CASA/authtoken/bin/CasaIdenTokenSettingsEditor.jar +%{prefix}/share/java/CASA/authtoken/bin/CasaSvcSettingsEditor-%{bldno}.jar +%{prefix}/share/java/CASA/authtoken/bin/CasaSvcSettingsEditor.jar +%{prefix}/share/java/CASA/authtoken/bin/CasaAuthPolicyEditor-%{bldno}.jar +%{prefix}/share/java/CASA/authtoken/bin/CasaAuthPolicyEditor.jar /etc/init.d/casa_atsd %defattr(-,casaatsd,casaauth) %dir /srv/www/casaats @@ -272,7 +297,8 @@ userdel casaatsd %config /srv/www/casaats/conf/catalina.policy %config /srv/www/casaats/conf/catalina.properties %config /srv/www/casaats/conf/jk2.properties -%config /srv/www/casaats/conf/server.xml +%config /srv/www/casaats/conf/server-ibm.xml +%config /srv/www/casaats/conf/server-sun.xml %config /srv/www/casaats/conf/tomcat-users.xml %config /srv/www/casaats/conf/web.xml %config /etc/CASA/authtoken/svc/envvars diff --git a/CASA-auth-token/java/server/Svc/Makefile.am b/CASA-auth-token/java/server/Svc/Makefile.am index ab7c238d..8355be02 100644 --- a/CASA-auth-token/java/server/Svc/Makefile.am +++ b/CASA-auth-token/java/server/Svc/Makefile.am @@ -20,12 +20,11 @@ ####################################################################### SUBDIRS = src -DIST_SUBDIRS = src external tomcat5 linux +DIST_SUBDIRS = src external tomcat5 linux manifest EXTRA_DIST = authtoken.settings \ identoken.settings \ README \ - svc.settings \ TODO \ web.xml @@ -36,6 +35,8 @@ LIBDIR = $(ROOT)/$(LIB) IDENT_ABSTRACTION_DIR = /usr/share/java/identity-abstraction AXIS_JARS_DIR = external +MANIFEST_DIR = manifest + JAVAROOT = . JAVAC= javac @@ -43,8 +44,10 @@ WEBAPP_NAME = CasaAuthTokenSvc WEBAPP_EXT = war MODULE_NAME = CasaAuthToken MODULE_EXT = jar -UTIL_MODULE_NAME = CasaAuthTokenUtil -UTIL_MODULE_EXT = jar +AUTH_TOKEN_SETTINGS_EDITOR_MODULE_NAME = CasaAuthTokenSettingsEditor +IDEN_TOKEN_SETTINGS_EDITOR_MODULE_NAME = CasaIdenTokenSettingsEditor +SVC_SETTINGS_EDITOR_MODULE_NAME = CasaSvcSettingsEditor +AUTH_POLICY_EDITOR_MODULE_NAME = CasaAuthPolicyEditor JAVAFILES = src/com/novell/casa/authtoksvc/ProtoDefs.java \ src/com/novell/casa/authtoksvc/AuthMechConfig.java \ @@ -81,11 +84,34 @@ JAVAFILES = src/com/novell/casa/authtoksvc/ProtoDefs.java \ BUILDDIR = build -WEBAPP = $(WEBAPP_NAME).$(WEBAPP_EXT) - AUTHTOKEN_FILES = -C $(BUILDDIR)/webapp/WEB-INF/classes com -AUTHTOKEN_UTIL_FILES = -C $(BUILDDIR)/webapp/WEB-INF/classes com +AUTH_TOKEN_SETTINGS_EDITOR_FILES = -C $(BUILDDIR)/webapp/WEB-INF/classes com/novell/casa/authtoksvc/IVerifySetting.class \ + -C $(BUILDDIR)/webapp/WEB-INF/classes com/novell/casa/authtoksvc/SettingsFileUtil.class \ + -C $(BUILDDIR)/webapp/WEB-INF/classes com/novell/casa/authtoksvc/AuthTokenSettingsEditor.class \ + -C $(BUILDDIR)/webapp/WEB-INF/classes com/novell/casa/authtoksvc/AuthTokenConfig.class + +IDEN_TOKEN_SETTINGS_EDITOR_FILES = -C $(BUILDDIR)/webapp/WEB-INF/classes com/novell/casa/authtoksvc/IVerifySetting.class \ + -C $(BUILDDIR)/webapp/WEB-INF/classes com/novell/casa/authtoksvc/SettingsFileUtil.class \ + -C $(BUILDDIR)/webapp/WEB-INF/classes com/novell/casa/authtoksvc/IdenTokenSettingsEditor.class \ + -C $(BUILDDIR)/webapp/WEB-INF/classes com/novell/casa/authtoksvc/IdenTokenConfig.class + +SVC_SETTINGS_EDITOR_FILES = -C $(BUILDDIR)/webapp/WEB-INF/classes com/novell/casa/authtoksvc/IVerifySetting.class \ + -C $(BUILDDIR)/webapp/WEB-INF/classes com/novell/casa/authtoksvc/SettingsFileUtil.class \ + -C $(BUILDDIR)/webapp/WEB-INF/classes com/novell/casa/authtoksvc/SvcSettingsEditor.class \ + -C $(BUILDDIR)/webapp/WEB-INF/classes com/novell/casa/authtoksvc/SvcConfig.class + +AUTH_POLICY_EDITOR_FILES = -C $(BUILDDIR)/webapp/WEB-INF/classes com/novell/casa/authtoksvc/AuthPolicyEditor.class + +WEBAPP = $(WEBAPP_NAME).$(WEBAPP_EXT) + +AUTH_TOKEN_SETTINGS_EDITOR = $(AUTH_TOKEN_SETTINGS_EDITOR_MODULE_NAME).$(MODULE_EXT) + +IDEN_TOKEN_SETTINGS_EDITOR = $(IDEN_TOKEN_SETTINGS_EDITOR_MODULE_NAME).$(MODULE_EXT) + +SVC_SETTINGS_EDITOR = $(SVC_SETTINGS_EDITOR_MODULE_NAME).$(MODULE_EXT) + +AUTH_POLICY_EDITOR = $(AUTH_POLICY_EDITOR_MODULE_NAME).$(MODULE_EXT) CLASSES = $(addprefix $(BUILDDIR)/, $(JAVAFILES:%.java=%.class)) @@ -98,7 +124,7 @@ CLASSPATH = $(AXIS_LIBS):$(IDENT_ABSTRACTION_DIR)/identity-abstraction.jar:$(LIB CUR_DIR := $(shell pwd) -all: $(BUILDDIR)/$(WEBAPP) $(BUILDDIR)/$(MODULE_NAME).$(MODULE_EXT) $(BUILDDIR)/$(UTIL_MODULE_NAME).$(UTIL_MODULE_EXT) +all: $(BUILDDIR)/$(WEBAPP) $(BUILDDIR)/$(MODULE_NAME).$(MODULE_EXT) $(BUILDDIR)/$(AUTH_TOKEN_SETTINGS_EDITOR) $(BUILDDIR)/$(IDEN_TOKEN_SETTINGS_EDITOR) $(BUILDDIR)/$(SVC_SETTINGS_EDITOR) $(BUILDDIR)/$(AUTH_POLICY_EDITOR) $(BUILDDIR)/%.class: %.java @echo [======== Compiling $@ ========] @@ -111,7 +137,7 @@ $(BUILDDIR)/%.class: %.java $(BUILDDIR)/$(WEBAPP): $(BUILDDIR) $(CLASSES) @echo [======== Creating Webapp $@ ========] cp web.xml $(BUILDDIR)/webapp/WEB-INF/web.xml - cp svc.settings $(BUILDDIR)/webapp/WEB-INF/conf/svc.settings + cp linux/svc.settings $(BUILDDIR)/webapp/WEB-INF/conf/svc.settings cp authtoken.settings $(BUILDDIR)/webapp/WEB-INF/conf/authtoken.settings cp identoken.settings $(BUILDDIR)/webapp/WEB-INF/conf/identoken.settings cp linux/crypto.properties $(BUILDDIR)/webapp/WEB-INF/classes/crypto.properties @@ -127,10 +153,25 @@ $(BUILDDIR)/$(MODULE_NAME).$(MODULE_EXT): $(BUILDDIR) $(CLASSES) jar cvf $(BUILDDIR)/$(MODULE_NAME).$(MODULE_EXT) $(AUTHTOKEN_FILES) cp $(BUILDDIR)/$(MODULE_NAME).$(MODULE_EXT) $(LIBDIR)/java/ -$(BUILDDIR)/$(UTIL_MODULE_NAME).$(UTIL_MODULE_EXT): $(BUILDDIR) $(CLASSES) +$(BUILDDIR)/$(AUTH_TOKEN_SETTINGS_EDITOR): $(BUILDDIR) $(CLASSES) @echo [======== Jarring $@ ========] - jar cvf $(BUILDDIR)/$(UTIL_MODULE_NAME).$(UTIL_MODULE_EXT) $(AUTHTOKEN_UTIL_FILES) - cp $(BUILDDIR)/$(UTIL_MODULE_NAME).$(UTIL_MODULE_EXT) $(LIBDIR)/java/ + jar cvmf $(MANIFEST_DIR)/AuthTokenSettingsEditor.txt $(BUILDDIR)/$(AUTH_TOKEN_SETTINGS_EDITOR) $(AUTH_TOKEN_SETTINGS_EDITOR_FILES) + cp $(BUILDDIR)/$(AUTH_TOKEN_SETTINGS_EDITOR) $(LIBDIR)/java/ + +$(BUILDDIR)/$(IDEN_TOKEN_SETTINGS_EDITOR): $(BUILDDIR) $(CLASSES) + @echo [======== Jarring $@ ========] + jar cvmf $(MANIFEST_DIR)/IdenTokenSettingsEditor.txt $(BUILDDIR)/$(IDEN_TOKEN_SETTINGS_EDITOR) $(IDEN_TOKEN_SETTINGS_EDITOR_FILES) + cp $(BUILDDIR)/$(IDEN_TOKEN_SETTINGS_EDITOR) $(LIBDIR)/java/ + +$(BUILDDIR)/$(SVC_SETTINGS_EDITOR): $(BUILDDIR) $(CLASSES) + @echo [======== Jarring $@ ========] + jar cvmf $(MANIFEST_DIR)/SvcSettingsEditor.txt $(BUILDDIR)/$(SVC_SETTINGS_EDITOR) $(SVC_SETTINGS_EDITOR_FILES) + cp $(BUILDDIR)/$(SVC_SETTINGS_EDITOR) $(LIBDIR)/java/ + +$(BUILDDIR)/$(AUTH_POLICY_EDITOR): $(BUILDDIR) $(CLASSES) + @echo [======== Jarring $@ ========] + jar cvmf $(MANIFEST_DIR)/AuthPolicyEditor.txt $(BUILDDIR)/$(AUTH_POLICY_EDITOR) $(AUTH_POLICY_EDITOR_FILES) + cp $(BUILDDIR)/$(AUTH_POLICY_EDITOR) $(LIBDIR)/java/ $(BUILDDIR): [ -d $(BUILDDIR) ] || mkdir -p $(BUILDDIR) diff --git a/CASA-auth-token/java/server/Svc/README b/CASA-auth-token/java/server/Svc/README index 37da4acb..af03ee14 100644 --- a/CASA-auth-token/java/server/Svc/README +++ b/CASA-auth-token/java/server/Svc/README @@ -99,7 +99,7 @@ The following is an example svc.settings file: /etc/CASA/authtoken/svc/iaRealms.xml 60 signingKey - secret + secret Note the following about the sample svc.settings file: diff --git a/CASA-auth-token/java/server/Svc/linux/CasaAuthPolicyEditor.sh b/CASA-auth-token/java/server/Svc/linux/CasaAuthPolicyEditor.sh new file mode 100755 index 00000000..d98cda40 --- /dev/null +++ b/CASA-auth-token/java/server/Svc/linux/CasaAuthPolicyEditor.sh @@ -0,0 +1,3 @@ +#!/bin/sh +$JAVA_HOME/bin/java -jar /usr/share/java/CASA/authtoken/bin/CasaAuthPolicyEditor.jar $* + diff --git a/CASA-auth-token/java/server/Svc/linux/CasaAuthTokenSettingsEditor.sh b/CASA-auth-token/java/server/Svc/linux/CasaAuthTokenSettingsEditor.sh new file mode 100755 index 00000000..b2d0fd66 --- /dev/null +++ b/CASA-auth-token/java/server/Svc/linux/CasaAuthTokenSettingsEditor.sh @@ -0,0 +1,3 @@ +#!/bin/sh +$JAVA_HOME/bin/java -jar /usr/share/java/CASA/authtoken/bin/CasaAuthTokenSettingsEditor.jar $* + diff --git a/CASA-auth-token/java/server/Svc/linux/CasaAuthtokenSvcD b/CASA-auth-token/java/server/Svc/linux/CasaAuthtokenSvcD index de4e539c..46847daf 100644 --- a/CASA-auth-token/java/server/Svc/linux/CasaAuthtokenSvcD +++ b/CASA-auth-token/java/server/Svc/linux/CasaAuthtokenSvcD @@ -75,7 +75,7 @@ StartDAEMON() if atsIsRunning ; then rc_failed 0 else - # try to fix permissions + # Try to fix permissions chown --dereference $DAEMON_USER:$DAEMON_GROUP "$CATALINA_BASE" for dir in "$CATALINA_BASE/conf" \ "$CATALINA_BASE/logs" \ @@ -85,6 +85,14 @@ StartDAEMON() # the command true is used because of for example conf directory may be mounted read-only test -d "$dir" && chown -R --dereference $DAEMON_USER:$DAEMON_GROUP "$dir" 2>/dev/null || true done + + # Make sure that the server.xml link has been made + if [ ! -f /srv/www/casaats/conf/server.xml ]; then + ln -s /srv/www/casaats/conf/server-ibm.xml /srv/www/casaats/conf/server.xml + chown -h casaatsd:casaauth /srv/www/casaats/conf/server.xml + fi + + # Start it up su $DAEMON_USER -s /bin/bash -c "$CATALINA_HOME/bin/startup.sh" >"$CATALINA_BASE/logs//start.log" 2>&1 sleep 1 if atsIsRunning ; then diff --git a/CASA-auth-token/java/server/Svc/linux/CasaIdenTokenSettingsEditor.sh b/CASA-auth-token/java/server/Svc/linux/CasaIdenTokenSettingsEditor.sh new file mode 100755 index 00000000..8abeaaa2 --- /dev/null +++ b/CASA-auth-token/java/server/Svc/linux/CasaIdenTokenSettingsEditor.sh @@ -0,0 +1,3 @@ +#!/bin/sh +$JAVA_HOME/bin/java -jar /usr/share/java/CASA/authtoken/bin/CasaIdenTokenSettingsEditor.jar $* + diff --git a/CASA-auth-token/java/server/Svc/linux/CasaSvcSettingsEditor.sh b/CASA-auth-token/java/server/Svc/linux/CasaSvcSettingsEditor.sh new file mode 100755 index 00000000..1471136e --- /dev/null +++ b/CASA-auth-token/java/server/Svc/linux/CasaSvcSettingsEditor.sh @@ -0,0 +1,3 @@ +#!/bin/sh +$JAVA_HOME/bin/java -jar /usr/share/java/CASA/authtoken/bin/CasaSvcSettingsEditor.jar $* + diff --git a/CASA-auth-token/java/server/Svc/linux/Makefile.am b/CASA-auth-token/java/server/Svc/linux/Makefile.am index a34e9461..1ec53ccb 100644 --- a/CASA-auth-token/java/server/Svc/linux/Makefile.am +++ b/CASA-auth-token/java/server/Svc/linux/Makefile.am @@ -29,7 +29,12 @@ CFILES = EXTRA_DIST = CasaAuthtokenSvcD \ envvars \ server_keystore_setup.sh \ - crypto.properties + crypto.properties \ + svc.settings \ + CasaAuthPolicyEditor.sh \ + CasaAuthTokenSettingsEditor.sh \ + CasaIdenTokenSettingsEditor.sh \ + CasaSvcSettingsEditor.sh .PHONY: package package-clean package-install package-uninstall package package-clean package-install package-uninstall: diff --git a/CASA-auth-token/java/server/Svc/svc.settings b/CASA-auth-token/java/server/Svc/linux/svc.settings similarity index 100% rename from CASA-auth-token/java/server/Svc/svc.settings rename to CASA-auth-token/java/server/Svc/linux/svc.settings diff --git a/CASA-auth-token/java/server/Svc/manifest/AuthPolicyEditor.txt b/CASA-auth-token/java/server/Svc/manifest/AuthPolicyEditor.txt new file mode 100644 index 00000000..861c25c1 --- /dev/null +++ b/CASA-auth-token/java/server/Svc/manifest/AuthPolicyEditor.txt @@ -0,0 +1,2 @@ +Main-Class: com.novell.casa.authtoksvc.AuthPolicyEditor + diff --git a/CASA-auth-token/java/server/Svc/manifest/AuthTokenSettingsEditor.txt b/CASA-auth-token/java/server/Svc/manifest/AuthTokenSettingsEditor.txt new file mode 100644 index 00000000..7b9e5571 --- /dev/null +++ b/CASA-auth-token/java/server/Svc/manifest/AuthTokenSettingsEditor.txt @@ -0,0 +1,2 @@ +Main-Class: com.novell.casa.authtoksvc.AuthTokenSettingsEditor + diff --git a/CASA-auth-token/java/server/Svc/manifest/IdenTokenSettingsEditor.txt b/CASA-auth-token/java/server/Svc/manifest/IdenTokenSettingsEditor.txt new file mode 100644 index 00000000..4cd099b9 --- /dev/null +++ b/CASA-auth-token/java/server/Svc/manifest/IdenTokenSettingsEditor.txt @@ -0,0 +1,2 @@ +Main-Class: com.novell.casa.authtoksvc.IdenTokenSettingsEditor + diff --git a/CASA-auth-token/java/server/Svc/manifest/Makefile.am b/CASA-auth-token/java/server/Svc/manifest/Makefile.am new file mode 100644 index 00000000..dd9e5a55 --- /dev/null +++ b/CASA-auth-token/java/server/Svc/manifest/Makefile.am @@ -0,0 +1,40 @@ +####################################################################### +# +# Copyright (C) 2006 Novell, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# +# Author: Juan Carlos Luciani +# +####################################################################### + +SUBDIRS = + +DIST_SUBDIRS = + +CFILES = + +EXTRA_DIST = AuthPolicyEditor.txt \ + AuthTokenSettingsEditor.txt \ + IdenTokenSettingsEditor.txt \ + SvcSettingsEditor.txt + +.PHONY: package package-clean package-install package-uninstall +package package-clean package-install package-uninstall: + $(MAKE) -C $(TARGET_OS) $@ + +maintainer-clean-local: + rm -f Makefile.in + diff --git a/CASA-auth-token/java/server/Svc/manifest/SvcSettingsEditor.txt b/CASA-auth-token/java/server/Svc/manifest/SvcSettingsEditor.txt new file mode 100644 index 00000000..5423118f --- /dev/null +++ b/CASA-auth-token/java/server/Svc/manifest/SvcSettingsEditor.txt @@ -0,0 +1,2 @@ +Main-Class: com.novell.casa.authtoksvc.SvcSettingsEditor + diff --git a/CASA-auth-token/java/server/Svc/src/com/novell/casa/authtoksvc/AuthTokenSettingsEditor.java b/CASA-auth-token/java/server/Svc/src/com/novell/casa/authtoksvc/AuthTokenSettingsEditor.java index 64bd421d..55e638ab 100644 --- a/CASA-auth-token/java/server/Svc/src/com/novell/casa/authtoksvc/AuthTokenSettingsEditor.java +++ b/CASA-auth-token/java/server/Svc/src/com/novell/casa/authtoksvc/AuthTokenSettingsEditor.java @@ -142,7 +142,7 @@ public class AuthTokenSettingsEditor implements IVerifySetting String filePath = null; String setting = null; String value = null; - authtoken_settings_editor editor = new authtoken_settings_editor(); + AuthTokenSettingsEditor editor = new AuthTokenSettingsEditor(); // Process the command line arguments for (int i = 0; i < args.length; i++) diff --git a/CASA-auth-token/java/server/Svc/src/com/novell/casa/authtoksvc/IdenTokenSettingsEditor.java b/CASA-auth-token/java/server/Svc/src/com/novell/casa/authtoksvc/IdenTokenSettingsEditor.java index fa974b94..2f25f426 100644 --- a/CASA-auth-token/java/server/Svc/src/com/novell/casa/authtoksvc/IdenTokenSettingsEditor.java +++ b/CASA-auth-token/java/server/Svc/src/com/novell/casa/authtoksvc/IdenTokenSettingsEditor.java @@ -115,7 +115,7 @@ public class IdenTokenSettingsEditor implements IVerifySetting String filePath = null; String setting = null; String value = null; - identoken_settings_editor editor = new identoken_settings_editor(); + IdenTokenSettingsEditor editor = new IdenTokenSettingsEditor(); // Process the command line arguments for (int i = 0; i < args.length; i++) diff --git a/CASA-auth-token/java/server/Svc/src/com/novell/casa/authtoksvc/SvcSettingsEditor.java b/CASA-auth-token/java/server/Svc/src/com/novell/casa/authtoksvc/SvcSettingsEditor.java index 1618e931..5a4a1c6c 100644 --- a/CASA-auth-token/java/server/Svc/src/com/novell/casa/authtoksvc/SvcSettingsEditor.java +++ b/CASA-auth-token/java/server/Svc/src/com/novell/casa/authtoksvc/SvcSettingsEditor.java @@ -50,8 +50,8 @@ public class SvcSettingsEditor implements IVerifySetting " LifetimeShorter\n" + " IAConfigFile\n" + " ReconfigureInterval\n" + - " KeyStoreUser\n" + - " KeyStorePwd\n"; + " SigningKeyAliasName\n" + + " SigningKeyPassword\n"; private static final String settings = "\n" + @@ -78,9 +78,9 @@ public class SvcSettingsEditor implements IVerifySetting result = true; else if (setting.compareToIgnoreCase(SvcConfig.ReconfigureInterval) == 0) result = true; - else if (setting.compareToIgnoreCase(SvcConfig.KeyStoreUser) == 0) + else if (setting.compareToIgnoreCase(SvcConfig.SigningKeyAliasName) == 0) result = true; - else if (setting.compareToIgnoreCase(SvcConfig.KeyStorePwd) == 0) + else if (setting.compareToIgnoreCase(SvcConfig.SigningKeyPassword) == 0) result = true; else System.out.println("Invalid setting specified"); @@ -165,13 +165,13 @@ public class SvcSettingsEditor implements IVerifySetting System.out.println("Invalid setting value specified"); } } - else if (setting.compareToIgnoreCase(SvcConfig.KeyStoreUser) == 0) + else if (setting.compareToIgnoreCase(SvcConfig.SigningKeyAliasName) == 0) { - validSetting = SvcConfig.KeyStoreUser; + validSetting = SvcConfig.SigningKeyAliasName; } - else if (setting.compareToIgnoreCase(SvcConfig.KeyStorePwd) == 0) + else if (setting.compareToIgnoreCase(SvcConfig.SigningKeyPassword) == 0) { - validSetting = SvcConfig.KeyStorePwd; + validSetting = SvcConfig.SigningKeyPassword; } else System.out.println("Invalid setting specified"); @@ -192,7 +192,7 @@ public class SvcSettingsEditor implements IVerifySetting String filePath = null; String setting = null; String value = null; - svc_settings_editor editor = new svc_settings_editor(); + SvcSettingsEditor editor = new SvcSettingsEditor(); // Process the command line arguments for (int i = 0; i < args.length; i++) diff --git a/CASA-auth-token/java/server/Svc/tomcat5/conf/Makefile.am b/CASA-auth-token/java/server/Svc/tomcat5/conf/Makefile.am index be7b21cd..433e194f 100644 --- a/CASA-auth-token/java/server/Svc/tomcat5/conf/Makefile.am +++ b/CASA-auth-token/java/server/Svc/tomcat5/conf/Makefile.am @@ -22,7 +22,7 @@ SUBDIRS = -DIST_SUBDIRS = Catalina +DIST_SUBDIRS = Catalina linux CFILES = diff --git a/CASA-auth-token/java/server/Svc/tomcat5/conf/linux/Makefile.am b/CASA-auth-token/java/server/Svc/tomcat5/conf/linux/Makefile.am new file mode 100644 index 00000000..5898e9e8 --- /dev/null +++ b/CASA-auth-token/java/server/Svc/tomcat5/conf/linux/Makefile.am @@ -0,0 +1,38 @@ +####################################################################### +# +# Copyright (C) 2006 Novell, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# +# Author: Juan Carlos Luciani +# +####################################################################### + +SUBDIRS = + +DIST_SUBDIRS = + +CFILES = + +EXTRA_DIST = server-ibm.xml \ + server-sun.xml + +.PHONY: package package-clean package-install package-uninstall +package package-clean package-install package-uninstall: + $(MAKE) -C $(TARGET_OS) $@ + +maintainer-clean-local: + rm -f Makefile.in +