Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OP-22232: Write permit for conf directory #498

Open
wants to merge 4 commits into
base: v4.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 3 additions & 2 deletions docker_build/Dockerfile.prod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ RUN adduser opsmx \
&& usermod -aG wheel opsmx \
&& mkdir -p /opsmx/workdir/logs \
&& mkdir -p /opt/spinnaker/config \
&& mkdir -p /opt/spinnaker/plugins
&& mkdir -p /opt/spinnaker/plugins \
&& mkdir -p /opsmx/conf

# Install procps(ps)
RUN yum install -y wget
Expand Down Expand Up @@ -43,7 +44,7 @@ RUN sed -i 's/"VERIFICATION_SHASUM"/'\""$(sha512sum /opt/spinnaker/plugins/Verif
COPY /gate-web/build/install/gate /opsmx/workdir/gate
# Copy jaeger jar
COPY /jaeger/opentelemetry-javaagent.jar /${WORK_DIR}/jaeger/opentelemetry-javaagent.jar
RUN chown -R opsmx:root ${WORK_DIR}/* /opt/* && chmod 777 /opt/* ${WORK_DIR}/*
RUN chown -R opsmx:root ${WORK_DIR}/* /opt/* ${CONF_DIR} && chmod 777 /opt/* ${WORK_DIR}/* ${CONF_DIR}

# === Start Gate Service ===
USER opsmx
Expand Down
6 changes: 4 additions & 2 deletions docker_build/Dockerfile.rhel8-ubi8
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ RUN adduser opsmx \
&& mkdir -p /opsmx/workdir/logs \
&& mkdir -p /opt/spinnaker/config \
&& mkdir -p /opt/spinnaker/plugins \
&& mkdir -p /opt/gate/plugins
&& mkdir -p /opt/gate/plugins \
&& mkdir -p /opsmx/conf

# Install procps(ps)
RUN yum install -y procps nginx net-tools wget
Expand All @@ -28,6 +29,7 @@ RUN yum -y update

#######Gate Dependencies#########
ENV WORK_DIR=/opsmx/workdir
ENV CONF_DIR=/opsmx/conf
ENV JAVA_HOME=/usr/lib/jvm/jre-17-openjdk
COPY /docker_build/run.sh /usr/local/bin/run.sh
RUN chmod +x /usr/local/bin/run.sh
Expand Down Expand Up @@ -58,7 +60,7 @@ RUN sed -i 's/"VERIFICATION_SHASUM"/'\""$(sha512sum /opt/spinnaker/plugins/Verif
COPY /gate-web/build/install/gate /opsmx/workdir/gate
# Copy jaeger jar
COPY /jaeger/opentelemetry-javaagent.jar /${WORK_DIR}/jaeger/opentelemetry-javaagent.jar
RUN chown -R opsmx:root ${WORK_DIR}/* /opt/* && chmod 777 /opt/* ${WORK_DIR}/*
RUN chown -R opsmx:root ${WORK_DIR}/* /opt/* ${CONF_DIR} && chmod 777 /opt/* ${WORK_DIR}/* ${CONF_DIR}

# === Start Gate Service ===
USER opsmx
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,18 @@ public PostConnectionConfiguringJedisConnectionFactory(

log.info("Certificate has been added to the KeyStore successfully.");
} catch (Exception e) {
log.error("Error in creating jks file: ", e);
throw e;
} finally {
certInputStream.close();
jksOutputStream.close();
if (certInputStream != null) {
certInputStream.close();
}
if (jksOutputStream != null) {
jksOutputStream.close();
}
}

System.setProperty("javax.net.ssl.trustStore", "/opsmx/conf/redis-truststore.jks");
System.setProperty("javax.net.ssl.trustStore", jksFilePath);
System.setProperty("javax.net.ssl.trustStorePassword", this.password);
}
}
Expand Down
Loading