Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-9725

Allow Variables for All Data Import Handler Data Source Configuration Values

    XMLWordPrintableJSON

Details

    Description

      I need to be able to use a variable for a password when also using encryptKeyFile.

      For instance:

      	<dataSource
      		driver="${custom.dataimporter.datasource.driver}"
      		url="${custom.dataimporter.datasource.url}"
      		user="${custom.dataimporter.datasource.user}"
      		password="${custom.dataimporter.datasource.password}"
      		encryptKeyFile="/opt/solr/credentials/encrypt.key"
      	/>
      

      Because I need to change certain variables based on the environment. I'd start like this:

           -a
            -Dcustom.dataimporter.datasource.driver=org.mariadb.jdbc.Driver
            -Dcustom.dataimporter.datasource.url=jdbc:mysql://local.mysite.com:3306/mysite
            -Dcustom.dataimporter.datasource.user=root
            -Dcustom.dataimporter.datasource.password=U2FsdGVkX1/dqwTb8RBfFq82SM37DkDRGeWMOndftHY=
      

      If I hardcode the password, it works; if I use a variable reference, it doesn't.

      As far as I know this pull request was submitted to address this issue, but it didn't come with a Jira ticket or a full explanation.

      Also, note that I'm not using a variable for the value of encryptKeyFile, because it's not possible in 5.x, though it seems to be fixed in 6.1. Presumably, the above patch would encompass encryptKeyFile's value, as well.

      Attachments

        1. SOLR-9725.patch
          6 kB
          Mikhail Khludnev

        Issue Links

          Activity

            People

              mkhl Mikhail Khludnev
              jamiejackson Jamie Jackson
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: