Completed necessary changes for Basic ATS Configuration
Setup tool.
This commit is contained in:
@@ -22,9 +22,7 @@
|
||||
SUBDIRS = src
|
||||
DIST_SUBDIRS = src external tomcat5 linux manifest templates
|
||||
|
||||
EXTRA_DIST = authtoken.settings \
|
||||
identoken.settings \
|
||||
README \
|
||||
EXTRA_DIST = README \
|
||||
TODO \
|
||||
web.xml
|
||||
|
||||
@@ -137,9 +135,9 @@ $(BUILDDIR)/%.class: %.java
|
||||
$(BUILDDIR)/$(WEBAPP): $(BUILDDIR) $(CLASSES)
|
||||
@echo [======== Creating Webapp $@ ========]
|
||||
cp web.xml $(BUILDDIR)/webapp/WEB-INF/web.xml
|
||||
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 templates/svc.settings $(BUILDDIR)/webapp/WEB-INF/conf/svc.settings
|
||||
cp templates/authtoken.settings $(BUILDDIR)/webapp/WEB-INF/conf/authtoken.settings
|
||||
cp templates/identoken.settings $(BUILDDIR)/webapp/WEB-INF/conf/identoken.settings
|
||||
cp linux/crypto.properties $(BUILDDIR)/webapp/WEB-INF/classes/crypto.properties
|
||||
cp src/com/novell/casa/authtoksvc/Krb5_mechanism.settings $(BUILDDIR)/webapp/WEB-INF/conf/installed_auth_mechanisms/Krb5Authenticate/mechanism.settings
|
||||
cp src/com/novell/casa/authtoksvc/Pwd_mechanism.settings $(BUILDDIR)/webapp/WEB-INF/conf/installed_auth_mechanisms/PwdAuthenticate/mechanism.settings
|
||||
|
||||
@@ -117,15 +117,10 @@ function setup_iaRealms_file
|
||||
|
||||
function setup_authPolicy_file
|
||||
{
|
||||
# Determine the file names
|
||||
TEMPLATE_FILE=$TEMPLATE_FILE_FOLDER/auth.policy
|
||||
CONFIG_FILE=$CONFIG_FILE_FOLDER/auth.policy
|
||||
EDITOR=/usr/share/java/CASA/authtoken/bin/CasaAuthPolicyEditor.sh
|
||||
|
||||
# Verify that the template file exists
|
||||
if [ ! -f $TEMPLATE_FILE ]; then
|
||||
echo "Template file $TEMPLATE_FILE does not exist"
|
||||
return 2
|
||||
fi
|
||||
# Determine the file name
|
||||
CONFIG_FILE=$CONFIG_FILE_FOLDER/auth.policy
|
||||
|
||||
# Verify that the output folder exists
|
||||
if [ ! -d $CONFIG_FILE_FOLDER ]; then
|
||||
@@ -138,8 +133,10 @@ function setup_authPolicy_file
|
||||
|
||||
# Verify that all of the appropriate environment variables have been set
|
||||
if [ "$REALM" != "" ]; then
|
||||
# Create and edit the output file
|
||||
sed s:REALM:$REALM:g $TEMPLATE_FILE > $CONFIG_FILE
|
||||
# Create and setup the auth.policy file
|
||||
$EDITOR -create -file $CONFIG_FILE
|
||||
$EDITOR -append -entry $REALM:Krb5Authenticate -file $CONFIG_FILE
|
||||
$EDITOR -append -entry $REALM:PwdAuthenticate -file $CONFIG_FILE
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
@@ -149,17 +146,12 @@ function setup_authPolicy_file
|
||||
|
||||
function setup_svcSettings_file
|
||||
{
|
||||
# Determine the file names
|
||||
TEMPLATE_FILE=$TEMPLATE_FILE_FOLDER/svc.settings
|
||||
EDITOR=/usr/share/java/CASA/authtoken/bin/CasaSvcSettingsEditor.sh
|
||||
|
||||
# Determine the file name
|
||||
CONFIG_FILE=$CONFIG_FILE_FOLDER/svc.settings
|
||||
IAREALMS_FILE_PATH=$CONFIG_FILE_FOLDER/iaRealms.xml
|
||||
|
||||
# Verify that the template file exists
|
||||
if [ ! -f $TEMPLATE_FILE ]; then
|
||||
echo "Template file $TEMPLATE_FILE does not exist"
|
||||
return 2
|
||||
fi
|
||||
|
||||
# Verify that the output folder exists
|
||||
if [ ! -d $CONFIG_FILE_FOLDER ]; then
|
||||
echo "Output folder $CONFIG_FILE_FOLDER does not exist"
|
||||
@@ -169,8 +161,9 @@ function setup_svcSettings_file
|
||||
# Clean-up the output folder
|
||||
rm -f $CONFIG_FILE
|
||||
|
||||
# Create and edit the output file
|
||||
sed s:IAREALMS_FILE_PATH:$IAREALMS_FILE_PATH:g $TEMPLATE_FILE > $CONFIG_FILE
|
||||
# Create and setup the svc.settings file
|
||||
$EDITOR -create -file $CONFIG_FILE
|
||||
$EDITOR -set IAConfigFile $IAREALMS_FILE_PATH -file $CONFIG_FILE
|
||||
return 0
|
||||
}
|
||||
|
||||
@@ -187,13 +180,13 @@ if [ "$1" != "" ]; then
|
||||
exit 0
|
||||
fi
|
||||
else
|
||||
TEMPLATE_FILE_FOLDER=DEFAULT_TEMPLATE_FILE_FOLDER
|
||||
TEMPLATE_FILE_FOLDER=$DEFAULT_TEMPLATE_FILE_FOLDER
|
||||
fi
|
||||
|
||||
if [ "$2" != "" ]; then
|
||||
CONFIG_FILE_FOLDER=$2
|
||||
else
|
||||
CONFIG_FILE_FOLDER=DEFAULT_CONFIG_FILE_FOLDER
|
||||
CONFIG_FILE_FOLDER=$DEFAULT_CONFIG_FILE_FOLDER
|
||||
fi
|
||||
|
||||
# Setup the configuration files
|
||||
|
||||
Reference in New Issue
Block a user