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 Adolfo Carreno <ad...@yahoo.com> on 2012/04/17 23:20:43 UTC

Hide results for dataimport - initArgs

Hi all.For security reasons I want to hide the result of a dataimport command, specifically the section "initArgs", in order to hide the connection parameters of the database. I removed from the config.xml the tag "datasource", and moved into the solrconfig.xml, in the requestHandler defined for the dataimport operation. This allows to hide the user, password, and database url from the dataimport.jsp app.
Now, everytime that I invoke the /dataimport?command=yyy, in the output XML is displaying this information:
<response><lst name="responseHeader"><int name="status">0</int><int name="QTime">3</int></lst><lst name="initArgs"><lst name="defaults"><str name="config">dih-tenant1-jdbc.xml</str><lst name="datasource"><str name="driver">org.postgresql.Driver</str><str name="url">jdbc:postgresql://localhost/db1</str><str name="user">udb1</str><str name="password">pdb1</str></lst></lst><lst name="invariants"><str name="dihTenant">tenant1</str></lst></lst><str name="command">status</str><str name="status">idle</str><str name="importResponse"/><lst name="statusMessages"/><str name="WARNING">This response format is experimental. It is likely to change in the future.</str></response>
I wonder if there is a way to remove completely the initArrg section from the output XML, or a way to mask this information. I'm working in a very restricted environment, and we don't want this information to be shown in any XML output.
Thanks for your help!!!Adolfo

Re: Hide results for dataimport - initArgs

Posted by Adolfo Carreno <ad...@yahoo.com>.
Thanks Tomas for your response, unfortunately didn't work, still is presenting the datasource information in each dataimport output:
<response><lst name="responseHeader"><int name="status">0</int><int name="QTime">0</int></lst><lst name="initArgs"><lst name="defaults"><str name="config">dih-tenant1-jdbc.xml</str><lst name="datasource"><str name="driver">org.postgresql.Driver</str><str name="url">jdbc:postgresql://localhost/cloud</str><str name="user">udb1</str><str name="password">pdb1</str></lst></lst><lst name="invariants"><str name="dihTenant">nbc</str><str name="echoParams">none</str></lst></lst><str name="command">status</str><str name="status">idle</str><str name="importResponse"/><lst name="statusMessages"/><str name="WARNING">This response format is experimental. It is likely to change in the future.</str></response>

--- On Tue, 4/17/12, Tomás Fernández Löbbe <to...@gmail.com> wrote:

From: Tomás Fernández Löbbe <to...@gmail.com>
Subject: Re: Hide results for dataimport - initArgs
To: solr-user@lucene.apache.org
Date: Tuesday, April 17, 2012, 7:43 PM

I guess this should be possible by setting the "echoParams"=none or
explicit as an invariant. For example:

  <requestHandler name="/dataimport..." class="solr.DataImportHandler">
     <lst name="invariants">
       <str name="echoParams">none</str>
     </lst>
...
  </requestHandler>

I haven't tried it, but I think that should work.


On Tue, Apr 17, 2012 at 6:20 PM, Adolfo Carreno <ad...@yahoo.com>wrote:

> Hi all.For security reasons I want to hide the result of a dataimport
> command, specifically the section "initArgs", in order to hide the
> connection parameters of the database. I removed from the config.xml the
> tag "datasource", and moved into the solrconfig.xml, in the requestHandler
> defined for the dataimport operation. This allows to hide the user,
> password, and database url from the dataimport.jsp app.
> Now, everytime that I invoke the /dataimport?command=yyy, in the output
> XML is displaying this information:
> <response><lst name="responseHeader"><int name="status">0</int><int name="QTime">3</int></lst><lst name="initArgs"><lst name="defaults"><str name="config">dih-tenant1-jdbc.xml</str><lst name="datasource"><str name="driver">org.postgresql.Driver</str><str name="url">jdbc:postgresql://localhost/db1</str><str name="user">udb1</str><str name="password">pdb1</str></lst></lst><lst name="invariants"><str name="dihTenant">tenant1</str></lst></lst><str name="command">status</str><str name="status">idle</str><str name="importResponse"/><lst name="statusMessages"/><str name="WARNING">This
> response format is experimental. It is likely to change in the
> future.</str></response>
> I wonder if there is a way to remove completely the initArrg section from
> the output XML, or a way to mask this information. I'm working in a very
> restricted environment, and we don't want this information to be shown in
> any XML output.
> Thanks for your help!!!Adolfo

Re: Hide results for dataimport - initArgs

Posted by Tomás Fernández Löbbe <to...@gmail.com>.
I guess this should be possible by setting the "echoParams"=none or
explicit as an invariant. For example:

  <requestHandler name="/dataimport..." class="solr.DataImportHandler">
     <lst name="invariants">
       <str name="echoParams">none</str>
     </lst>
...
  </requestHandler>

I haven't tried it, but I think that should work.


On Tue, Apr 17, 2012 at 6:20 PM, Adolfo Carreno <ad...@yahoo.com>wrote:

> Hi all.For security reasons I want to hide the result of a dataimport
> command, specifically the section "initArgs", in order to hide the
> connection parameters of the database. I removed from the config.xml the
> tag "datasource", and moved into the solrconfig.xml, in the requestHandler
> defined for the dataimport operation. This allows to hide the user,
> password, and database url from the dataimport.jsp app.
> Now, everytime that I invoke the /dataimport?command=yyy, in the output
> XML is displaying this information:
> <response><lst name="responseHeader"><int name="status">0</int><int name="QTime">3</int></lst><lst name="initArgs"><lst name="defaults"><str name="config">dih-tenant1-jdbc.xml</str><lst name="datasource"><str name="driver">org.postgresql.Driver</str><str name="url">jdbc:postgresql://localhost/db1</str><str name="user">udb1</str><str name="password">pdb1</str></lst></lst><lst name="invariants"><str name="dihTenant">tenant1</str></lst></lst><str name="command">status</str><str name="status">idle</str><str name="importResponse"/><lst name="statusMessages"/><str name="WARNING">This
> response format is experimental. It is likely to change in the
> future.</str></response>
> I wonder if there is a way to remove completely the initArrg section from
> the output XML, or a way to mask this information. I'm working in a very
> restricted environment, and we don't want this information to be shown in
> any XML output.
> Thanks for your help!!!Adolfo