This is an automated email from the ASF dual-hosted git repository.
jbonofre pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq.git
The following commit(s) were added to refs/heads/main by this push:
new d69ae1f19f fix(#1776): honor ACTIVEMQ_WEB_USER variable (#1767)
d69ae1f19f is described below
commit d69ae1f19f801de0d84cb8f9a3f7da592b0efd77
Author: Jean-Louis Monteiro <[email protected]>
AuthorDate: Fri Mar 13 15:42:12 2026 +0100
fix(#1776): honor ACTIVEMQ_WEB_USER variable (#1767)
---
assembly/src/docker/entrypoint.sh | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/assembly/src/docker/entrypoint.sh
b/assembly/src/docker/entrypoint.sh
index e7110e5c59..143abbee89 100755
--- a/assembly/src/docker/entrypoint.sh
+++ b/assembly/src/docker/entrypoint.sh
@@ -71,10 +71,18 @@ fi
# WebConsole security
if [ -n "${ACTIVEMQ_WEB_USER}" ]; then
- echo "Enabling ActiveMQ WebConsole security"
- sed -i s/admin=/${ACTIVEMQ_WEB_USER}=/g
${ACTIVEMQ_HOME}/conf/users.properties
- if [ -n "${ACTIVEMQ_WEB_PASSWORD}" ]; then
- sed -i s/=admin/=${ACTIVEMQ_WEB_PASSWORD}/g
${ACTIVEMQ_HOME}/conf/users.properties
+ if [ -f "${ACTIVEMQ_HOME}/conf/webconsole.security.enabled" ]; then
+ echo "ActiveMQ WebConsole Security already enabled"
+ else
+ echo "Enabling ActiveMQ WebConsole security"
+ sed -i "s/admin=/${ACTIVEMQ_WEB_USER}=/g"
${ACTIVEMQ_HOME}/conf/users.properties
+ if [ -n "${ACTIVEMQ_WEB_PASSWORD}" ]; then
+ sed -i "s/=admin/=${ACTIVEMQ_WEB_PASSWORD}/g"
${ACTIVEMQ_HOME}/conf/users.properties
+ fi
+ # Update groups.properties so the new user is a member of the admins group
+ # (required by jetty.xml adminSecurityConstraint which expects the
'admins' role)
+ sed -i "s/admins=admin/admins=${ACTIVEMQ_WEB_USER}/"
${ACTIVEMQ_HOME}/conf/groups.properties
+ touch "${ACTIVEMQ_HOME}/conf/webconsole.security.enabled"
fi
fi
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact