You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Arunkumar Ayyavu <ar...@gmail.com> on 2010/10/17 15:32:33 UTC

DIH - configure password in 1 place and store it in encrypted form?

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?

Thanks a lot.

-- 
Arun

Re: DIH - configure password in 1 place and store it in encrypted form?

Posted by Arunkumar Ayyavu <ar...@gmail.com>.
Thanks for that very useful info about XInclude.

On Tue, Oct 19, 2010 at 2:12 PM, Ephraim Ofir <Ep...@icq.com> wrote:
> 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:gora@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
> <ar...@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
>



-- 
Arun

RE: DIH - configure password in 1 place and store it in encrypted form?

Posted by Ephraim Ofir <Ep...@icq.com>.
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:gora@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
<ar...@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

Re: DIH - configure password in 1 place and store it in encrypted form?

Posted by Gora Mohanty <go...@mimirtech.com>.
On Sun, Oct 17, 2010 at 7:02 PM, Arunkumar Ayyavu
<ar...@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