You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@guacamole.apache.org by GitBox <gi...@apache.org> on 2020/01/30 17:46:19 UTC

[GitHub] [guacamole-client] mike-jumper commented on a change in pull request #469: GUACAMOLE-890: Security: Allow image to run as non-root user

mike-jumper commented on a change in pull request #469: GUACAMOLE-890: Security: Allow image to run as non-root user
URL: https://github.com/apache/guacamole-client/pull/469#discussion_r373093991
 
 

 ##########
 File path: Dockerfile
 ##########
 @@ -56,6 +56,14 @@ WORKDIR /opt/guacamole
 # Copy artifacts from builder image into this image
 COPY --from=builder /opt/guacamole/ .
 
+# Turn on the Remote IP Valve
+RUN sed -i 's+^\(      </Host>\)+        <Valve className="org.apache.catalina.valves.RemoteIpValve" />\n\1+' /usr/local/tomcat/conf/server.xml
 
 Review comment:
   This looks like it might prove fragile, being both a regex parsing XML and a regex which is sensitive to changes in indentation. Perhaps there is a way to do this which is either aware of XML structure or aware of some degree of context? Applying a patch to `server.xml` might be an easy and more rigorous solution, if there isn't a good alternative that is XML-aware.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services