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 Matt Palermo <we...@sweetphp.com> on 2012/07/14 08:45:01 UTC

Help with user file searching with custom permissions

I'm looking to get some advice on setting up a workflow and schema for a project I'm working on. Here is a bit of background on the project... The project is an online file management system. It has hundreds of users at the moment. There are 1,000,000+ files and folders already existing in the system and it's growing rapidly. I want all the files/folders to be indexed and searchable. I have no problem adding file data (i.e. file/folder name, creation date, author name, etc) to the index. The part that I'm struggling with is that the system implements file/folder permissions for all the users. So users won't be able to access all 1,000,000+ files/folders on the site. So the user's search results should only return things they can access.

I keep a MySQL database of users' permissions. On the site, they will see the initial list of all top-level folders they can access, then they can navigate into sub-folders and they will only see the sub-folders they can access. So the permissions for all the files and folders are set and working. I just need to enforce these access permissions when the user runs a search on the index.

I must also keep in mind that user permissions might be changed periodically. A user might be granted access to some newly created folders, or their access permission for existing folder might be revoked. So I need to keep this as "dynamic" as possible.

Can anyone give me some general advice or pointers for setting up such an index that enforces user access permissions for this type of file/folder search?

Thanks,

Matt

Re: Help with user file searching with custom permissions

Posted by Matt Palermo <we...@sweetphp.com>.
With the file manager system, the users don’t have an account on the server itself. They have user accounts stored in a MySQL database and all permissions are tied to the user id from the database. I don’t know if this complicates things at all, but I thought I’d throw that out there in case anyone has ideas for this.

Thanks,

Matt

From: Matt Palermo 
Sent: Saturday, July 14, 2012 2:45 AM
To: solr-user@lucene.apache.org 
Subject: Help with user file searching with custom permissions

I'm looking to get some advice on setting up a workflow and schema for a project I'm working on. Here is a bit of background on the project... The project is an online file management system. It has hundreds of users at the moment. There are 1,000,000+ files and folders already existing in the system and it's growing rapidly. I want all the files/folders to be indexed and searchable. I have no problem adding file data (i.e. file/folder name, creation date, author name, etc) to the index. The part that I'm struggling with is that the system implements file/folder permissions for all the users. So users won't be able to access all 1,000,000+ files/folders on the site. So the user's search results should only return things they can access.

I keep a MySQL database of users' permissions. On the site, they will see the initial list of all top-level folders they can access, then they can navigate into sub-folders and they will only see the sub-folders they can access. So the permissions for all the files and folders are set and working. I just need to enforce these access permissions when the user runs a search on the index.

I must also keep in mind that user permissions might be changed periodically. A user might be granted access to some newly created folders, or their access permission for existing folder might be revoked. So I need to keep this as "dynamic" as possible.

Can anyone give me some general advice or pointers for setting up such an index that enforces user access permissions for this type of file/folder search?

Thanks,

Matt

Re: Help with user file searching with custom permissions

Posted by Jack Krupansky <ja...@basetechnology.com>.
If I recall properly, MCF had a proposed patch in this area that was never 
fully accepted by the community. The LucidWorks Enterprise product has 
support for "search filters for access control" as well:

http://lucidworks.lucidimagination.com/display/lweug20/Search+Filters+for+Access+Control

The basic concept is that each user needs a secure login, their user profile 
specifies what "roles" they are permitted, and each documents is then tagged 
with the roles that are permitted or denied for accessing that document. A 
custom search component then filters the documents based on that combination 
of user and access control filters.

-- Jack Krupansky

-----Original Message----- 
From: Ahmet Arslan
Sent: Saturday, July 14, 2012 4:09 AM
To: solr-user@lucene.apache.org
Subject: Re: Help with user file searching with custom permissions

> Can anyone give me some general advice or pointers for
> setting up such an index that enforces user access
> permissions for this type of file/folder search?

May be you can make use of http://manifoldcf.apache.org/en_US/index.html 


Re: Help with user file searching with custom permissions

Posted by Ahmet Arslan <io...@yahoo.com>.
> Can anyone give me some general advice or pointers for
> setting up such an index that enforces user access
> permissions for this type of file/folder search?

May be you can make use of http://manifoldcf.apache.org/en_US/index.html