You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Mikhail Khludnev (JIRA)" <ji...@apache.org> on 2016/11/16 06:46:58 UTC

[jira] [Commented] (SOLR-9771) Resolv Variables in DIH when using encryptKeyFile.

    [ https://issues.apache.org/jira/browse/SOLR-9771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15669624#comment-15669624 ] 

Mikhail Khludnev commented on SOLR-9771:
----------------------------------------

Giving https://cwiki.apache.org/confluence/display/solr/Uploading+Structured+Data+Store+Data+with+the+Data+Import+Handler you might be able to do 
{code}
<dataSource .. password="${dataimporter.request.passkey}"/>...  
{code}
And then propagate the value via solrconf.xml
{code}
<requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler">
  <lst name="defaults">
  ...
    <str name="passkey">${db.passwdkey}</str>
  </lst>
</requestHandler>
{code} 

Then you'd be able to pass it via -Ddb.passwdkey=... Does it work for you? 


> Resolv Variables in DIH when using encryptKeyFile.
> --------------------------------------------------
>
>                 Key: SOLR-9771
>                 URL: https://issues.apache.org/jira/browse/SOLR-9771
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>    Affects Versions: 5.5.3
>            Reporter: Bill Bell
>
> I would like to use a variable like ${db.passwdkey} for password when using encryptKeyFile in various DIH files.
> -Ddb.passwdkey="U2FsdGVkX18QMjY0yfCqlfBMvAB4d3XkwY96L7gfO2o="
> Please backport to 5.5.3
> This does not appear to work when used in DIH below.
> <dataSource name="jdbc" driver="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:@//hostname:port/SID" user="db_username" 
> <!-- This database password is encrypted using AES using the command. pwd.txt contains the actual DB password -->
> <!-- openssl enc -aes-128-cbc -a -salt -in pwd.txt -->
> password="U2FsdGVkX18QMjY0yfCqlfBMvAB4d3XkwY96L7gfO2o=" 
> <!-- Password to decrypt is stored in this file-->
> encryptKeyFile="/location/of/encryptionkey"
> />
> {{{
> <dataSource name="jdbc" driver="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:@//hostname:port/SID" user="db_username" 
> <!-- This database password is encrypted using AES using the command. pwd.txt contains the actual DB password -->
> <!-- openssl enc -aes-128-cbc -a -salt -in pwd.txt -->
> password=${solr.passkey} 
> <!-- Password to decrypt is stored in this file-->
> encryptKeyFile="/location/of/encryptionkey"
> }}}
> />



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org