You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by de...@apache.org on 2010/09/03 12:15:32 UTC
svn commit: r992251 - in /activemq/trunk/assembly/src: release/conf/
release/webapps/admin/WEB-INF/ release/webapps/camel/WEB-INF/ sample-conf/
Author: dejanb
Date: Fri Sep 3 10:15:31 2010
New Revision: 992251
URL: http://svn.apache.org/viewvc?rev=992251&view=rev
Log:
https://issues.apache.org/activemq/browse/AMQ-2460 - improve encrypted passwords
Added:
activemq/trunk/assembly/src/release/conf/credentials-enc.properties
Modified:
activemq/trunk/assembly/src/release/conf/activemq.xml
activemq/trunk/assembly/src/release/conf/credentials.properties
activemq/trunk/assembly/src/release/webapps/admin/WEB-INF/webconsole-embedded.xml
activemq/trunk/assembly/src/release/webapps/camel/WEB-INF/applicationContext.xml
activemq/trunk/assembly/src/sample-conf/activemq-command.xml
activemq/trunk/assembly/src/sample-conf/activemq-demo.xml
activemq/trunk/assembly/src/sample-conf/activemq-dynamic-network-broker1.xml
activemq/trunk/assembly/src/sample-conf/activemq-dynamic-network-broker2.xml
activemq/trunk/assembly/src/sample-conf/activemq-jdbc.xml
activemq/trunk/assembly/src/sample-conf/activemq-scalability.xml
activemq/trunk/assembly/src/sample-conf/activemq-security.xml
activemq/trunk/assembly/src/sample-conf/activemq-static-network-broker1.xml
activemq/trunk/assembly/src/sample-conf/activemq-static-network-broker2.xml
activemq/trunk/assembly/src/sample-conf/activemq-stomp.xml
activemq/trunk/assembly/src/sample-conf/activemq-throughput.xml
Modified: activemq/trunk/assembly/src/release/conf/activemq.xml
URL: http://svn.apache.org/viewvc/activemq/trunk/assembly/src/release/conf/activemq.xml?rev=992251&r1=992250&r2=992251&view=diff
==============================================================================
--- activemq/trunk/assembly/src/release/conf/activemq.xml (original)
+++ activemq/trunk/assembly/src/release/conf/activemq.xml Fri Sep 3 10:15:31 2010
@@ -21,16 +21,12 @@
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
- <!-- Allows us to use encrypted system properties as variables in this configuration file -->
- <bean id="configurationEncryptor" class="org.jasypt.encryption.pbe.StandardPBEStringEncryptor">
- <property name="algorithm" value="PBEWithMD5AndDES"/>
- <property name="password" value="activemq"/>
- </bean>
-
- <bean id="propertyConfigurer" class="org.jasypt.spring.properties.EncryptablePropertyPlaceholderConfigurer">
- <constructor-arg ref="configurationEncryptor" />
- <property name="location" value="file:${activemq.base}/conf/credentials.properties"/>
- </bean>
+ <!-- Allows us to use system properties as variables in this configuration file -->
+ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+ <property name="locations">
+ <value>file:${activemq.base}/conf/credentials.properties</value>
+ </property>
+ </bean>
<!--
The <broker> element is used to configure the ActiveMQ broker.
Added: activemq/trunk/assembly/src/release/conf/credentials-enc.properties
URL: http://svn.apache.org/viewvc/activemq/trunk/assembly/src/release/conf/credentials-enc.properties?rev=992251&view=auto
==============================================================================
--- activemq/trunk/assembly/src/release/conf/credentials-enc.properties (added)
+++ activemq/trunk/assembly/src/release/conf/credentials-enc.properties Fri Sep 3 10:15:31 2010
@@ -0,0 +1,22 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements. See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License. You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+# Defines credentials that will be used by components (like web console) to access the broker
+
+activemq.username=system
+activemq.password=ENC(mYRkg+4Q4hua1kvpCCI2hg==)
+guest.password=ENC(Cf3Jf3tM+UrSOoaKU50od5CuBa8rxjoL)
\ No newline at end of file
Modified: activemq/trunk/assembly/src/release/conf/credentials.properties
URL: http://svn.apache.org/viewvc/activemq/trunk/assembly/src/release/conf/credentials.properties?rev=992251&r1=992250&r2=992251&view=diff
==============================================================================
--- activemq/trunk/assembly/src/release/conf/credentials.properties (original)
+++ activemq/trunk/assembly/src/release/conf/credentials.properties Fri Sep 3 10:15:31 2010
@@ -18,7 +18,5 @@
# Defines credentials that will be used by components (like web console) to access the broker
activemq.username=system
-#activemq.password=manager
-activemq.password=ENC(mYRkg+4Q4hua1kvpCCI2hg==)
-#guest.password=password
-guest.password=ENC(Cf3Jf3tM+UrSOoaKU50od5CuBa8rxjoL)
\ No newline at end of file
+activemq.password=manager
+guest.password=password
\ No newline at end of file
Modified: activemq/trunk/assembly/src/release/webapps/admin/WEB-INF/webconsole-embedded.xml
URL: http://svn.apache.org/viewvc/activemq/trunk/assembly/src/release/webapps/admin/WEB-INF/webconsole-embedded.xml?rev=992251&r1=992250&r2=992251&view=diff
==============================================================================
--- activemq/trunk/assembly/src/release/webapps/admin/WEB-INF/webconsole-embedded.xml (original)
+++ activemq/trunk/assembly/src/release/webapps/admin/WEB-INF/webconsole-embedded.xml Fri Sep 3 10:15:31 2010
@@ -21,15 +21,11 @@
<import resource="webconsole-query.xml"/>
- <!-- Allows us to use encrypted system properties as variables in this configuration file -->
- <bean id="configurationEncryptor" class="org.jasypt.encryption.pbe.StandardPBEStringEncryptor">
- <property name="algorithm" value="PBEWithMD5AndDES"/>
- <property name="password" value="activemq"/>
- </bean>
-
- <bean id="propertyConfigurer" class="org.jasypt.spring.properties.EncryptablePropertyPlaceholderConfigurer">
- <constructor-arg ref="configurationEncryptor" />
- <property name="location" value="file:${activemq.base}/conf/credentials.properties"/>
+ <!-- Allows us to use system properties as variables in this configuration file -->
+ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+ <property name="locations">
+ <value>file:${activemq.base}/conf/credentials.properties</value>
+ </property>
</bean>
<!-- use the following bean for a local in-JVM broker -->
Modified: activemq/trunk/assembly/src/release/webapps/camel/WEB-INF/applicationContext.xml
URL: http://svn.apache.org/viewvc/activemq/trunk/assembly/src/release/webapps/camel/WEB-INF/applicationContext.xml?rev=992251&r1=992250&r2=992251&view=diff
==============================================================================
--- activemq/trunk/assembly/src/release/webapps/camel/WEB-INF/applicationContext.xml (original)
+++ activemq/trunk/assembly/src/release/webapps/camel/WEB-INF/applicationContext.xml Fri Sep 3 10:15:31 2010
@@ -25,15 +25,11 @@
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
">
- <!-- Allows us to use encrypted system properties as variables in this configuration file -->
- <bean id="configurationEncryptor" class="org.jasypt.encryption.pbe.StandardPBEStringEncryptor">
- <property name="algorithm" value="PBEWithMD5AndDES"/>
- <property name="password" value="activemq"/>
- </bean>
-
- <bean id="propertyConfigurer" class="org.jasypt.spring.properties.EncryptablePropertyPlaceholderConfigurer">
- <constructor-arg ref="configurationEncryptor" />
- <property name="location" value="file:${activemq.base}/conf/credentials.properties"/>
+ <!-- Allows us to use system properties as variables in this configuration file -->
+ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+ <property name="locations">
+ <value>file:${activemq.base}/conf/credentials.properties</value>
+ </property>
</bean>
<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
Modified: activemq/trunk/assembly/src/sample-conf/activemq-command.xml
URL: http://svn.apache.org/viewvc/activemq/trunk/assembly/src/sample-conf/activemq-command.xml?rev=992251&r1=992250&r2=992251&view=diff
==============================================================================
--- activemq/trunk/assembly/src/sample-conf/activemq-command.xml (original)
+++ activemq/trunk/assembly/src/sample-conf/activemq-command.xml Fri Sep 3 10:15:31 2010
@@ -23,7 +23,7 @@
To run ActiveMQ with this configuration add xbean:conf/activemq-command.xml to your command
- e.g. $ bin/activemq xbean:conf/activemq-command.xml
+ e.g. $ bin/activemq console xbean:conf/activemq-command.xml
-->
<beans
xmlns="http://www.springframework.org/schema/beans"
Modified: activemq/trunk/assembly/src/sample-conf/activemq-demo.xml
URL: http://svn.apache.org/viewvc/activemq/trunk/assembly/src/sample-conf/activemq-demo.xml?rev=992251&r1=992250&r2=992251&view=diff
==============================================================================
--- activemq/trunk/assembly/src/sample-conf/activemq-demo.xml (original)
+++ activemq/trunk/assembly/src/sample-conf/activemq-demo.xml Fri Sep 3 10:15:31 2010
@@ -19,7 +19,7 @@
To run ActiveMQ with this configuration add xbean:conf/activemq-demo.xml to your command
- e.g. $ bin/activemq xbean:conf/activemq-demo.xml
+ e.g. $ bin/activemq console xbean:conf/activemq-demo.xml
-->
<beans
xmlns="http://www.springframework.org/schema/beans"
Modified: activemq/trunk/assembly/src/sample-conf/activemq-dynamic-network-broker1.xml
URL: http://svn.apache.org/viewvc/activemq/trunk/assembly/src/sample-conf/activemq-dynamic-network-broker1.xml?rev=992251&r1=992250&r2=992251&view=diff
==============================================================================
--- activemq/trunk/assembly/src/sample-conf/activemq-dynamic-network-broker1.xml (original)
+++ activemq/trunk/assembly/src/sample-conf/activemq-dynamic-network-broker1.xml Fri Sep 3 10:15:31 2010
@@ -22,11 +22,11 @@
To run this example network of ActiveMQ brokers run
- $ bin/activemq xbean:conf/activemq-dynamic-network-broker1.xml
+ $ bin/activemq console xbean:conf/activemq-dynamic-network-broker1.xml
and
- $ bin/activemq xbean:conf/activemq-dynamic-network-broker2.xml
+ $ bin/activemq console xbean:conf/activemq-dynamic-network-broker2.xml
in separate consoles
-->
Modified: activemq/trunk/assembly/src/sample-conf/activemq-dynamic-network-broker2.xml
URL: http://svn.apache.org/viewvc/activemq/trunk/assembly/src/sample-conf/activemq-dynamic-network-broker2.xml?rev=992251&r1=992250&r2=992251&view=diff
==============================================================================
--- activemq/trunk/assembly/src/sample-conf/activemq-dynamic-network-broker2.xml (original)
+++ activemq/trunk/assembly/src/sample-conf/activemq-dynamic-network-broker2.xml Fri Sep 3 10:15:31 2010
@@ -22,11 +22,11 @@
To run this example network of ActiveMQ brokers run
- $ bin/activemq xbean:conf/activemq-dynamic-network-broker1.xml
+ $ bin/activemq console xbean:conf/activemq-dynamic-network-broker1.xml
and
- $ bin/activemq xbean:conf/activemq-dynamic-network-broker2.xml
+ $ bin/activemq console xbean:conf/activemq-dynamic-network-broker2.xml
in separate consoles
-->
Modified: activemq/trunk/assembly/src/sample-conf/activemq-jdbc.xml
URL: http://svn.apache.org/viewvc/activemq/trunk/assembly/src/sample-conf/activemq-jdbc.xml?rev=992251&r1=992250&r2=992251&view=diff
==============================================================================
--- activemq/trunk/assembly/src/sample-conf/activemq-jdbc.xml (original)
+++ activemq/trunk/assembly/src/sample-conf/activemq-jdbc.xml Fri Sep 3 10:15:31 2010
@@ -26,7 +26,7 @@
To run ActiveMQ with this configuration add xbean:conf/activemq-jdbc.xml to your command
- e.g. $ bin/activemq xbean:conf/activemq-jdbc.xml
+ e.g. $ bin/activemq console xbean:conf/activemq-jdbc.xml
-->
<beans
xmlns="http://www.springframework.org/schema/beans"
Modified: activemq/trunk/assembly/src/sample-conf/activemq-scalability.xml
URL: http://svn.apache.org/viewvc/activemq/trunk/assembly/src/sample-conf/activemq-scalability.xml?rev=992251&r1=992250&r2=992251&view=diff
==============================================================================
--- activemq/trunk/assembly/src/sample-conf/activemq-scalability.xml (original)
+++ activemq/trunk/assembly/src/sample-conf/activemq-scalability.xml Fri Sep 3 10:15:31 2010
@@ -27,7 +27,7 @@
e.g. ACTIVEMQ_OPTS="-Xmx1024M -Dorg.apache.activemq.UseDedicatedTaskRunner=false"
To run ActiveMQ with this configuration add xbean:conf/activemq-scalability.xml to your command
- e.g. $ bin/activemq xbean:conf/activemq-scalability.xml
+ e.g. $ bin/activemq console xbean:conf/activemq-scalability.xml
-->
<beans
xmlns="http://www.springframework.org/schema/beans"
Modified: activemq/trunk/assembly/src/sample-conf/activemq-security.xml
URL: http://svn.apache.org/viewvc/activemq/trunk/assembly/src/sample-conf/activemq-security.xml?rev=992251&r1=992250&r2=992251&view=diff
==============================================================================
--- activemq/trunk/assembly/src/sample-conf/activemq-security.xml (original)
+++ activemq/trunk/assembly/src/sample-conf/activemq-security.xml Fri Sep 3 10:15:31 2010
@@ -21,9 +21,13 @@
http://activemq.apache.org/security.html
+ Beofre you can run this configuration, you need to set ACTIVEMQ_ENCRYPTION_PASSWORD environment variable, like
+
+ $ export ACTIVEMQ_ENCRYPTION_PASSWORD=activemq
+
To run ActiveMQ with this configuration add xbean:conf/activemq-security.xml to your command
- e.g. $ bin/activemq xbean:conf/activemq-security.xml
+ e.g. $ bin/activemq console xbean:conf/activemq-security.xml
-->
<beans
xmlns="http://www.springframework.org/schema/beans"
@@ -33,14 +37,18 @@
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
<!-- Allows us to use encrypted system properties as variables in this configuration file -->
- <bean id="configurationEncryptor" class="org.jasypt.encryption.pbe.StandardPBEStringEncryptor">
- <property name="algorithm" value="PBEWithMD5AndDES"/>
- <property name="password" value="activemq"/>
- </bean>
+ <bean id="environmentVariablesConfiguration" class="org.jasypt.encryption.pbe.config.EnvironmentStringPBEConfig">
+ <property name="algorithm" value="PBEWithMD5AndDES" />
+ <property name="passwordEnvName" value="ACTIVEMQ_ENCRYPTION_PASSWORD" />
+ </bean>
+
+ <bean id="configurationEncryptor" class="org.jasypt.encryption.pbe.StandardPBEStringEncryptor">
+ <property name="config" ref="environmentVariablesConfiguration" />
+ </bean>
<bean id="propertyConfigurer" class="org.jasypt.spring.properties.EncryptablePropertyPlaceholderConfigurer">
<constructor-arg ref="configurationEncryptor" />
- <property name="location" value="file:${activemq.base}/conf/credentials.properties"/>
+ <property name="location" value="file:${activemq.base}/conf/credentials-enc.properties"/>
</bean>
<broker useJmx="true" persistent="false" xmlns="http://activemq.apache.org/schema/core" destroyApplicationContextOnStop="true">
Modified: activemq/trunk/assembly/src/sample-conf/activemq-static-network-broker1.xml
URL: http://svn.apache.org/viewvc/activemq/trunk/assembly/src/sample-conf/activemq-static-network-broker1.xml?rev=992251&r1=992250&r2=992251&view=diff
==============================================================================
--- activemq/trunk/assembly/src/sample-conf/activemq-static-network-broker1.xml (original)
+++ activemq/trunk/assembly/src/sample-conf/activemq-static-network-broker1.xml Fri Sep 3 10:15:31 2010
@@ -22,11 +22,11 @@
To run this example network of ActiveMQ brokers run
- $ bin/activemq xbean:conf/activemq-static-network-broker1.xml
+ $ bin/activemq console xbean:conf/activemq-static-network-broker1.xml
and
- $ bin/activemq xbean:conf/activemq-static-network-broker2.xml
+ $ bin/activemq console xbean:conf/activemq-static-network-broker2.xml
in separate consoles
-->
Modified: activemq/trunk/assembly/src/sample-conf/activemq-static-network-broker2.xml
URL: http://svn.apache.org/viewvc/activemq/trunk/assembly/src/sample-conf/activemq-static-network-broker2.xml?rev=992251&r1=992250&r2=992251&view=diff
==============================================================================
--- activemq/trunk/assembly/src/sample-conf/activemq-static-network-broker2.xml (original)
+++ activemq/trunk/assembly/src/sample-conf/activemq-static-network-broker2.xml Fri Sep 3 10:15:31 2010
@@ -22,11 +22,11 @@
To run this example network of ActiveMQ brokers run
- $ bin/activemq xbean:conf/activemq-static-network-broker1.xml
+ $ bin/activemq console xbean:conf/activemq-static-network-broker1.xml
and
- $ bin/activemq xbean:conf/activemq-static-network-broker2.xml
+ $ bin/activemq console xbean:conf/activemq-static-network-broker2.xml
in separate consoles
-->
Modified: activemq/trunk/assembly/src/sample-conf/activemq-stomp.xml
URL: http://svn.apache.org/viewvc/activemq/trunk/assembly/src/sample-conf/activemq-stomp.xml?rev=992251&r1=992250&r2=992251&view=diff
==============================================================================
--- activemq/trunk/assembly/src/sample-conf/activemq-stomp.xml (original)
+++ activemq/trunk/assembly/src/sample-conf/activemq-stomp.xml Fri Sep 3 10:15:31 2010
@@ -25,7 +25,7 @@
e.g. ACTIVEMQ_OPTS="-Xmx1024M -Dorg.apache.activemq.UseDedicatedTaskRunner=false"
To run ActiveMQ with this configuration add xbean:conf/activemq-stomp.xml to your command
- e.g. $ bin/activemq xbean:conf/activemq-stomp.xml
+ e.g. $ bin/activemq console xbean:conf/activemq-stomp.xml
-->
<beans
xmlns="http://www.springframework.org/schema/beans"
Modified: activemq/trunk/assembly/src/sample-conf/activemq-throughput.xml
URL: http://svn.apache.org/viewvc/activemq/trunk/assembly/src/sample-conf/activemq-throughput.xml?rev=992251&r1=992250&r2=992251&view=diff
==============================================================================
--- activemq/trunk/assembly/src/sample-conf/activemq-throughput.xml (original)
+++ activemq/trunk/assembly/src/sample-conf/activemq-throughput.xml Fri Sep 3 10:15:31 2010
@@ -20,6 +20,9 @@
For more information, see:
http://activemq.apache.org/performance-tuning.html
+
+ To run ActiveMQ with this configuration add xbean:conf/activemq-throughput.xml to your command
+ e.g. $ bin/activemq console xbean:conf/activemq-throughput.xml
-->
<beans
xmlns="http://www.springframework.org/schema/beans"