Skip to content

Commit

Permalink
fix: set permission for jans-auth.xml explicitly (#1315)
Browse files Browse the repository at this point in the history
* fix: set permission for jans-auth.xml explicitly

* fix: add permission for jans-config-api.xml

Co-authored-by: Mohammad Abudayyeh <47318409+moabu@users.noreply.github.com>
  • Loading branch information
iromli and moabu authored May 11, 2022
1 parent 90ddd04 commit 80f33a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docker-jans-auth-server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@ RUN mkdir -p ${JETTY_BASE}/jans-auth/custom/pages \

COPY certs /etc/certs
COPY jetty/jans-auth_web_resources.xml ${JETTY_BASE}/jans-auth/webapps/
COPY jetty/jans-auth.xml ${JETTY_BASE}/jans-auth/webapps/
COPY jetty/log4j2.xml ${JETTY_BASE}/jans-auth/resources/
COPY conf/*.tmpl /app/templates/
COPY scripts /app/scripts
Expand All @@ -242,6 +241,8 @@ RUN chmod +x /app/scripts/entrypoint.sh
# create non-root user
RUN adduser -s /bin/sh -D -G root -u 1000 jetty

COPY --chown=1000:0 jetty/jans-auth.xml ${JETTY_BASE}/jans-auth/webapps/

# adjust ownership and permission
RUN chmod -R g=u ${JETTY_BASE}/jans-auth/custom \
&& chmod -R g=u ${JETTY_BASE}/jans-auth/resources \
Expand Down
3 changes: 2 additions & 1 deletion docker-jans-config-api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ RUN mkdir -p /etc/certs \
${JETTY_BASE}/jans-config-api/logs

RUN touch /etc/hosts.back
COPY jetty/jans-config-api.xml ${JETTY_BASE}/jans-config-api/webapps/
COPY jetty/log4j2.xml ${JETTY_BASE}/jans-config-api/resources/
COPY conf/*.tmpl /app/templates/
COPY plugins /app/plugins
Expand All @@ -200,6 +199,8 @@ RUN chmod +x /app/scripts/entrypoint.sh
# create non-root user
RUN adduser -s /bin/sh -D -G root -u 1000 jetty

COPY --chown=1000:0 jetty/jans-config-api.xml ${JETTY_BASE}/jans-config-api/webapps/

# adjust ownership and permission
RUN chmod -R g=u ${JETTY_BASE}/jans-config-api/custom \
&& chmod -R g=u ${JETTY_BASE}/jans-config-api/resources \
Expand Down

0 comments on commit 80f33a2

Please sign in to comment.