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 Peter Sturge <pe...@gmail.com> on 2018/02/25 20:28:36 UTC

security authentication API via solrj?

Hi,
I was wondering if 7.2.1 solrj had native support for the
security/authentication endpoint? I couldn't find anything in the docs
about it, but maybe someone has some experience with it?
Note: This is about adding/deleting users on a solr instance using solrj,
not authenticating (that is well documented).
Thanks,
Peter

Re: security authentication API via solrj?

Posted by Peter Sturge <pe...@gmail.com>.
Hi,

Thanks for your response.
I've done this using the 'raw' rest style, as I'm not familiar enough with
the new solrj client.
It would be quite nice to have a native solrj class for handling security
mgt operations (add/delete users, roles etc.)..kind of like the
CoreAdmin/CollectionAdmin/Configset etc.

Thanks,
Peter



On Mon, Feb 26, 2018 at 1:13 AM, Shawn Heisey <el...@elyograg.org> wrote:

> On 2/25/2018 1:28 PM, Peter Sturge wrote:
>
>> I was wondering if 7.2.1 solrj had native support for the
>> security/authentication endpoint? I couldn't find anything in the docs
>> about it, but maybe someone has some experience with it?
>> Note: This is about adding/deleting users on a solr instance using solrj,
>> not authenticating (that is well documented).
>>
>
> At first I was looking for how to use authentication with SolrJ. I came up
> with this:
>
> ====
> Looks like this is not available when using the sugar objects like
> SolrQuery.  To use authentication, it seems you have to create the request
> objects yourself.
>
> https://lucene.apache.org/solr/guide/7_2/basic-authenticatio
> n-plugin.html#using-basic-auth-with-solrj
> ====
>
> Then I noticed you were talking about the actual security endpoint --
> adding users.
>
> I have been looking over the objects available in SolrJ, and I do not see
> anything useful.  It looks like you might need a new request object class,
> implemented similar to DirectXMLRequest, but using JSON and not XML.  It
> might be possible to make it an implicitly defined class rather than
> creating a whole class file.
>
> A proper sugar class for handling the security endpoint should be
> created.  I would do it, but I'm not sure how.
>
> Thanks,
> Shawn
>
>

Re: security authentication API via solrj?

Posted by Shawn Heisey <el...@elyograg.org>.
On 2/25/2018 1:28 PM, Peter Sturge wrote:
> I was wondering if 7.2.1 solrj had native support for the
> security/authentication endpoint? I couldn't find anything in the docs
> about it, but maybe someone has some experience with it?
> Note: This is about adding/deleting users on a solr instance using solrj,
> not authenticating (that is well documented).

At first I was looking for how to use authentication with SolrJ. I came 
up with this:

====
Looks like this is not available when using the sugar objects like 
SolrQuery.  To use authentication, it seems you have to create the 
request objects yourself.

https://lucene.apache.org/solr/guide/7_2/basic-authentication-plugin.html#using-basic-auth-with-solrj
====

Then I noticed you were talking about the actual security endpoint -- 
adding users.

I have been looking over the objects available in SolrJ, and I do not 
see anything useful.  It looks like you might need a new request object 
class, implemented similar to DirectXMLRequest, but using JSON and not 
XML.  It might be possible to make it an implicitly defined class rather 
than creating a whole class file.

A proper sugar class for handling the security endpoint should be 
created.  I would do it, but I'm not sure how.

Thanks,
Shawn