activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From MillieretXavier <xaviermillie...@eaton.com>
Subject Using Encrypted Property Placeholders for ActiveMQ SSL passwords
Date Wed, 06 Dec 2017 07:30:16 GMT
Hi all,

I use activeMq 5.12.3 inside Karaf 3.0.7

I try to encrypt the password inside the sslcontext into activemq.xml
I follow several links, like:
http://activemq.apache.org/encrypted-passwords.html
a the RedHat's solution:
https://access.redhat.com/solutions/742423 
https://issues.jboss.org/secure/attachment/12389089/KBArticle-742423-for-Dejan.pdf

Inside this article, we can see:

<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.spring31.properties.EncryptablePropertyPlaceholderConfigurer"> 
    <constructor-arg ref="configurationEncryptor" /> 
    <property name="location"
value="file:${karaf.base}/etc/credentials-enc.properties"/> 
    <property name="properties">
        <bean class="org.fusesource.mq.fabric.ConfigurationProperties"/>
    </property>
</bean>

or 

class="org.jasypt.spring31.properties.EncryptablePropertyPlaceholderConfigurer"> 
    <constructor-arg ref="configurationEncryptor" /> 
    <property name="location"
value="file:${karaf.base}/etc/credentials-enc.properties"/> 
    <property name="properties">
        <bean class="io.fabric8.mq.fabric.ConfigurationProperties"/>
    </property>
</bean>


But I don't see this class inside springs31 or activeMq repository, I try to
put these dependencies 
<dependency>
    <groupId>io.fabric8.mq</groupId>
    <artifactId>mq-fabric</artifactId>
    <version>1.2.0.redhat-630310</version>
</dependency>
<dependency>
   <groupId>io.fabric8</groupId>
    <artifactId>fabric-api</artifactId>
   <version>1.2.0.redhat-630310</version>
</dependency>

but unfortunately, it's does not work, and without this 
<property name="properties">
   <bean class="org.fusesource.mq.fabric.ConfigurationProperties"/>
</property>

the password inside org.apache.activemq.spring.SpringSslContext class is not
decrypt. I put a break point inside, because no log are provided.

Here my credentials-enc.properties
......
mykeystore=${karaf.base}/etc/broker.ks
mytruststore=${karaf.base}/etc/client.ts
mypassword=password
........

So anybody has do this?

Thx for any help

Regards








--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Mime
View raw message