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 yydpkm <yy...@gmail.com> on 2018/12/04 14:55:41 UTC

Re: Basic Auth Permission

Hi Antony, 

Have you solved this? I am facing the same thing. Other users can still do
/select after I set the permission path and collection. 

Best,
Rick



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html

Re: Basic Auth Permission

Posted by yydpkm <yy...@gmail.com>.
Authentication does work and authorization for general is working fine. But
nothing authorization works when specified certain collection. That's so
frustrating. It is weird that even I just do simple "path":"/*" won't do
anything if I add "collection":"a".



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html

Re: Basic Auth Permission

Posted by Antony A <an...@gmail.com>.
I run on Solr cloud 7.2.1

Sent from my mobile. Please excuse any typos.

> On Dec 4, 2018, at 2:57 PM, Terry Steichen <te...@net-frame.com> wrote:
> 
> I think there's been some confusion on which standalone versions support
> authentication.  I'm using 6.6 in cloud mode (purely so the
> authentication will work).  Some of the documentation seems to say that
> only cloud implementations support it, but others (like the experts on
> this forum) say that later versions (including yours) support it in
> standalone mode.
> 
>> On 12/4/18 4:14 PM, yydpkm wrote:
>> I am using standalone Solr 7.4.0. Are you using cloud or standalone? Not sure
>> if that cause the problem or not.
>> 
>> 
>> 
>> --
>> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>> 

Re: Basic Auth Permission

Posted by Terry Steichen <te...@net-frame.com>.
I think there's been some confusion on which standalone versions support
authentication.  I'm using 6.6 in cloud mode (purely so the
authentication will work).  Some of the documentation seems to say that
only cloud implementations support it, but others (like the experts on
this forum) say that later versions (including yours) support it in
standalone mode.

On 12/4/18 4:14 PM, yydpkm wrote:
> I am using standalone Solr 7.4.0. Are you using cloud or standalone? Not sure
> if that cause the problem or not.
>
>
>
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>

Re: Basic Auth Permission

Posted by yydpkm <yy...@gmail.com>.
I am using standalone Solr 7.4.0. Are you using cloud or standalone? Not sure
if that cause the problem or not.



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html

Re: Basic Auth Permission

Posted by Terry Steichen <te...@net-frame.com>.
What Solr version are you using?

On 12/4/18 2:47 PM, yydpkm wrote:
> Thank you for your replay. I use your format and failed. User2 can still
> visit collection "name"
> Could that because I am using standalone Solr not Solrcloud? 
>
>
>
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>

Re: Basic Auth Permission

Posted by yydpkm <yy...@gmail.com>.
Thank you for your replay. I use your format and failed. User2 can still
visit collection "name"
Could that because I am using standalone Solr not Solrcloud? 



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html

Re: Basic Auth Permission

Posted by Antony A <an...@gmail.com>.
Hi Rick,

This is how I was able to restrict permissions to user-role ( user1  ) to
its own collection. Hopefully it helps.

   "permissions": [
     {"name": "*", "path": "/dataimport", "params": {"command":
["status"]}, "role": "*"},
     {"collection": "name", "path": "/admin/file", "role": ["user1",
"admin"]},
     {"collection": "name", "path": "/files", "role": ["user1", "admin"]},
     {"collection": "name", "path": "/admin/collections", "params":
{"action": ["LIST"]}, "role": ["user1", "admin"]},
     {"collection": "name", "path": "/dataimport", "role": ["user1",
"admin"]},
     {"collection": "name", "path": "/select", "role": ["user1", "admin"]},
     {"collection": "name", "name": "update", "role": ["user1", "admin"]},
     {"collection": "name", "name": "collection-admin-read", "role":
["user1", "admin"]},
     {"collection": "name", "name": "schema-read", "role": ["user1",
"admin"]},
     {"collection": "name", "name": "core-admin-read", "role": ["user1",
"admin"]},
     {"collection": "null", "path": "/admin/zookeeper", "role": ["admin"]},
     {"name": "security-read", "role": ["admin"]},
     {"name": "schema-edit", "role": ["admin"]},
     {"name": "config-edit", "role": ["admin"]},
     {"name": "core-admin-edit", "role": ["admin"]},
     {"name": "security-read", "role": ["admin"]},
     {"name": "collection-admin-edit", "role": ["admin"]},
     {"name": "security-edit", "role": ["admin"]}
    ]

Thanks,
Antony


On Tue, Dec 4, 2018 at 10:07 AM Terry Steichen <te...@net-frame.com> wrote:

> In setting his permission, Antony said he set "path": "/admin/file".  I
> use "path":"/*" - that may be too restrictive for you, but it works fine
> (for me).
>
> On 12/4/18 9:55 AM, yydpkm wrote:
> > Hi Antony,
> >
> > Have you solved this? I am facing the same thing. Other users can still
> do
> > /select after I set the permission path and collection.
> >
> > Best,
> > Rick
> >
> >
> >
> > --
> > Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
> >
>

Re: Basic Auth Permission

Posted by yydpkm <yy...@gmail.com>.
I tried to replace "/select" with "/*" but user B can still access collection
A.
    "permissions":[
      {
        "name":"security-edit",
        "role":"admin",
        "index":1},
      {
        "name":"PermA",
        "collection":CollectionA"",
        "path":"/*",
        "role":["ReadCollectionA","admin"],
        "index":3},
      {
        "name":"schema-read",
        "role":"*",
        "index":4},
      {
        "name":"config-read",
        "role":"*",
        "index":5},
      {
        "name":"collection-admin-read",
        "role":"admin",
        "index":6},
      {
        "name":"metrics-read",
        "role":"*",
        "index":7},
      {
        "name":"core-admin-read",
        "role":"*",
        "index":8}]



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html

Re: Basic Auth Permission

Posted by Terry Steichen <te...@net-frame.com>.
In setting his permission, Antony said he set "path": "/admin/file".  I
use "path":"/*" - that may be too restrictive for you, but it works fine
(for me).

On 12/4/18 9:55 AM, yydpkm wrote:
> Hi Antony, 
>
> Have you solved this? I am facing the same thing. Other users can still do
> /select after I set the permission path and collection. 
>
> Best,
> Rick
>
>
>
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>