Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-2812

DefaultPropertyReplacer + PropertyResolver is broken for vault expressions

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 8.0.0.Final
    • 8.0.0.CR1
    • EE
    • None
    • Hide

      Steps to Reproduce:
      1. Create vault with test::queue property:

      mkdir standalone/configuration/vault

      keytool -genseckey -alias vault -storetype jceks -keyalg AES -keysize 128 -storepass password -keypass password -keystore standalone/configuration/vault/vault.keystore

      bin/vault.sh -k standalone/configuration/vault/vault.keystore -p password -s saltsalt -v vault -i 44 -e standalone/configuration/vault/ -b test -a queue -x /queue/HELLOWORLDMDBQueue

      2. modify standalone-full.xml, adding the results of vault.sh
      3. modify standalone-full.xml, setting spec-descriptor-property-replacement to true

      4. build and deploy sample war with mdb (based on helloworld-mdb quickstart)

      Actual results:

      Could log messages complaining that it can't find the queue:
      17:00:22,108 INFO [org.hornetq.ra] (default-threads - 2) HQ151000: awaiting topic/queue creation :test::queue::1
      17:00:24,109 INFO [org.hornetq.ra] (default-threads - 2) HQ151001: Attempting to reconnect org.hornetq.ra.inflow.HornetQActivationSpec(ra=org.hornetq.ra.HornetQResourceAdapter@371c02e5 destination=:test::queue::1 destinationType=javax.jms.Queue ack=Auto-acknowledge durable=false clientID=null user=null maxSession=15)

      Show
      Steps to Reproduce: 1. Create vault with test::queue property: mkdir standalone/configuration/vault keytool -genseckey -alias vault -storetype jceks -keyalg AES -keysize 128 -storepass password -keypass password -keystore standalone/configuration/vault/vault.keystore bin/vault.sh -k standalone/configuration/vault/vault.keystore -p password -s saltsalt -v vault -i 44 -e standalone/configuration/vault/ -b test -a queue -x /queue/HELLOWORLDMDBQueue 2. modify standalone-full.xml, adding the results of vault.sh 3. modify standalone-full.xml, setting spec-descriptor-property-replacement to true 4. build and deploy sample war with mdb (based on helloworld-mdb quickstart) Actual results: Could log messages complaining that it can't find the queue: 17:00:22,108 INFO [org.hornetq.ra] (default-threads - 2) HQ151000: awaiting topic/queue creation :test::queue::1 17:00:24,109 INFO [org.hornetq.ra] (default-threads - 2) HQ151001: Attempting to reconnect org.hornetq.ra.inflow.HornetQActivationSpec(ra=org.hornetq.ra.HornetQResourceAdapter@371c02e5 destination=:test::queue::1 destinationType=javax.jms.Queue ack=Auto-acknowledge durable=false clientID=null user=null maxSession=15)

    Description

      The DefaultPropertyReplacer + PropertyResolver algorithm is broken for vault expressions. It's based on the assumption that the contents of the expression string between "$

      {" and "}

      " have a fixed format a la the old JBoss AS system properties (e.g. propertyname[: default value]) and then the PropertyResolver tries to resolve "propertyname".

      This is incorrect in the case of vault expressions, which do not follow this format. In particular the ":" char appears multiple places in a vault expression and does not serve as a delimiter between "propertyname" and "default value".

      Attachments

        Issue Links

          Activity

            People

              bstansbe@redhat.com Brian Stansberry
              rhn-support-cdolphy Chris Dolphy
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: