CLOUDSTACK-5879: added encrypted values Signed-off-by: Pierre-Luc Dion <pdion...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack-docs-admin/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-docs-admin/commit/0c75dcc0 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-docs-admin/tree/0c75dcc0 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-docs-admin/diff/0c75dcc0 Branch: refs/heads/4.4 Commit: 0c75dcc044873f4c1fee604670616b82d7aff001 Parents: e0bbecb Author: Erik Weber <terbol...@gmail.com> Authored: Tue Aug 19 20:32:11 2014 +0200 Committer: Pierre-Luc Dion <pdion...@apache.org> Committed: Tue Aug 19 20:20:57 2014 -0400 ---------------------------------------------------------------------- source/events.rst | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack-docs-admin/blob/0c75dcc0/source/events.rst ---------------------------------------------------------------------- diff --git a/source/events.rst b/source/events.rst index d500a5c..273435e 100644 --- a/source/events.rst +++ b/source/events.rst @@ -141,6 +141,59 @@ changes can control the behaviour. The ``eventNotificationBus`` bean represents the ``org.apache.cloudstack.mom.rabbitmq.RabbitMQEventBus`` class. + + If you want to use encrypted values for the username and password, you have to include a bean to pass those + as variables from a credentials file. + + A sample is given below + + .. code:: bash + + <beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:context="http://www.springframework.org/schema/context" + xmlns:aop="http://www.springframework.org/schema/aop" + xsi:schemaLocation="http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans-3.0.xsd + http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd + http://www.springframework.org/schema/context + http://www.springframework.org/schema/context/spring-context-3.0.xsd" + > + + <bean id="eventNotificationBus" class="org.apache.cloudstack.mom.rabbitmq.RabbitMQEventBus"> + <property name="name" value="eventNotificationBus"/> + <property name="server" value="127.0.0.1"/> + <property name="port" value="5672"/> + <property name="username" value="${username}"/> + <property name="password" value="${password}"/> + <property name="exchange" value="cloudstack-events"/> + </bean> + + <bean id="environmentVariablesConfiguration" class="org.jasypt.encryption.pbe.config.EnvironmentStringPBEConfig"> + <property name="algorithm" value="PBEWithMD5AndDES" /> + <property name="passwordEnvName" value="APP_ENCRYPTION_PASSWORD" /> + </bean> + + <bean id="configurationEncryptor" class="org.jasypt.encryption.pbe.StandardPBEStringEncryptor"> + <property name="config" ref="environmentVariablesConfiguration" /> + </bean> + + <bean id="propertyConfigurer" class="org.jasypt.spring3.properties.EncryptablePropertyPlaceholderConfigurer"> + <constructor-arg ref="configurationEncryptor" /> + <property name="location" value="classpath:/cred.properties" /> + </bean> + </beans> + + + Create a new file in the same folder called ``cred.properties`` and the specify the values for username and password as jascrypt encrypted strings + + Sample, with ``guest`` as values for both fields: + + .. code:: bash + + username=nh2XrM7jWHMG4VQK18iiBQ== + password=nh2XrM7jWHMG4VQK18iiBQ== + #. Restart the Management Server.