You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by tcarlyle <tc...@gmail.com> on 2013/05/27 12:30:51 UTC

Problem when trying to start activemq after configuring password encryption

I have been able to run activemq before, but when I try to set it to use
encrypted passwords as per
http://activemq.apache.org/encrypted-passwords.html I cant get the broker to
run.

What I basically did was to replace

<bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="locations">
            <value>file:${activemq.conf}/credentials.properties</value>
        </property>
    </bean>

with


  <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.conf}/credentials-enc.properties"/> 
  </bean> 


But then instead of starting the broker, I get just the following log and no
more

2013-05-27 11:42:17,052 | INFO  | Refreshing
org.apache.activemq.xbean.XBeanBrokerFactory$1@1dd6a67: startup date [Mon
May 27 11:42:17 CEST 2013]; root of context hierarchy |
org.apache.activemq.xbean.XBeanBrokerFactory$1 | main
2013-05-27 11:42:18,406 | INFO  | Loading properties file from URL
[file:/opt/activemq/conf/credentials-enc.properties] |
org.jasypt.spring.properties.EncryptablePropertyPlaceholderConfigurer | main


Any idea of that I am doing wrong?



--
View this message in context: http://activemq.2283324.n4.nabble.com/Problem-when-trying-to-start-activemq-after-configuring-password-encryption-tp4667504.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Problem when trying to start activemq after configuring password encryption

Posted by Christian Posta <ch...@gmail.com>.
I just tried w/ your config... commented out the ssl connector and the
ssl/auth stuff since I don't have your keystores.. everything works fine on
5.8.0.
What exception are you getting to lead you to believe it's not working?




On Fri, Jun 21, 2013 at 4:41 AM, tcarlyle <tc...@gmail.com> wrote:

> Yeah, I am aware of that. I was trying to first get the broker to run with
> property encryption enabled to later on really encrypt the fields.
>
> On Thu, Jun 20, 2013 at 6:10 PM, orhanemre [via ActiveMQ] <
> ml-node+s2283324n4668424h25@n4.nabble.com> wrote:
>
> > This might not be related to your issue, but since you are doing
> > encryption, you should use encrypted passwords. In;
> >
> > <authenticationUser username="system" password="manager" ..
> >
> > change the password to its defined property name in
> > credentials-enc.properties like;
> >
> > ${system.password}
> >
> > ------------------------------
> >  If you reply to this email, your message will be added to the discussion
> > below:
> >
> >
> http://activemq.2283324.n4.nabble.com/Problem-when-trying-to-start-activemq-after-configuring-password-encryption-tp4667504p4668424.html
> >  To unsubscribe from Problem when trying to start activemq after
> > configuring password encryption, click here<
> http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4667504&code=dGNhcmx5bGVAZ21haWwuY29tfDQ2Njc1MDR8LTEyNzAzODc4MzU=
> >
> > .
> > NAML<
> http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> >
> >
>
>
>
> --
> ------------------------------------------------------
> Thomas Carlyle Minetto Vilarinho
>
> Flybilletter Billig kan finnes på: http://www.flybilletterbillig.com
>
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Problem-when-trying-to-start-activemq-after-configuring-password-encryption-tp4667504p4668443.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



-- 
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta

Re: Problem when trying to start activemq after configuring password encryption

Posted by tcarlyle <tc...@gmail.com>.
Yeah, I am aware of that. I was trying to first get the broker to run with
property encryption enabled to later on really encrypt the fields.

On Thu, Jun 20, 2013 at 6:10 PM, orhanemre [via ActiveMQ] <
ml-node+s2283324n4668424h25@n4.nabble.com> wrote:

> This might not be related to your issue, but since you are doing
> encryption, you should use encrypted passwords. In;
>
> <authenticationUser username="system" password="manager" ..
>
> change the password to its defined property name in
> credentials-enc.properties like;
>
> ${system.password}
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://activemq.2283324.n4.nabble.com/Problem-when-trying-to-start-activemq-after-configuring-password-encryption-tp4667504p4668424.html
>  To unsubscribe from Problem when trying to start activemq after
> configuring password encryption, click here<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4667504&code=dGNhcmx5bGVAZ21haWwuY29tfDQ2Njc1MDR8LTEyNzAzODc4MzU=>
> .
> NAML<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>



-- 
------------------------------------------------------
Thomas Carlyle Minetto Vilarinho

Flybilletter Billig kan finnes på: http://www.flybilletterbillig.com




--
View this message in context: http://activemq.2283324.n4.nabble.com/Problem-when-trying-to-start-activemq-after-configuring-password-encryption-tp4667504p4668443.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Problem when trying to start activemq after configuring password encryption

Posted by orhanemre <or...@yahoo.com>.
This might not be related to your issue, but since you are doing encryption,
you should use encrypted passwords. In;

<authenticationUser username="system" password="manager" ..

change the password to its defined property name in
credentials-enc.properties like;

${system.password}



--
View this message in context: http://activemq.2283324.n4.nabble.com/Problem-when-trying-to-start-activemq-after-configuring-password-encryption-tp4667504p4668424.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Problem when trying to start activemq after configuring password encryption

Posted by tcarlyle <tc...@gmail.com>.
Im using 5.8.0 and this config file: http://pastebin.com/d884ciiu
Would you mind taking a look at it and see if you spot any mistake I may
have made?

Thanks

On Tue, May 28, 2013 at 5:59 AM, ceposta [via ActiveMQ] <
ml-node+s2283324n4667525h56@n4.nabble.com> wrote:

> what version are you trying with?
> I just tried with 5.8.0 and it works fine.
>
>
> On Mon, May 27, 2013 at 7:12 AM, tcarlyle <[hidden email]<http://user/SendEmail.jtp?type=node&node=4667525&i=0>>
> wrote:
>
> > Btw, it works fine if I use the encryption with the password set in the
> > property as:
> >
> >         <bean id="configurationEncryptor"
> > class="org.jasypt.encryption.pbe.StandardPBEStringEncryptor">
> >           <property name="algorithm" value="PBEWithMD5AndDES"/>
> >           <property name="password" value="activemq"/>
> >         </bean>
> >
> > but still it doesnt work with the environmental variable, even if I can
> do
> > a
> > echo $ACTIVEMQ_ENCRYPTION_PASSWORD and get its proper value
> >
> >
> >
> > --
> > View this message in context:
> >
> http://activemq.2283324.n4.nabble.com/Problem-when-trying-to-start-activemq-after-configuring-password-encryption-tp4667504p4667509.html
> > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >
>
>
>
> --
> *Christian Posta*
> http://www.christianposta.com/blog
> twitter: @christianposta
>  http://www.christianposta.com/blog
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://activemq.2283324.n4.nabble.com/Problem-when-trying-to-start-activemq-after-configuring-password-encryption-tp4667504p4667525.html
>  To unsubscribe from Problem when trying to start activemq after
> configuring password encryption, click here<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4667504&code=dGNhcmx5bGVAZ21haWwuY29tfDQ2Njc1MDR8LTEyNzAzODc4MzU=>
> .
> NAML<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>



-- 
------------------------------------------------------
Thomas Carlyle Minetto Vilarinho

Flybilletter Billig kan finnes på: http://www.flybilletterbillig.com




--
View this message in context: http://activemq.2283324.n4.nabble.com/Problem-when-trying-to-start-activemq-after-configuring-password-encryption-tp4667504p4667528.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Problem when trying to start activemq after configuring password encryption

Posted by Christian Posta <ch...@gmail.com>.
what version are you trying with?
I just tried with 5.8.0 and it works fine.


On Mon, May 27, 2013 at 7:12 AM, tcarlyle <tc...@gmail.com> wrote:

> Btw, it works fine if I use the encryption with the password set in the
> property as:
>
>         <bean id="configurationEncryptor"
> class="org.jasypt.encryption.pbe.StandardPBEStringEncryptor">
>           <property name="algorithm" value="PBEWithMD5AndDES"/>
>           <property name="password" value="activemq"/>
>         </bean>
>
> but still it doesnt work with the environmental variable, even if I can do
> a
> echo $ACTIVEMQ_ENCRYPTION_PASSWORD and get its proper value
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Problem-when-trying-to-start-activemq-after-configuring-password-encryption-tp4667504p4667509.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



-- 
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta

Re: Problem when trying to start activemq after configuring password encryption

Posted by tcarlyle <tc...@gmail.com>.
Btw, it works fine if I use the encryption with the password set in the
property as:

	<bean id="configurationEncryptor"
class="org.jasypt.encryption.pbe.StandardPBEStringEncryptor">
	  <property name="algorithm" value="PBEWithMD5AndDES"/>
	  <property name="password" value="activemq"/>
	</bean>

but still it doesnt work with the environmental variable, even if I can do a
echo $ACTIVEMQ_ENCRYPTION_PASSWORD and get its proper value



--
View this message in context: http://activemq.2283324.n4.nabble.com/Problem-when-trying-to-start-activemq-after-configuring-password-encryption-tp4667504p4667509.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.