Skip to content

bump tomcat to 9.0.83 #125

Closed
wants to merge 79 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
ec2bf47
initial commit for RockyLinux
pcaskey Aug 12, 2021
140d278
comment sec test
pcaskey Aug 12, 2021
8c274d8
add security scan
pcaskey Aug 16, 2022
dfe5d50
add find (for tests)
pcaskey Aug 16, 2022
ef78ef5
fix jenkinsfile
pcaskey Aug 16, 2022
7cfe71e
jenkins fix
pcaskey Aug 16, 2022
5a4fd29
jenkins
pcaskey Aug 16, 2022
c1f3a5d
more jenkins stuff
pcaskey Aug 16, 2022
5737cb2
jenkins again
pcaskey Aug 16, 2022
cfa5bf5
jenkins too
pcaskey Aug 16, 2022
ad1d85c
jenkins fix
pcaskey Aug 16, 2022
2ed493d
tune jenkins settings
pcaskey Aug 16, 2022
4481172
comment out fatal sec scan
pcaskey Aug 16, 2022
4801f7f
initial attempt at multiarch
pcaskey Nov 2, 2022
4fdd508
just try amd64
pcaskey Nov 2, 2022
a4a11d5
mod Dockerfile
pcaskey Nov 2, 2022
c6bbc95
bugfix
pcaskey Nov 2, 2022
884176a
test
pcaskey Nov 2, 2022
9956e32
fix arch
pcaskey Nov 2, 2022
649541c
change FROM platform
chubing Nov 2, 2022
5f7458d
change way java installs
chubing Nov 2, 2022
a0dd539
add in amd64
chubing Nov 2, 2022
e8ab3c2
update rocky linux to 8.6
pcaskey Nov 2, 2022
093b295
enable trivy scan
pcaskey Nov 2, 2022
afcd5c4
remove sudo from trivy install
pcaskey Nov 3, 2022
2b51f02
Update Jenkinsfile
chubing Nov 3, 2022
30a4548
tweak image scanning
pcaskey Nov 3, 2022
3416367
Merge branch '4.2.1_20221101_rocky8_multiarch_dev' of https://github.…
pcaskey Nov 3, 2022
dcb0c6a
update Jenkinsfile
pcaskey Nov 3, 2022
c40b5fd
update Jenkinsfile
pcaskey Nov 3, 2022
529e544
re-order Jenkinsfile
pcaskey Nov 4, 2022
df3f449
delay push
pcaskey Nov 7, 2022
f4de319
multi-arch test
pcaskey Nov 7, 2022
5d9c6e4
bugfix in Jenkinsfile
pcaskey Nov 7, 2022
c89dd8a
mod Jenkinsfile, multi-stage
pcaskey Nov 7, 2022
67cc687
fix Jenkinsfile
pcaskey Nov 7, 2022
add71b2
Jenkins fix
pcaskey Nov 7, 2022
ed4d0cc
cleanup Jenkinsfile
pcaskey Nov 7, 2022
854c655
bugfix
pcaskey Nov 7, 2022
8c08252
bugfix again
pcaskey Nov 7, 2022
b0d1a69
tweak Jenkinsfile
pcaskey Nov 8, 2022
52bb6dd
attempt full-cycle test
pcaskey Nov 9, 2022
7b8a528
bugfix
pcaskey Nov 9, 2022
46d0400
fix test
pcaskey Nov 9, 2022
ee290d9
troubleshooting
pcaskey Nov 9, 2022
788e2a5
typo
pcaskey Nov 9, 2022
899fcb0
trblshtg
pcaskey Nov 9, 2022
27a056c
testing
pcaskey Nov 9, 2022
d70d3c3
more testing
pcaskey Nov 9, 2022
3f5ae46
test
pcaskey Nov 9, 2022
affdbff
back to bats
pcaskey Nov 10, 2022
959dd3d
revert
pcaskey Nov 10, 2022
f396d1f
remove new file desccriptors
pcaskey Nov 10, 2022
2fa2d5f
fix static sed command
pcaskey Nov 10, 2022
5de45d9
enable other tests
pcaskey Nov 11, 2022
418e956
chg script
pcaskey Nov 11, 2022
3880ff7
cleanup
pcaskey Nov 11, 2022
9fb83f1
add cleanup
pcaskey Nov 11, 2022
86b4cae
escape dollar signs
pcaskey Nov 11, 2022
f7d7e71
escape quotes
pcaskey Nov 11, 2022
c1b0686
fun with escaping in Jenkins
pcaskey Nov 11, 2022
965ca28
fix cleanup
pcaskey Nov 11, 2022
00413fa
Update Dockerfile
pcaskey Nov 17, 2022
ec3d5c7
bump java, tomcat
pcaskey Dec 14, 2022
f0806cd
bump IdP to 4.3.0 and tomcat to 9.0.71
pcaskey Jan 18, 2023
966148a
update scan command
pcaskey Jan 18, 2023
0437409
bugfix
pcaskey Jan 18, 2023
82a7bb9
another scan tweak
pcaskey Jan 18, 2023
abe361d
add JSTL
pcaskey Feb 9, 2023
47a7a78
bump tomcat, fix tests
pcaskey Mar 13, 2023
ca3c572
bump IdP to 4.3.1
pcaskey Mar 30, 2023
b6cf569
bump Tomcat to 9.0.75
pcaskey May 25, 2023
1731116
bump tomcat to 9.0.76
pcaskey Jul 6, 2023
199af3a
bump Tomcat to 9.0.79 and Rocky to 8.8
pcaskey Aug 18, 2023
7c8b9b5
bump tomcat
pcaskey Sep 15, 2023
9bff509
Update main.bats
pcaskey Sep 15, 2023
6a969b6
update tomcat
pcaskey Oct 12, 2023
9396f5c
bugfix
pcaskey Oct 12, 2023
b583c4c
bump tomcat to 9.0.83
pcaskey Nov 28, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .trivyignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Accept the risk
CVE-2016-1000027

87 changes: 24 additions & 63 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
FROM centos:centos7
FROM --platform=$TARGETPLATFORM rockylinux:8.8

########################
### VERSION SETTINGS ###
########################
#
##tomcat \
ENV TOMCAT_MAJOR=9 \
TOMCAT_VERSION=9.0.50 \
TOMCAT_VERSION=9.0.83 \
##shib-idp \
VERSION=4.1.4 \
VERSION=4.3.1 \
##TIER \
TIERVERSION=20210802 \
TIERVERSION=20231128_rocky8_multiarch \
#################### \
#### OTHER VARS #### \
#################### \
Expand Down Expand Up @@ -52,7 +52,7 @@ RUN ln -sf /usr/share/zoneinfo/UTC /etc/localtime \

# Install base deps
RUN rm -fr /var/cache/yum/* && yum clean all && yum -y update && yum -y install --setopt=tsflags=nodocs epel-release && \
yum -y install net-tools wget curl tar unzip mlocate logrotate strace telnet man unzip vim wget rsyslog cronie krb5-workstation openssl-devel wget supervisor fontconfig && \
yum -y install net-tools wget curl tar unzip mlocate logrotate strace telnet man unzip vim rsyslog cronie krb5-workstation openssl-devel supervisor fontconfig findutils && \
yum -y clean all && \
mkdir -p /opt/tier && \
# Install Trusted Certificates
Expand All @@ -69,54 +69,12 @@ RUN update-ca-trust extract
# To keep it commented, keep multiple comments on the following line (to prevent other scripts from processing it).
##### ENV TIER_BEACON_OPT_OUT True

# Install Corretto Java JDK
#Corretto download page: https://docs.aws.amazon.com/corretto/latest/corretto-11-ug/downloads-list.html
ARG CORRETTO_URL_PERM=https://corretto.aws/downloads/latest/amazon-corretto-11-x64-linux-jdk.rpm
ARG CORRETTO_RPM=amazon-corretto-11-x64-linux-jdk.rpm
COPY container_files/java-corretto/corretto-signing-key.pub .
RUN curl -O -L $CORRETTO_URL_PERM \
&& rpm --import corretto-signing-key.pub \
&& rpm -K $CORRETTO_RPM \
&& rpm -i $CORRETTO_RPM \
&& rm -r corretto-signing-key.pub $CORRETTO_RPM
# Install Corretto Java JDK (from Amazon repo, more arch independent)
RUN rpm --import https://yum.corretto.aws/corretto.key \
&& curl -L -o /etc/yum.repos.d/corretto.repo https://yum.corretto.aws/corretto.repo \
&& yum install -y java-11-amazon-corretto-devel
ENV JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto

# To use Zulu Java:
#RUN rpm --import http://repos.azulsystems.com/RPM-GPG-KEY-azulsystems \
# && curl -o /etc/yum.repos.d/zulu.repo http://repos.azulsystems.com/rhel/zulu.repo \
# && yum -y install zulu-8 && alternatives --install /usr/bin/java java $JAVA_HOME/bin/java 200000
#install Zulu JCE
#RUN curl -o /tmp/ZuluJCEPolicies.zip https://cdn.azul.com/zcek/bin/ZuluJCEPolicies.zip \
# && cd /tmp && unzip -oj ZuluJCEPolicies.zip ZuluJCEPolicies/local_policy.jar -d $JAVA_HOME/lib/jvm/zulu-8/jre/lib/security/ \
# && unzip -oj ZuluJCEPolicies.zip ZuluJCEPolicies/US_export_policy.jar -d $JAVA_HOME/lib/jvm/zulu-8/jre/lib/security/ \
# && rm -rf /tmp/ZuluJCEPolicies.zip
#ENV JAVA_HOME=/usr \

# To use Oracle java/JCE:
#
#ENV JAVA_VERSION=8u171 \
# BUILD_VERSION=b11 \
# JAVA_BUNDLE_ID=512cd62ec5174c3487ac17c61aaa89e8 \
#
# Uncomment the following commands to download the Oracle JDK to your Shibboleth IDP image.
# ==> By uncommenting these next 6 lines, you agree to the Oracle Binary Code License Agreement for Java SE (http://www.oracle.com/technetwork/java/javase/terms/license/index.html)
# RUN wget -nv --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/$JAVA_VERSION-$BUILD_VERSION/$JAVA_BUNDLE_ID/jdk-$JAVA_VERSION-linux-x64.rpm" -O /tmp/jdk-$JAVA_VERSION-$BUILD_VERSION-linux-x64.rpm && \
# yum -y install /tmp/jdk-$JAVA_VERSION-$BUILD_VERSION-linux-x64.rpm && \
# rm -f /tmp/jdk-$JAVA_VERSION-$BUILD_VERSION-linux-x64.rpm && \
# alternatives --install /usr/bin/java jar $JAVA_HOME/bin/java 200000 && \
# alternatives --install /usr/bin/javaws javaws $JAVA_HOME/bin/javaws 200000 && \
# alternatives --install /usr/bin/javac javac $JAVA_HOME/bin/javac 200000

# For Oracle Java, also uncomment the following commands to download the Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files.
# ==> By uncommenting these next 7 lines, you agree to the Oracle Binary Code License Agreement for Java SE Platform Products (http://www.oracle.com/technetwork/java/javase/terms/license/index.html)
# RUN wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" \
# http://download.oracle.com/otn-pub/java/jce/8/jce_policy-8.zip \
# && echo "f3020a3922efd6626c2fff45695d527f34a8020e938a49292561f18ad1320b59 jce_policy-8.zip" | sha256sum -c - \
# && unzip -oj jce_policy-8.zip UnlimitedJCEPolicyJDK8/local_policy.jar -d $JAVA_HOME/jre/lib/security/ \
# && unzip -oj jce_policy-8.zip UnlimitedJCEPolicyJDK8/US_export_policy.jar -d $JAVA_HOME/jre/lib/security/ \
# && rm jce_policy-8.zip \
# && chmod -R 640 $JAVA_HOME/jre/lib/security/

# Copy IdP installer properties file(s)
ADD container_files/idp/idp.installer.properties container_files/idp/idp.merge.properties container_files/idp/ldap.merge.properties /tmp/

Expand All @@ -142,27 +100,27 @@ RUN mkdir -p /tmp/shibboleth && cd /tmp/shibboleth && \

# Install tomcat
RUN mkdir -p "$CATALINA_HOME" && set -x \
&& wget -q -O $CATALINA_HOME/tomcat.tar.gz "$TOMCAT_TGZ_URL" \
&& wget -q -O $CATALINA_HOME/tomcat.tar.gz.asc "$TOMCAT_TGZ_URL.asc" \
&& wget -q -O $CATALINA_HOME/KEYS "https://www.apache.org/dist/tomcat/tomcat-$TOMCAT_MAJOR/KEYS" \
&& gpg --import $CATALINA_HOME/KEYS \
&& gpg $CATALINA_HOME/tomcat.tar.gz.asc \
&& curl -s -o $CATALINA_HOME/tomcat.tar.gz "$TOMCAT_TGZ_URL" \
&& curl -s -o $CATALINA_HOME/tomcat.tar.gz.asc "$TOMCAT_TGZ_URL.asc" \
&& curl -s -L -o $CATALINA_HOME/KEYS "https://www.apache.org/dist/tomcat/tomcat-$TOMCAT_MAJOR/KEYS" \
&& gpg --import $CATALINA_HOME/KEYS \
&& gpg $CATALINA_HOME/tomcat.tar.gz.asc \
&& gpg --batch --verify $CATALINA_HOME/tomcat.tar.gz.asc $CATALINA_HOME/tomcat.tar.gz \
&& tar -xvf $CATALINA_HOME/tomcat.tar.gz -C $CATALINA_HOME --strip-components=1 \
&& rm $CATALINA_HOME/bin/*.bat \
&& rm $CATALINA_HOME/tomcat.tar.gz* \
&& mkdir -p $CATALINA_HOME/conf/Catalina \
&& curl -o /usr/local/tomcat/lib/jstl1.2.jar https://build.shibboleth.net/nexus/service/local/repositories/thirdparty/content/javax/servlet/jstl/1.2/jstl-1.2.jar \
&& rm $CATALINA_HOME/tomcat.tar.gz*
RUN mkdir -p $CATALINA_HOME/conf/Catalina \
&& rm -rf /usr/local/tomcat/webapps/* \
&& ln -s /opt/shibboleth-idp/war/idp.war $CATALINA_HOME/webapps/idp.war


ADD container_files/tomcat/jstl-1.2.jar /usr/local/tomcat/lib/
ADD container_files/idp/idp.xml /usr/local/tomcat/conf/Catalina/idp.xml
ADD container_files/tomcat/server.xml /usr/local/tomcat/conf/server.xml

#use log4j for tomcat logging
ADD https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-core/2.11.0/log4j-core-2.11.0.jar /usr/local/tomcat/bin/
ADD https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-api/2.11.0/log4j-api-2.11.0.jar /usr/local/tomcat/bin/
ADD https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-jul/2.11.0/log4j-jul-2.11.0.jar /usr/local/tomcat/bin/
ADD https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-core/2.18.0/log4j-core-2.18.0.jar /usr/local/tomcat/bin/
ADD https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-api/2.18.0/log4j-api-2.18.0.jar /usr/local/tomcat/bin/
ADD https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-jul/2.18.0/log4j-jul-2.18.0.jar /usr/local/tomcat/bin/
RUN cd /usr/local/tomcat/; \
chmod +r bin/log4j-*.jar;
ADD container_files/tomcat/log4j2.xml /usr/local/tomcat/conf/
Expand All @@ -189,6 +147,9 @@ RUN mkdir -p /etc/supervisor/conf.d && chmod +x /opt/tier/setenv.sh \
#set cron to not require a login session
RUN sed -i '/session required pam_loginuid.so/c\#session required pam_loginuid.so' /etc/pam.d/crond

#upgrade pip to remove sec vuln
#RUN pip3 install --upgrade pip

# Expose the port tomcat will be serving on
EXPOSE 443

Expand Down
Loading