Uploaded image for project: 'AMQ Broker'
  1. AMQ Broker
  2. ENTMQBR-5183

FileConfigurationParser Does Not Handle Encrypted / Masked data-source-properties

XMLWordPrintable

      The new JDBC reconnect capability introduce with ARTEMIS-2823 / ENTMQBR-2986 does not support encrypted properties within the data-source-properties element:

            if (parameterExists(storeNode, "data-source-properties")) {
               NodeList propertyNodeList = storeNode.getElementsByTagName("data-source-property");
               for (int i = 0; i < propertyNodeList.getLength(); i++) {
                  Element propertyNode = (Element) propertyNodeList.item(i);
                  conf.addDataSourceProperty(propertyNode.getAttributeNode("key").getValue(), propertyNode.getAttributeNode("value").getValue());
               }
            }
      

      Since sensitive properties like user and password information can be configured in this element, properties should be resolved with PasswordMaskingUtil.resolveMask(...) as with the old-style properties.

      <store>
          <database-store>
      
              <data-source-properties>
                  <data-source-property key="driverClassName" value="com.mysql.jdbc.Driver"/>            
                  <data-source-property key="url" value="jdbc:mysql://localhost/activemq"/>
                  <data-source-property key="username" value="ENC(123456)"/>
                  <data-source-property key="password" value="ENC(123456)"/>
                  <data-source-property key="poolPreparedStatements" value="true"/>
              </data-source-properties>
          <database-store>
      </store>
      

              dbruscin Domenico Francesco Bruscino
              dbruscin Domenico Francesco Bruscino
              Roman Vais Roman Vais (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: