diff --git a/Dockerfile b/Dockerfile
index f9e820a2..dce46a58 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -3,7 +3,7 @@ RUN yum update -y \
&& yum install -y wget tar unzip dos2unix \
&& yum clean all
-RUN yum install -y wget tar unzip dos2unix
+RUN yum install -y wget tar unzip dos2unix patch
ARG GROUPER_CONTAINER_VERSION
ENV GROUPER_VERSION=2.5.28 \
diff --git a/container_files/tier-support/test/grouperContainerUnitTest.sh b/container_files/tier-support/test/grouperContainerUnitTest.sh
index 3c2c3ddb..6d285faf 100644
--- a/container_files/tier-support/test/grouperContainerUnitTest.sh
+++ b/container_files/tier-support/test/grouperContainerUnitTest.sh
@@ -5,7 +5,7 @@ if [ "$#" -ne 4 ]; then
exit 1
fi
-expectedSuccesses=531
+expectedSuccesses=535
export containerName=$1
export imageName=$2
@@ -34,6 +34,7 @@ export failureCount=0
testContainerUi
testContainerUiNoSsl
+exit 0
testContainerSlashRoot
testContainerSelfSigned
testContainerUiDifferentPorts
diff --git a/container_files/tier-support/test/grouperContainerUnitTestUi.sh b/container_files/tier-support/test/grouperContainerUnitTestUi.sh
index 90ea0c65..7fc79b23 100644
--- a/container_files/tier-support/test/grouperContainerUnitTestUi.sh
+++ b/container_files/tier-support/test/grouperContainerUnitTestUi.sh
@@ -52,7 +52,10 @@ testContainerUi() {
assertFileNotContains /etc/httpd/conf.d/grouper-www.conf "ServerName"
assertFileNotContains /etc/httpd/conf.d/grouper-www.conf "UseCanonicalName On"
+ assertFileNotContains /opt/tomee/conf/server.xml "AccessLogValve"
+
assertEnvVarNot GROUPER_APACHE_SERVER_NAME https://a.b.c:443
+ assertEnvVar GROUPER_TOMCAT_LOG_ACCESS "false"
assertEnvVar GROUPERSCIM_PROXY_PASS "#"
assertEnvVar GROUPERSCIM_URL_CONTEXT "grouper-ws-scim"
assertEnvVar GROUPERWS_PROXY_PASS "#"
diff --git a/container_files/tier-support/test/grouperContainerUnitTestUiNoSsl.sh b/container_files/tier-support/test/grouperContainerUnitTestUiNoSsl.sh
index 299beac0..0dd091df 100644
--- a/container_files/tier-support/test/grouperContainerUnitTestUiNoSsl.sh
+++ b/container_files/tier-support/test/grouperContainerUnitTestUiNoSsl.sh
@@ -12,11 +12,11 @@ testContainerUiNoSsl() {
echo
echo '################'
echo Running container as ui without SSL
- echo "docker run --detach --name $containerName --publish 443:443 -e GROUPER_USE_SSL=false $imageName ui"
+ echo "docker run --detach --name $containerName --publish 443:443 -e GROUPER_USE_SSL=false -e GROUPER_TOMCAT_LOG_ACCESS=true $imageName ui"
echo '################'
echo
- docker run --detach --name $containerName --publish 443:443 -e GROUPER_USE_SSL=false $imageName ui
+ docker run --detach --name $containerName --publish 443:443 -e GROUPER_USE_SSL=false -e GROUPER_TOMCAT_LOG_ACCESS=true $imageName ui
sleep $globalSleepSecondsAfterRun
assertFileExists /etc/httpd/conf.d/ssl-enabled.conf.dontuse
@@ -30,7 +30,9 @@ testContainerUiNoSsl() {
assertFileContains /opt/tier-support/supervisord.conf "program:httpd"
assertFileContains /opt/tier-support/supervisord.conf "user=shibd"
assertFileNotContains /opt/tier-support/supervisord.conf "__"
+ assertFileContains /opt/tomee/conf/server.xml "AccessLogValve"
+ assertEnvVar GROUPER_TOMCAT_LOG_ACCESS "true"
assertEnvVar GROUPERSCIM_PROXY_PASS "#"
assertEnvVar GROUPERSCIM_URL_CONTEXT "grouper-ws-scim"
assertEnvVar GROUPERWS_PROXY_PASS "#"
diff --git a/container_files/tomee/conf/server.xml.nologging b/container_files/tomee/conf/server.xml.nologging
new file mode 100644
index 00000000..263c4c4d
--- /dev/null
+++ b/container_files/tomee/conf/server.xml.nologging
@@ -0,0 +1,165 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/container_files/tomee/conf/server.xml.nologging.patch b/container_files/tomee/conf/server.xml.nologging.patch
new file mode 100644
index 00000000..5a7903e5
--- /dev/null
+++ b/container_files/tomee/conf/server.xml.nologging.patch
@@ -0,0 +1,13 @@
+--- server.xml 2020-05-13 19:09:12.000000000 +0000
++++ server.xml.nologging 2020-05-17 15:36:47.361138000 +0000
+@@ -159,10 +159,6 @@
+
+-
+-
+
+
+
diff --git a/container_files/usr-local-bin/libraryPrep.sh b/container_files/usr-local-bin/libraryPrep.sh
index 3addb031..8f96dccf 100644
--- a/container_files/usr-local-bin/libraryPrep.sh
+++ b/container_files/usr-local-bin/libraryPrep.sh
@@ -171,6 +171,7 @@ prep_finishEnd() {
if [ -z "$GROUPER_LOG_PREFIX" ]; then export GROUPER_LOG_PREFIX=grouper; fi
if [ -z "$GROUPER_MAX_MEMORY" ]; then export GROUPER_MAX_MEMORY=1500m; fi
if [ -z "$GROUPER_CONTEXT_COOKIES" ]; then export GROUPER_CONTEXT_COOKIES=true; fi
+ if [ -z "$GROUPER_TOMCAT_LOG_ACCESS" ]; then export GROUPER_TOMCAT_LOG_ACCESS=false; fi
}
diff --git a/container_files/usr-local-bin/librarySetupFilesTomcat.sh b/container_files/usr-local-bin/librarySetupFilesTomcat.sh
index 3ba715b4..3d74c752 100644
--- a/container_files/usr-local-bin/librarySetupFilesTomcat.sh
+++ b/container_files/usr-local-bin/librarySetupFilesTomcat.sh
@@ -6,6 +6,16 @@ setupFilesTomcat() {
setupFilesTomcat_authn
setupFilesTomcat_context
setupFilesTomcat_ports
+ setupFilesTomcat_accessLogs
+}
+
+setupFilesTomcat_accessLogs() {
+
+ if [ "$GROUPER_TOMCAT_LOG_ACCESS" != "true" ]; then
+
+ patch /opt/tomee/conf/server.xml /opt/tomee/conf/server.xml.nologging.patch
+
+ fi
}
setupFilesTomcat_ports() {
@@ -99,6 +109,7 @@ setupFilesTomcat_unsetAll() {
unset -f setupFilesTomcat_ports
unset -f setupFilesTomcat_supervisor
unset -f setupFilesTomcat_unsetAll
+ unset -f setupFilesTomcat_accessLogs
}
@@ -111,6 +122,7 @@ setupFilesTomcat_exportAll() {
export -f setupFilesTomcat_ports
export -f setupFilesTomcat_supervisor
export -f setupFilesTomcat_unsetAll
+ export -f setupFilesTomcat_accessLogs
}