BlueprintPropertiesParser doesn't handle the Blueprint Encryption: EncryptionOperationNotPossibleException

Solution In Progress - Updated -

Issue

I am using encryption in 6.1 in my blueprint.xml. It worked in 6.0, but when I was trying to run it in 6.1, I got an org.jasypt.exceptions.EncryptionOperationNotPossibleException.

Here is my blueprint xml:

<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
        xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
        xmlns:enc="http://karaf.apache.org/xmlns/jasypt/v1.0.0" 
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd                                 
          http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0  http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.0.0.xsd
          http://karaf.apache.org/xmlns/jasypt/v1.0.0 http://karaf.apache.org/xmlns/jasypt/v1.0.0">

    <cm:property-placeholder persistent-id="com.mycompany.configuration" />

    <enc:property-placeholder>
        <enc:encryptor class="org.jasypt.encryption.pbe.StandardPBEStringEncryptor">
            <property name="password" value="${encryptor.password.master}" />
        </enc:encryptor>
    </enc:property-placeholder>

    <!-- Testing encrypted password by injecting into a bean -->
    <bean id="testBean" class="com.mycompany.test.MyBean" init-method="init">
        <property name="encryptedPass" value="${com.mycompany.encrypted.password}" />
    </bean>

    <!-- Testing Configuration injecting into camel -->
    <camelContext id="camelContext" xmlns="http://camel.apache.org/schema/blueprint">
        <route>
            <from uri="timer:test" />
            <log logName="testLog" message="{{com.mycompany.test}}" loggingLevel="ERROR" />
        </route>
    </camelContext>
</blueprint>

Where in my "etc/com.mycompany.configuration.cfg" file, I have following properties set:

encryptor.password.master=thePass
com.mycompany.encrypted.password=ENC(CfAMzwtRpr3qO9CNqOHOVw==)
com.mycompany.test=cameltest

Obviously, the property placeholder "com.mycompany.test" is a non-encrypted plain value but the blueprint throws an "org.jasypt.exceptions.EncryptionOperationNotPossibleException" anyway when deployed to JBoss Fuse 6.1 container.

Environment

  • JBoss Fuse
    • 6.1

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.