diff --git a/HIRS_AttestationCAPortal/build.gradle b/HIRS_AttestationCAPortal/build.gradle index 3ab2c284..45259c42 100644 --- a/HIRS_AttestationCAPortal/build.gradle +++ b/HIRS_AttestationCAPortal/build.gradle @@ -56,7 +56,7 @@ dependencies { implementation 'jakarta.servlet.jsp.jstl:jakarta.servlet.jsp.jstl-api:3.0.0' implementation 'jakarta.servlet.jsp:jakarta.servlet.jsp-api:3.0.0' implementation 'jakarta.el:jakarta.el-api:5.0.0' - + compileOnly 'org.projectlombok:lombok' runtimeOnly 'org.mariadb.jdbc:mariadb-java-client' diff --git a/HIRS_AttestationCAPortal/src/main/resources/application.properties b/HIRS_AttestationCAPortal/src/main/resources/application.properties index 2250fc39..288f48c4 100644 --- a/HIRS_AttestationCAPortal/src/main/resources/application.properties +++ b/HIRS_AttestationCAPortal/src/main/resources/application.properties @@ -17,7 +17,7 @@ spring.datasource.driver-class-name=org.mariadb.jdbc.Driver #spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver # Tomcat Config -server.tomcat.additional-tld-skip-patterns=*.jar +server.tomcat.additional-tld-skip-patterns=*jakarta*.jar, txw2*.jar, *commons*.jar, *annotations*.jar, *checker*.jar, *lombok*.jar, *jsr*.jar, *guava*.jar, *access*.jar, *activation*.jar, *bcprov*.jar, *bcmail*.jar, *bcutil*.jar, *bcpkix*.jar, *json*.jar server.tomcat.basedir=/opt/embeddedtomcat server.servlet.register-default-servlet=true server.servlet.context-path=/HIRS_AttestationCAPortal diff --git a/HIRS_Utils/build.gradle b/HIRS_Utils/build.gradle index 59ff2e43..eb44b057 100644 --- a/HIRS_Utils/build.gradle +++ b/HIRS_Utils/build.gradle @@ -38,8 +38,6 @@ dependencies { implementation libs.minimal.json implementation libs.jakarta.api - - implementation 'org.apache.logging.log4j:log4j-core:2.19.0' implementation 'org.apache.logging.log4j:log4j-api:2.19.0' implementation 'org.glassfish.jaxb:jaxb-runtime:4.0.1' diff --git a/package/scripts/aca/aca_bootRun.sh b/package/scripts/aca/aca_bootRun.sh index babe01be..2118ba92 100644 --- a/package/scripts/aca/aca_bootRun.sh +++ b/package/scripts/aca/aca_bootRun.sh @@ -12,7 +12,7 @@ declare -A props if [ -f $PASS_FILE ]; then while IFS="=" read -r key value; do - echo "key is $key, value is $value" + #echo "key is $key, value is $value" if [ ! -z "$key" ]; then props["$key"]="$value" fi diff --git a/package/scripts/aca/aca_setup.sh b/package/scripts/aca/aca_setup.sh index 27326922..d89cd894 100644 --- a/package/scripts/aca/aca_setup.sh +++ b/package/scripts/aca/aca_setup.sh @@ -1,11 +1,22 @@ #!/bin/bash # Capture location of the script to allow from invocation from any location SCRIPT_DIR=$( dirname -- "$( readlink -f -- "$0"; )"; ) +PROP_FILE='../../../HIRS_AttestationCAPortal/src/main/resources/application.properties' -mkdir -p /etc/hirs/aca +if [ "$EUID" -ne 0 ] + then echo "The first time this script is run, this script requires root. Please run as root" + exit 1 +fi + +mkdir -p /etc/hirs/aca/ pushd $SCRIPT_DIR +# If setup for development start with basic spring config +if [ -f $PROP_FILE ]; then + cp $PROP_FILE /etc/hirs/aca/. +fi + sh ../db/db_create.sh if [ $? -eq 0 ]; then echo "ACA database setup complete" @@ -20,6 +31,7 @@ if [ $? -eq 0 ]; then echo "Error setting up ACA PKI" exit 1 fi + echo "ACA setup complete" -popd +popd \ No newline at end of file diff --git a/package/scripts/pki/pki_setup.sh b/package/scripts/pki/pki_setup.sh index 019473df..cf2c2a52 100644 --- a/package/scripts/pki/pki_setup.sh +++ b/package/scripts/pki/pki_setup.sh @@ -11,6 +11,13 @@ PROP_FILE=/etc/hirs/aca/application.properties # Capture location of the script to allow from invocation from any location SCRIPT_DIR=$( dirname -- "$( readlink -f -- "$0"; )"; ) echo "SCRIPT_DIR is $SCRIPT_DIR" + +# Check for sudo or root user +if [ "$EUID" -ne 0 ] + then echo "The first time this script is run, this script requires root. Please run as root" + exit 1 +fi + # Set HIRS PKI password if [ -z $HIRS_PKI_PWD ]; then # Create a 32 character random password