Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-4442

Property placeholder can't set sslContextParameters's keystore path in blueprint.xml

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • None
    • jboss-fuse-6.2
    • Camel, Security
    • None
    • % %
    • Hide

      1. create "dwecom.cfg" in Fuse_Home/etc and fill it with below properties:
      ~~~
      tls.keystore.file=/home/xxx/keystore
      tls.keystore.password=changeit
      tls.keymanager.password=changeit
      ~~~
      2. create an empty keystore file in folder "/home/xxx"
      3. start Fuse 6.2
      4. copy "tls-propertyplaceholder-blueprint.xml" into Fuse_Home/deploy folder.
      5. log message shows:
      ~~~
      2015-11-17 16:57:16,110 | ERROR | rint Extender: 3 | BlueprintCamelContext | ? ? | 204 - org.apache.camel.camel-blueprint - 2.15.1.redhat-620133 | Error occurred during starting Camel: CamelContext(outboundPoContext) due java.io.IOException: Could not open ${tls.keystore.file} as a file, class path resource, or URL.
      org.apache.camel.RuntimeCamelException: java.io.IOException: Could not open ${tls.keystore.file} as a file, class path resource, or URL.
      ~~~
      6. change keystore path from <keyStore resource="${tls.keystore.file}" to <keyStore resource="/home/xxx/keystore"
      7. log shows:
      ~~~
      2015-11-17 16:53:35,933 | ERROR | rint Extender: 2 | BlueprintCamelContext | ? ? | 204 - org.apache.camel.camel-blueprint - 2.15.1.redhat-620133 | Error occurred during starting Camel: CamelContext(outboundPoContext) due java.io.IOException: Invalid keystore format
      org.apache.camel.RuntimeCamelException: java.io.IOException: Invalid keystore format
      ~~~

      It seems that hard-corded path allows fuse to find keystore file.

      Show
      1. create "dwecom.cfg" in Fuse_Home/etc and fill it with below properties: ~~~ tls.keystore.file=/home/xxx/keystore tls.keystore.password=changeit tls.keymanager.password=changeit ~~~ 2. create an empty keystore file in folder "/home/xxx" 3. start Fuse 6.2 4. copy "tls-propertyplaceholder-blueprint.xml" into Fuse_Home/deploy folder. 5. log message shows: ~~~ 2015-11-17 16:57:16,110 | ERROR | rint Extender: 3 | BlueprintCamelContext | ? ? | 204 - org.apache.camel.camel-blueprint - 2.15.1.redhat-620133 | Error occurred during starting Camel: CamelContext(outboundPoContext) due java.io.IOException: Could not open ${tls.keystore.file} as a file, class path resource, or URL. org.apache.camel.RuntimeCamelException: java.io.IOException: Could not open ${tls.keystore.file} as a file, class path resource, or URL. ~~~ 6. change keystore path from <keyStore resource="${tls.keystore.file}" to <keyStore resource="/home/xxx/keystore" 7. log shows: ~~~ 2015-11-17 16:53:35,933 | ERROR | rint Extender: 2 | BlueprintCamelContext | ? ? | 204 - org.apache.camel.camel-blueprint - 2.15.1.redhat-620133 | Error occurred during starting Camel: CamelContext(outboundPoContext) due java.io.IOException: Invalid keystore format org.apache.camel.RuntimeCamelException: java.io.IOException: Invalid keystore format ~~~ It seems that hard-corded path allows fuse to find keystore file.

    Description

      Hard-coded keystore path works for blueprint.xml, but using property-placeholder which refer to the same string didn't:
      Works:
      ~~~~~~~~
      <keyStore resource="/home/xxx/keystore"
      ~~~~~~~~

      Not work:
      ~~~~~~~
      <cm:property-placeholder persistent-id="dwecom" update-strategy="none"/>
      ...
      <keyStore resource="${tls.keystore.file}"
      ~~~~~~~

      dwecom.cfg in Fuse_Home\etc:
      ~~~~~~~
      tls.keystore.file=/home/xxx/keystore
      ~~~~~~~

      Attachments

        Activity

          People

            gertv_jira Gert Vanthienen (Inactive)
            zhangxu1324_jira xu zhang (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: