You could include a common file with the JdbcDataSource
(http://wiki.apache.org/solr/SolrConfigXml#XInclude) or add the password
as a property in solr.xml in the container scope
(http://wiki.apache.org/solr/CoreAdmin#Configuration) so it will be
available to all cores.
Personally, I use a single configuration for all cores with soft-linked
config files, so I only have to change the config in one place.

Ephraim Ofir


-----Original Message-----
From: Gora Mohanty [mailto:g...@mimirtech.com] 
Sent: Sunday, October 17, 2010 7:05 PM
To: solr-user@lucene.apache.org
Subject: Re: DIH - configure password in 1 place and store it in
encrypted form?

On Sun, Oct 17, 2010 at 7:02 PM, Arunkumar Ayyavu
<arunkumar.ayy...@gmail.com> wrote:
> Hi!
>
> I have multiple cores reading from the same database and I've provided
> the user credentials in all data-config.xml files. Is there a way to
> tell JdbcDataSource in data-config.xml to read the username and
> password from a file? This would help me not to change the
> username/password in multiple data-config.xml files.
>
> And is it possible to store the password in encrypted and let the DIH
> to call the decrypter to read the password?
[...]

As far as I am aware, it is not possible to do either of the two
options above. However, one could extend the JdbcDataSource
class to add such functionality.

Regards,
Gora

Reply via email to