0 Replies Latest reply on May 10, 2017 6:20 AM by sarada.ch

    Jasypt encryption

    sarada.ch

      Hi All,

       

      I am trying to add encryption in properties file, The content is not getting decrypt

       

      My Spring DSL looks like:

       

      <bean id="jasypt" class="org.apache.camel.component.jasypt.JasyptPropertiesParser">

          <property name="password" value="test"/>

          <property name="algorithm" value="PBEWithMD5AndDES"/>

      </bean>

       

      <!-- define the camel properties component -->

      <bean id="properties" class="org.apache.camel.component.properties.PropertiesComponent">

          <!-- the properties file is in the classpath -->

          <property name="location" value="classpath:my-properties.properties"/>

          <!-- and let it leverage the jasypt parser -->

          <property name="propertiesParser" ref="jasypt"/>

      </bean>

       

      <bean class="org.apache.activemq.ActiveMQConnectionFactory" id="jmsFactory">

              <property name="brokerURL" value="tcp://localhost:61616"/>

              <property name="userName" value="${jboss.fuse.username}"/>

              <property name="password" value="${jboss.fuse.password}"/>

      </bean>

       

      my-properties.properties

      jboss.fuse.username=ENC(D0hnlLDZfGPiC6DtU+NKog==)

      jboss.fuse.password=ENC(D0hnlLDZfGPiC6DtU+NKog==)

       

      Error message : java.lang.SecurityException: User name [ENC(D0hnlLDZfGPiC6DtU+NKog==)] or password is invalid.