Return-Path: X-Original-To: apmail-manifoldcf-user-archive@www.apache.org Delivered-To: apmail-manifoldcf-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 36648114AD for ; Thu, 12 Jun 2014 18:59:17 +0000 (UTC) Received: (qmail 5426 invoked by uid 500); 12 Jun 2014 18:59:17 -0000 Delivered-To: apmail-manifoldcf-user-archive@manifoldcf.apache.org Received: (qmail 5373 invoked by uid 500); 12 Jun 2014 18:59:17 -0000 Mailing-List: contact user-help@manifoldcf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@manifoldcf.apache.org Delivered-To: mailing list user@manifoldcf.apache.org Received: (qmail 5364 invoked by uid 99); 12 Jun 2014 18:59:17 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Jun 2014 18:59:17 +0000 X-ASF-Spam-Status: No, hits=2.8 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lalit.j.jangra@gmail.com designates 209.85.213.52 as permitted sender) Received: from [209.85.213.52] (HELO mail-yh0-f52.google.com) (209.85.213.52) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Jun 2014 18:59:14 +0000 Received: by mail-yh0-f52.google.com with SMTP id a41so1314401yho.11 for ; Thu, 12 Jun 2014 11:58:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=dXm/9ZQ2VHMN7DdqiKXZZd/7oLhkiW488AyowUgeStk=; b=h8QndxfcyrBdhPXXyBr4P8ztCaQ4zjINnt/KmLnPAdyCo+POSVzRon/o9D+h+AkjTR ++DWyldnekAUAwTFL2TyzefO4XCMMK0lTOn5SyqypJvcpDC6o/DOFM6Bg6J5y222+lVx Bac4LjeSh800sBBdfdTvZizypC2kezW5pJR6uoNBvsxYYgnJkKOZ7bw3ydat4I/+t6Ut x9spz9NytpeIYg4zYz6r8gahdrgy2c5LcInR/Ax66egsmCulteDoDOquFa8QoicqnB+C 0wawSvcwuDuPfIf5Si7oPmjjlVrBxlt/dFXUB+aBeZ8wv25lEJuDM9a5OKquP6J8mNc8 XgBA== MIME-Version: 1.0 X-Received: by 10.236.46.5 with SMTP id q5mr18468297yhb.21.1402599530204; Thu, 12 Jun 2014 11:58:50 -0700 (PDT) Received: by 10.170.145.195 with HTTP; Thu, 12 Jun 2014 11:58:50 -0700 (PDT) In-Reply-To: <1402581712.24335.YahooMailNeo@web124705.mail.ne1.yahoo.com> References: <1402581712.24335.YahooMailNeo@web124705.mail.ne1.yahoo.com> Date: Thu, 12 Jun 2014 19:58:50 +0100 Message-ID: Subject: Re: How to query for content with ACLs? From: lalit jangra To: Ahmet Arslan Cc: "user@manifoldcf.apache.org" Content-Type: multipart/alternative; boundary=047d7b5d8391c293a604fba8261f X-Virus-Checked: Checked by ClamAV on apache.org --047d7b5d8391c293a604fba8261f Content-Type: text/plain; charset=UTF-8 Hi Ahmet, I tried the way you suggested but its not working. My solr query is as below. http://localhost:8983/solr/collection1/select?q=*%3A*&wt=json&indent=true&AuthenticatedUserName=ljangra@domain.entp Whatever name i am passing as AuthenticatedUserName, it returning all results. I have indexed my documents using mcf-solr plugin using instructions @ https://svn.apache.org/repos/asf/manifoldcf/integration/solr-4.x/trunk/README.txt. Below are some of ACL stored in solr. Am i missing something? "_version_": 1470562493875093500, "allow_token_share": [ "__nosecurity__" ], "deny_token_share": [ "__nosecurity__" ] }, { "content_name": "Alfresco-in-an-Hour.pdf" "deny_token_document": [ "SP+Group:DEAD_AUTHORITY" ], "allow_token_document": [ "SP+Group:GTest+lalit+Portal+Visitors", "SP+Group:GTest+lalit+Portal+Owners", "SP+Group:GRestricted+Readers", "SP+Group:GTest+lalit+Administrators", "SP+Group:GTest+lalit+Portal+Members", "SP+Group:Uc%3A0%28.s%7Ctrue", "SP+Group:GHierarchy+Managers", "SP+Group:GApprovers", "SP+Group:GViewers", "SP+Group:GDesigners" ], "content_modified_date": "2014-06-04T00:00:00Z", SDD "_version_": 1470564182244982800 }, { "deny_token_share": [ "AD+Group:DEAD_AUTHORITY" ], "content_name": "hekko.txt", "content_modifier": "iwater.ie\\ljangra", "deny_token_document": [ "AD+Group:DEAD_AUTHORITY" ], "id": " file://///10.231.82.15/AlfrescoInstallers/manifoldtest/hekko.txt", "allow_token_document": [ "AD+Group:S-1-5-18", "AD+Group:S-1-5-21-2630432783-15384281-2988178474-12088", "AD+Group:S-1-5-21-2630432783-15384281-2988178474-12147", "AD+Group:S-1-5-21-2630432783-15384281-2988178474-12148", "AD+Group:S-1-5-21-2630432783-15384281-2988178474-12149", "AD+Group:S-1-5-21-2630432783-15384281-2988178474-12150", "AD+Group:S-1-5-21-2630432783-15384281-2988178474-12217", "AD+Group:S-1-5-21-2630432783-15384281-2988178474-15154", "AD+Group:S-1-5-21-2630432783-15384281-2988178474-8005", "AD+Group:S-1-5-32-544" ], "allow_token_share": [ "AD+Group:S-1-1-0", "AD+Group:S-1-5-32-544" ], CMIS "allow_token_share": [ "__nosecurity__" ], "deny_token_document": [ "__nosecurity__" ], "deny_token_share": [ "__nosecurity__" ], "allow_token_document": [ "__nosecurity__" ] Regards. On Thu, Jun 12, 2014 at 3:01 PM, Ahmet Arslan wrote: > Hi, > > As documented here > https://svn.apache.org/repos/asf/manifoldcf/integration/solr-4.x/trunk/README.txt > > "At a minimum, AuthenticatedUserName must be present in order" > > > This is a URL parameter, just like Solr params. Here is an example. > > > http://localhost:8983/solr/documents/select?q=*%3A*&wt=xml&AuthenticatedUserName=ahmet@g-b.entp&facet=on&facet.field=Content-Type > > > > On Thursday, June 12, 2014 4:28 PM, lalit jangra < > lalit.j.jangra@gmail.com> wrote: > > > Hi All, > > As continuing from > http://lucene.472066.n3.nabble.com/How-to-query-for-content-with-ACLs-td4141402.html > as per Ahmet's suggestion. > > I have setup mcf-solr4x-plugin in MCF 1.5.1 and i can see ACLs indexed > into solr indexes. > > Now i want to write Solr query to put a user's permission details into in > it which can be compared to ACL stored in solr and only those results will > be returned to user on which he has been assigned ACL. > > How can i do this? Can i use MCF filter below here or do i need to write > custom query for my need? > > > > {!manifoldCFSecurity} > > > > Please help. > > Regards, > Lalit Jangra. > > > -- Regards, Lalit Jangra. --047d7b5d8391c293a604fba8261f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Ahmet,

I tried the way= you suggested but its not working. My solr query is as below.

http://= localhost:8983/solr/collection1/select?q=3D*%3A*&wt=3Djson&indent= =3Dtrue&AuthenticatedUserName=3Dljangra@domain.entp

Whatever name i am passing as AuthenticatedUserName, it returning= all results.

I have indexed my documents using mcf-solr plug= in using instructions @ https://svn.apache.org/repos/asf= /manifoldcf/integration/solr-4.x/trunk/README.txt. Below are some of AC= L stored in solr. Am i missing something?

"_version_": 1470562493875093500,

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 "allow_token_share": [

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "__nosecurity__"

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 ],

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 "deny_token_share": [

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "__nosecurity__"

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 ]

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 },

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 {

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 "content_name": "Alfresco-in-an-Hour.pdf"

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 "deny_token_document": [

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "SP+Group:DEAD_AUTHORITY"

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 ],

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 "allow_token_document": [

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "SP+Group:GTest+lalit+Portal+Visitors",

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "SP+Group:GTest+lalit+Portal+Owners",

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "SP+Group:GRestricted+Readers",

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "SP+Group:GTest+lalit+Administrators",

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "SP+Group:GTest+lalit+Portal+Members",

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "SP+Group:Uc%3A0%28.s%7Ctrue",

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "SP+Group:GHierarchy+Managers",

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "SP+Group:GApprovers",

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "SP+Group:GViewers",

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "SP+Group:GDesigners"

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 ],

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 "content_modified_date": "2014-06-04T00:00:00Z",=

=C2=A0

=C2=A0

=C2=A0

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0 SDD

=C2=A0

=C2=A0

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0 "_version_": 1470564182244982800

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 },

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 {

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 "deny_token_share": [

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "AD+Group:DEAD_AUTHORITY"

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 ],

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 "content_name": "hekko.txt",

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 "content_modifier": "iwater.ie<= /a>\\ljangra",

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 "deny_token_document": [

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "AD+Group:DEAD_AUTHORITY"

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 ],

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "id": "file://///10.231.82.15/AlfrescoInstallers/manifold= test/hekko.txt",

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 "allow_token_document": [

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "AD+Group:S-1-5-18",

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "AD+Group:S-1-5-21-2630432783-15384281-2988178474-12088",<= /p>

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "AD+Group:S-1-5-21-2630432783-15384281-2988178474-12147",<= /p>

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "AD+Group:S-1-5-21-2630432783-15384281-2988178474-12148",<= /p>

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "AD+Group:S-1-5-21-2630432783-15384281-2988178474-12149",<= /p>

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "AD+Group:S-1-5-21-2630432783-15384281-2988178474-12150",<= /p>

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "AD+Group:S-1-5-21-2630432783-15384281-2988178474-12217",<= /p>

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "AD+Group:S-1-5-21-2630432783-15384281-2988178474-15154",<= /p>

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "AD+Group:S-1-5-21-2630432783-15384281-2988178474-8005",

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "AD+Group:S-1-5-32-544"

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 ],

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0"allow_token_share": [

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "AD+Group:S-1-1-0",

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "AD+Group:S-1-5-32-544"

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 ],

=C2=A0

=C2=A0

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 CMIS

=C2=A0

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "allow_token_share": [

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "__nosecurity__"

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 ],

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 "deny_token_document": [

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "__nosecurity__"

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 ],

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 "deny_token_share": [

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "__nosecurity__"

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 ],

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 "allow_token_document": [

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "__nosecurity__"

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 ]


Regards.


<= br>
On Thu, Jun 12, 2014 at 3:01 PM, Ahmet Arslan= <iorixxx@yahoo.com> wrote:
Hi,

= As documented here=C2=A0https://svn.ap= ache.org/repos/asf/manifoldcf/integration/solr-4.x/trunk/README.txt

"At a minimum, AuthenticatedUserName must be present in ord= er"


= This is a URL parameter, just like Solr params. Here is an example.<= /div>

=


On Thursday, June 12, 2014 4:28 PM= , lalit jangra <lalit.j.jangra@gmail.com> wrote:


=
I have setup mcf-solr4x-plugin in MCF 1.5.1 and i can see ACLs in= dexed into solr indexes.

Now i want to write Solr query to put a us= er's permission details into in it which can be compared to ACL stored = in solr and only those results will be returned to user on which he has bee= n assigned ACL.

How can i do this?=C2=A0 Can i use MCF filter=C2=A0 below here or= do i need to write custom query for my need?

<requestHandler nam= e=3D"search" class=3D"solr.SearchHandler" default=3D&qu= ot;true">
=C2=A0 <lst name=3D"appends">
=C2=A0=C2=A0=C2=A0 <str= name=3D"fq">{!manifoldCFSecurity}</str>
=C2=A0 </= lst>
</requestHandler>

Please help.

Regards,
Lalit Jangra.





-= -
Regards,
Lalit Jangra.
--047d7b5d8391c293a604fba8261f--