alxgomz commented on code in PR #1378: URL: https://github.com/apache/activemq/pull/1378#discussion_r1948676068
########## assembly/src/docker/Dockerfile: ########## @@ -15,31 +15,87 @@ # See the License for the specific language governing permissions and # limitations under the License. ################################################################################ +FROM debian:bookworm-slim AS amq_tpl +# activemq_dist can point to a directory or a tarball on the local system +ARG activemq_dist=NOT_SET +ARG ACTIVEMQ_WEB_DEFAULT_USER=admin +ARG ACTIVEMQ_WEB_DEFAULT_PASSWORD=admin + +ENV DEBIAN_FRONTEND=noninteractive + +# Prepare ActiveMQ distribution +ADD $activemq_dist / + +RUN mv /apache-activemq-* /apache-activemq +WORKDIR /apache-activemq +RUN apt-get update && apt-get install xmlstarlet -y +RUN xmlstarlet ed -L \ + -N d='http://www.springframework.org/schema/beans' \ + -N a='http://activemq.apache.org/schema/core' \ + -d '//comment()' \ + -s '/d:beans/a:broker' -t elem -n plugins \ + -s '/d:beans/a:broker/plugins' -t elem -n simpleAuthenticationPlugin \ + -s '/d:beans/a:broker/plugins/simpleAuthenticationPlugin' -t elem -n users \ + -a '/d:beans/a:broker/plugins/simpleAuthenticationPlugin' -t attr -name anonymousAccessAllowed -v true \ Review Comment: Agreed. I first tried to make it point to another env var but it did not work and I concluded the plugin attribute `anonymousAccessAllowed` is simply not looked up from the java system properties unlike `authenticationUser` attribute (e.g. `username` or `password`). Given the default behavior of the exisitng image was already to come up with anonymous access enabled (one has to provide `$ACTIVEMQ_CONNECTION_USER` to disable it), I've decided to let anonymous access enabled b default as well. I personally have no problem with setting it to false b default instead, unless there's a way to make the plugin initialization lookup a java system property for `anonymousAccessAllowed`? -- 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. To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org For additional commands, e-mail: gitbox-h...@activemq.apache.org For further information, visit: https://activemq.apache.org/contact