You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Markus Fischer <ma...@fischer.name> on 2005/08/31 11:56:16 UTC

Using one physical lucene index for multiple projects

Hi,

I've about five different projects which would need to access a lucene 
index for searching. The projects are completely unrelated to each other 
however it's all about the same: indexing HTML documents.

Since all these projects are also runnig inside the same hosting 
company, I thought about being nice to resources and actually only use 
one luceneindex for all projects.

I'm running XML-RPC to allow access to the index.

My idea was that I share a SecretKey between the projects indexers and 
projects clients. So the indexer can only add/remove documents with his 
key and the client can only access documents with his key.

The goal is not about the ultimate security solution but not to have run 
multiple Lucene instances on the machines.

I this a good idea to do it that way or would someone recommend another 
practice?

thanks,
- Markus

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


Re: Using one physical lucene index for multiple projects

Posted by Maik Schreiber <bl...@blizzy.de>.
> Multiple users can authenticate to the XML-RPC server but also have
> access to different documents inside lucene.
> 
> So I need some information in the lucene index to know which ones the
> users is able to access. Currently I generate a MD5 hash of the
> username/password and store this as Field.Keyword in the lucene index
> and "AND" all queries for that key too.

Okay, I see. In our system we don't filter search results by user. HTTP
authentication is only used to protect the XML-RPC interface so that not
everyone can use it at will.

-- 
Maik Schreiber   *   http://www.blizzy.de

GPG public key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x1F11D713
Key fingerprint: CF19 AFCE 6E3D 5443 9599 18B5 5640 1F11 D713

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


Re: Using one physical lucene index for multiple projects

Posted by Markus Fischer <ma...@fischer.name>.
Maik Schreiber wrote:
>>Currently, I also store the SecretKey (hash of it) in the index so I
>>know when e.g. the request comes to delete all documents I also which ones.
> 
> I'm not sure if you're talking about authentication for using the XML-RPC
> interface here...?

Multiple users can authenticate to the XML-RPC server but also have 
access to different documents inside lucene.

So I need some information in the lucene index to know which ones the 
users is able to access. Currently I generate a MD5 hash of the 
username/password and store this as Field.Keyword in the lucene index 
and "AND" all queries for that key too.

I'm just wondering whether all in all that's a good idea or not and 
would else I could do.

- Markus

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


Re: Using one physical lucene index for multiple projects

Posted by Maik Schreiber <bl...@blizzy.de>.
> Is any of the authentication incredentials actually put into the index
> for this verifyication?

No. We're using authentication only to protect the HTTP interface, but you can
search for about anything once you're past that.

> Currently, I also store the SecretKey (hash of it) in the index so I
> know when e.g. the request comes to delete all documents I also which ones.

I'm not sure if you're talking about authentication for using the XML-RPC
interface here...?

-- 
Maik Schreiber   *   http://www.blizzy.de

GPG public key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x1F11D713
Key fingerprint: CF19 AFCE 6E3D 5443 9599 18B5 5640 1F11 D713

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


Re: Using one physical lucene index for multiple projects

Posted by Markus Fischer <ma...@fischer.name>.
Maik Schreiber wrote:
>> I'm running XML-RPC to allow access to the index.
>>
>> My idea was that I share a SecretKey between the projects indexers and 
>> projects clients. So the indexer can only add/remove documents with 
>> his key and the client can only access documents with his key.
> 
> 
> In our projects we're using HTTP authentication for XML-RPC requests.
> 

Is any of the authentication incredentials actually put into the index 
for this verifyication?

Currently, I also store the SecretKey (hash of it) in the index so I 
know when e.g. the request comes to delete all documents I also which ones.

- Markus

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


Re: Using one physical lucene index for multiple projects

Posted by Markus Fischer <ma...@fischer.name>.
Maik Schreiber wrote:
>> I'm running XML-RPC to allow access to the index.
>>
>> My idea was that I share a SecretKey between the projects indexers and 
>> projects clients. So the indexer can only add/remove documents with 
>> his key and the client can only access documents with his key.
> 
> 
> In our projects we're using HTTP authentication for XML-RPC requests.

The authentication tunnels all requests through a single method 
"execute". Can I then automatically call some XmlRpc callback function 
to let the XmlRpc-Server do its introspection which method to call?

In my case I would only add a new parameter to the Vector and and then 
disatch it to the method based on its signature.

thanks,
- Markus

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


Re: Using one physical lucene index for multiple projects

Posted by Maik Schreiber <bl...@blizzy.de>.
> I'm running XML-RPC to allow access to the index.
> 
> My idea was that I share a SecretKey between the projects indexers and 
> projects clients. So the indexer can only add/remove documents with his 
> key and the client can only access documents with his key.

In our projects we're using HTTP authentication for XML-RPC requests.

-- 
Maik Schreiber   *   http://www.blizzy.de

GPG public key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x1F11D713
Key fingerprint: CF19 AFCE 6E3D 5443 9599 18B5 5640 1F11 D713

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