lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Ulicny <culi...@iq.media>
Subject Re: Problem in documentation -- authentication JSON fails validation
Date Sat, 24 Jun 2017 18:13:38 GMT
I haven't actually tested it, but I believe the JSON should probably be
this:

{
  "set-permission": {"name": "update", "role":"dev"},
  "set-permission": {"name": "read", "role":"guest"}
}

It's missing closing double quotes for 'update' and 'read' and had an extra
comma after the 'guest' entry.

If I remember correctly, solr doesn't usually have any issues with
duplicate keys that some JSON validators don't consider valid.



On Sat, Jun 24, 2017 at 11:17 AM Shawn Heisey <apache@elyograg.org> wrote:

> This problem brought to you courtesy of the IRC channel.
>
> On this page of the reference guide:
>
>
> https://lucene.apache.org/solr/guide/6_6/rule-based-authorization-plugin.html
>
> There is this curl command:
>
> curl --user solr:SolrRocks -H 'Content-type:application/json' -d '{
>   "set-permission": {"name": "update, "role":"dev"},
>   "set-permission": {"name": "read, "role":"guest"},
> }' http://localhost:8983/solr/admin/authorization
>
> This command doesn't work.  Solr complains about the JSON, and pasting
> the JSON into a validator web page, I have confirmed that it fails
> validation.
>
> I can't figure out how this JSON *should* be formatted, or I would just
> fix the documentation.  Hopefully somebody knows what should go here.
>
> Thanks,
> Shawn
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message