RE: Basic Authentication problem

2019-08-02 Thread Oakley, Craig (NIH/NLM/NCBI) [C]
Was I correct in my description yesterday (which I am pasting in below)? That 
you are using a hash based on the "solr" account name and expecting that to 
work if you change the account name but not the hash?

Am I correct in assuming that everything other than security-edit functions 
currently works for you with any account and any password, including without 
any login-and-password at all?


-Original Message-
From: Oakley, Craig (NIH/NLM/NCBI) [C] 
Sent: Thursday, August 01, 2019 10:58 AM
To: solr-user@lucene.apache.org
Subject: RE: Basic Authentication problem

The hash value 
"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0=Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="
 is based on both the plain text password AND the plain test login. Since 
"solr" is not the same string as "solr-admin", the password will not work. If 
the only authorization in security.json is restricting security-edit, then you 
can do anything else with any password, or with no password.

What you can do is setup the security.json file as specified in the Reference 
Guide (whence you got the hash of the login and password), then use the default 
solr login to run your set-user (to add the solr-admin user alongside the 
existing solr login), then use the default solr login to run 
{"set-user-role":{"solr-admin":["security-edit"]}}, and then (when you are sure 
things are correctly setup for solr-admin) drop the default solr login


-Original Message-
From: Zheng Lin Edwin Yeo  
Sent: Friday, August 02, 2019 2:59 AM
To: solr-user@lucene.apache.org
Subject: Re: Basic Authentication problem

From what I see, you are trying to change your own user's password. If I
remembered correctly this might not be allowed, which is why you are
getting the "Unauthorized request" error.

You can try to create another user with admin role as well, and to change
your existing user's password from the new user.

Regards,
Edwin

On Fri, 2 Aug 2019 at 13:32, Salmaan Rashid Syed 
wrote:

> My curl command works fine for querying, updating etc.
>
> I don't think it is the fault of curl command.
>
> I get the following error message when I tried to change the password of
> solr-admin,
>
>
> 
>
> 
>
> 
>
> Error 403 Unauthorized request, Response code: 403
>
> 
>
> HTTP ERROR 403
>
> Problem accessing /solr/admin/authentication. Reason:
>
> Unauthorized request, Response code: 403
>
> 
>
> 
>
>
> And if I give incorrect username and password, it states bad credentials
> entered. So, I think the curl command is fine. There is some issue with
> basic authentication.
>
>
> Okay, One way around is to figure out how to convert my password into a
> SHA256 (password + salt) and enter it in security.json file. But, I have no
> idea how to generate the SHA256 equivalent of my password.
>
>
> Any suggestions?
>
>
>
> On Fri, Aug 2, 2019 at 10:55 AM Zheng Lin Edwin Yeo 
> wrote:
>
> > Hi Salmaan,
> >
> > Does your curl command works for other curl commands like normal
> querying?
> > Or is it just not working when updating password and adding new users?
> >
> > Regards,
> > Edwin
> >
> >
> >
> > On Fri, 2 Aug 2019 at 13:03, Salmaan Rashid Syed <
> > salmaan.ras...@mroads.com>
> > wrote:
> >
> > > Hi Zheng,
> > >
> > > I tried and it works. But, when I use the curl command to update
> password
> > > or add new users it doesn't work.
> > >
> > > I don't know what is going wrong with curl command!
> > >
> > > Regards,
> > > Salmaan
> > >
> > >
> > > On Fri, Aug 2, 2019 at 8:26 AM Zheng Lin Edwin Yeo <
> edwinye...@gmail.com
> > >
> > > wrote:
> > >
> > > > Have you tried to access the Solr Admin UI with your created user
> name
> > > and
> > > > password to see if it works?
> > > >
> > > > Regards,
> > > > Edwin
> > > >
> > > > On Thu, 1 Aug 2019 at 19:51, Salmaan Rashid Syed <
> > > > salmaan.ras...@mroads.com>
> > > > wrote:
> > > >
> > > > > Hi Solr User,
> > > > >
> > > > > Please help me with my issue.
> > > > >
> > > > > I have enabled Solr basic authentication as shown in Solr
> > > documentations.
> > > > >
> > > > > I have changed username from solr to solr-admin as follow
> > > > >
> > > > > {
> > > > > "authentication":{
> > > > >"blockUnknown": true,
>

Re: Basic Authentication problem

2019-08-02 Thread Zheng Lin Edwin Yeo
>From what I see, you are trying to change your own user's password. If I
remembered correctly this might not be allowed, which is why you are
getting the "Unauthorized request" error.

You can try to create another user with admin role as well, and to change
your existing user's password from the new user.

Regards,
Edwin

On Fri, 2 Aug 2019 at 13:32, Salmaan Rashid Syed 
wrote:

> My curl command works fine for querying, updating etc.
>
> I don't think it is the fault of curl command.
>
> I get the following error message when I tried to change the password of
> solr-admin,
>
>
> 
>
> 
>
> 
>
> Error 403 Unauthorized request, Response code: 403
>
> 
>
> HTTP ERROR 403
>
> Problem accessing /solr/admin/authentication. Reason:
>
> Unauthorized request, Response code: 403
>
> 
>
> 
>
>
> And if I give incorrect username and password, it states bad credentials
> entered. So, I think the curl command is fine. There is some issue with
> basic authentication.
>
>
> Okay, One way around is to figure out how to convert my password into a
> SHA256 (password + salt) and enter it in security.json file. But, I have no
> idea how to generate the SHA256 equivalent of my password.
>
>
> Any suggestions?
>
>
>
> On Fri, Aug 2, 2019 at 10:55 AM Zheng Lin Edwin Yeo 
> wrote:
>
> > Hi Salmaan,
> >
> > Does your curl command works for other curl commands like normal
> querying?
> > Or is it just not working when updating password and adding new users?
> >
> > Regards,
> > Edwin
> >
> >
> >
> > On Fri, 2 Aug 2019 at 13:03, Salmaan Rashid Syed <
> > salmaan.ras...@mroads.com>
> > wrote:
> >
> > > Hi Zheng,
> > >
> > > I tried and it works. But, when I use the curl command to update
> password
> > > or add new users it doesn't work.
> > >
> > > I don't know what is going wrong with curl command!
> > >
> > > Regards,
> > > Salmaan
> > >
> > >
> > > On Fri, Aug 2, 2019 at 8:26 AM Zheng Lin Edwin Yeo <
> edwinye...@gmail.com
> > >
> > > wrote:
> > >
> > > > Have you tried to access the Solr Admin UI with your created user
> name
> > > and
> > > > password to see if it works?
> > > >
> > > > Regards,
> > > > Edwin
> > > >
> > > > On Thu, 1 Aug 2019 at 19:51, Salmaan Rashid Syed <
> > > > salmaan.ras...@mroads.com>
> > > > wrote:
> > > >
> > > > > Hi Solr User,
> > > > >
> > > > > Please help me with my issue.
> > > > >
> > > > > I have enabled Solr basic authentication as shown in Solr
> > > documentations.
> > > > >
> > > > > I have changed username from solr to solr-admin as follow
> > > > >
> > > > > {
> > > > > "authentication":{
> > > > >"blockUnknown": true,
> > > > >"class":"solr.BasicAuthPlugin",
> > > > >
> > > > >
> > > >
> > "credentials":{"solr-admin":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0=
> > > > > Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="}
> > > > > },
> > > > > "authorization":{
> > > > >"class":"solr.RuleBasedAuthorizationPlugin",
> > > > >"permissions":[{"name":"security-edit",
> > > > >   "role":"admin"}],
> > > > >"user-role":{"solr-admin":"admin"}
> > > > > }}
> > > > >
> > > > > I am able to login to the page using the credentials
> > > > solr-admin:SolrRocks.
> > > > >
> > > > > But, when I try to change the default password using the curl
> command
> > > as
> > > > > follows,
> > > > >
> > > > > curl --user solr-admin:SolrRocks
> > > > > http://localhost:8983/solr/admin/authentication -H
> > > > > 'Content-type:application/json' -d
> > > '{"set-user":{"solr-admin":"s2019"}}'
> > > > >
> > > > >
> > > > > I get the following error message,
> > > > >
> > > > >
> > > > > 
> > > > >
> > > > > 
> > > > >
> > > > > 
> > > > >
> > > > > Error 403 Unauthorized request, Response code: 403
> > > > >
> > > > > 
> > > > >
> > > > > HTTP ERROR 403
> > > > >
> > > > > Problem accessing /solr/admin/authentication. Reason:
> > > > >
> > > > > Unauthorized request, Response code: 403
> > > > >
> > > > > 
> > > > >
> > > > > 
> > > > >
> > > > >
> > > > > Please help.
> > > > >
> > > > > Regards,
> > > > > Salmaan
> > > > >
> > > > >
> > > > > On Thu, Aug 1, 2019 at 1:51 PM Salmaan Rashid Syed <
> > > > > salmaan.ras...@mroads.com> wrote:
> > > > >
> > > > > > Small correction in the user-name. It is solr-admin everywhere.
> > > > > >
> > > > > > Hi Solr Users,
> > > > > >
> > > > > > I have enabled Solr basic authentication as shown in Solr
> > > > documentations.
> > > > > >
> > > > > > I have changed username from solr to solr-admin as follow
> > > > > >
> > > > > > {
> > > > > > "authentication":{
> > > > > >"blockUnknown": true,
> > > > > >"class":"solr.BasicAuthPlugin",
> > > > > >
> > > > > >
> > > > >
> > >
> "credentials":{"solr-admin":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0=
> > > > > > Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="}
> > > > > > },
> > > > > > "authorization":{
> > > > > >"class":"solr.RuleBasedAuthorizationPlugin",
> > > > > >"permissions":[{"name":"security-edit",
> > > > > >   "role":"admin"}],
> > > > > >

Re: Basic Authentication problem

2019-08-01 Thread Salmaan Rashid Syed
My curl command works fine for querying, updating etc.

I don't think it is the fault of curl command.

I get the following error message when I tried to change the password of
solr-admin,








Error 403 Unauthorized request, Response code: 403



HTTP ERROR 403

Problem accessing /solr/admin/authentication. Reason:

Unauthorized request, Response code: 403






And if I give incorrect username and password, it states bad credentials
entered. So, I think the curl command is fine. There is some issue with
basic authentication.


Okay, One way around is to figure out how to convert my password into a
SHA256 (password + salt) and enter it in security.json file. But, I have no
idea how to generate the SHA256 equivalent of my password.


Any suggestions?



On Fri, Aug 2, 2019 at 10:55 AM Zheng Lin Edwin Yeo 
wrote:

> Hi Salmaan,
>
> Does your curl command works for other curl commands like normal querying?
> Or is it just not working when updating password and adding new users?
>
> Regards,
> Edwin
>
>
>
> On Fri, 2 Aug 2019 at 13:03, Salmaan Rashid Syed <
> salmaan.ras...@mroads.com>
> wrote:
>
> > Hi Zheng,
> >
> > I tried and it works. But, when I use the curl command to update password
> > or add new users it doesn't work.
> >
> > I don't know what is going wrong with curl command!
> >
> > Regards,
> > Salmaan
> >
> >
> > On Fri, Aug 2, 2019 at 8:26 AM Zheng Lin Edwin Yeo  >
> > wrote:
> >
> > > Have you tried to access the Solr Admin UI with your created user name
> > and
> > > password to see if it works?
> > >
> > > Regards,
> > > Edwin
> > >
> > > On Thu, 1 Aug 2019 at 19:51, Salmaan Rashid Syed <
> > > salmaan.ras...@mroads.com>
> > > wrote:
> > >
> > > > Hi Solr User,
> > > >
> > > > Please help me with my issue.
> > > >
> > > > I have enabled Solr basic authentication as shown in Solr
> > documentations.
> > > >
> > > > I have changed username from solr to solr-admin as follow
> > > >
> > > > {
> > > > "authentication":{
> > > >"blockUnknown": true,
> > > >"class":"solr.BasicAuthPlugin",
> > > >
> > > >
> > >
> "credentials":{"solr-admin":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0=
> > > > Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="}
> > > > },
> > > > "authorization":{
> > > >"class":"solr.RuleBasedAuthorizationPlugin",
> > > >"permissions":[{"name":"security-edit",
> > > >   "role":"admin"}],
> > > >"user-role":{"solr-admin":"admin"}
> > > > }}
> > > >
> > > > I am able to login to the page using the credentials
> > > solr-admin:SolrRocks.
> > > >
> > > > But, when I try to change the default password using the curl command
> > as
> > > > follows,
> > > >
> > > > curl --user solr-admin:SolrRocks
> > > > http://localhost:8983/solr/admin/authentication -H
> > > > 'Content-type:application/json' -d
> > '{"set-user":{"solr-admin":"s2019"}}'
> > > >
> > > >
> > > > I get the following error message,
> > > >
> > > >
> > > > 
> > > >
> > > > 
> > > >
> > > > 
> > > >
> > > > Error 403 Unauthorized request, Response code: 403
> > > >
> > > > 
> > > >
> > > > HTTP ERROR 403
> > > >
> > > > Problem accessing /solr/admin/authentication. Reason:
> > > >
> > > > Unauthorized request, Response code: 403
> > > >
> > > > 
> > > >
> > > > 
> > > >
> > > >
> > > > Please help.
> > > >
> > > > Regards,
> > > > Salmaan
> > > >
> > > >
> > > > On Thu, Aug 1, 2019 at 1:51 PM Salmaan Rashid Syed <
> > > > salmaan.ras...@mroads.com> wrote:
> > > >
> > > > > Small correction in the user-name. It is solr-admin everywhere.
> > > > >
> > > > > Hi Solr Users,
> > > > >
> > > > > I have enabled Solr basic authentication as shown in Solr
> > > documentations.
> > > > >
> > > > > I have changed username from solr to solr-admin as follow
> > > > >
> > > > > {
> > > > > "authentication":{
> > > > >"blockUnknown": true,
> > > > >"class":"solr.BasicAuthPlugin",
> > > > >
> > > > >
> > > >
> > "credentials":{"solr-admin":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0=
> > > > > Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="}
> > > > > },
> > > > > "authorization":{
> > > > >"class":"solr.RuleBasedAuthorizationPlugin",
> > > > >"permissions":[{"name":"security-edit",
> > > > >   "role":"admin"}],
> > > > >"user-role":{"solr-admin":"admin"}
> > > > > }}
> > > > >
> > > > > I am able to login to the page using the credentials
> > > > > mroads-solr-admin:SolrRocks.
> > > > >
> > > > > But, when I try to change the default password using the curl
> command
> > > as
> > > > > follows,
> > > > >
> > > > > curl --user solr-admin:SolrRocks
> > > > > http://localhost:8983/solr/admin/authentication -H
> > > > > 'Content-type:application/json' -d
> > > '{"set-user":{"solr-admin":"s2019"}}'
> > > > >
> > > > >
> > > > >
> > > > > I get the following error message,
> > > > >
> > > > >
> > > > > 
> > > > >
> > > > > 
> > > > >
> > > > > 
> > > > >
> > > > > Error 403 Unauthorized request, Response code: 403
> > > > >
> > > > > 
> > > > >
> > > > > HTTP ERROR 403
> > > > >
> > > > > 

Re: Basic Authentication problem

2019-08-01 Thread Zheng Lin Edwin Yeo
Hi Salmaan,

Does your curl command works for other curl commands like normal querying?
Or is it just not working when updating password and adding new users?

Regards,
Edwin



On Fri, 2 Aug 2019 at 13:03, Salmaan Rashid Syed 
wrote:

> Hi Zheng,
>
> I tried and it works. But, when I use the curl command to update password
> or add new users it doesn't work.
>
> I don't know what is going wrong with curl command!
>
> Regards,
> Salmaan
>
>
> On Fri, Aug 2, 2019 at 8:26 AM Zheng Lin Edwin Yeo 
> wrote:
>
> > Have you tried to access the Solr Admin UI with your created user name
> and
> > password to see if it works?
> >
> > Regards,
> > Edwin
> >
> > On Thu, 1 Aug 2019 at 19:51, Salmaan Rashid Syed <
> > salmaan.ras...@mroads.com>
> > wrote:
> >
> > > Hi Solr User,
> > >
> > > Please help me with my issue.
> > >
> > > I have enabled Solr basic authentication as shown in Solr
> documentations.
> > >
> > > I have changed username from solr to solr-admin as follow
> > >
> > > {
> > > "authentication":{
> > >"blockUnknown": true,
> > >"class":"solr.BasicAuthPlugin",
> > >
> > >
> > "credentials":{"solr-admin":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0=
> > > Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="}
> > > },
> > > "authorization":{
> > >"class":"solr.RuleBasedAuthorizationPlugin",
> > >"permissions":[{"name":"security-edit",
> > >   "role":"admin"}],
> > >"user-role":{"solr-admin":"admin"}
> > > }}
> > >
> > > I am able to login to the page using the credentials
> > solr-admin:SolrRocks.
> > >
> > > But, when I try to change the default password using the curl command
> as
> > > follows,
> > >
> > > curl --user solr-admin:SolrRocks
> > > http://localhost:8983/solr/admin/authentication -H
> > > 'Content-type:application/json' -d
> '{"set-user":{"solr-admin":"s2019"}}'
> > >
> > >
> > > I get the following error message,
> > >
> > >
> > > 
> > >
> > > 
> > >
> > > 
> > >
> > > Error 403 Unauthorized request, Response code: 403
> > >
> > > 
> > >
> > > HTTP ERROR 403
> > >
> > > Problem accessing /solr/admin/authentication. Reason:
> > >
> > > Unauthorized request, Response code: 403
> > >
> > > 
> > >
> > > 
> > >
> > >
> > > Please help.
> > >
> > > Regards,
> > > Salmaan
> > >
> > >
> > > On Thu, Aug 1, 2019 at 1:51 PM Salmaan Rashid Syed <
> > > salmaan.ras...@mroads.com> wrote:
> > >
> > > > Small correction in the user-name. It is solr-admin everywhere.
> > > >
> > > > Hi Solr Users,
> > > >
> > > > I have enabled Solr basic authentication as shown in Solr
> > documentations.
> > > >
> > > > I have changed username from solr to solr-admin as follow
> > > >
> > > > {
> > > > "authentication":{
> > > >"blockUnknown": true,
> > > >"class":"solr.BasicAuthPlugin",
> > > >
> > > >
> > >
> "credentials":{"solr-admin":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0=
> > > > Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="}
> > > > },
> > > > "authorization":{
> > > >"class":"solr.RuleBasedAuthorizationPlugin",
> > > >"permissions":[{"name":"security-edit",
> > > >   "role":"admin"}],
> > > >"user-role":{"solr-admin":"admin"}
> > > > }}
> > > >
> > > > I am able to login to the page using the credentials
> > > > mroads-solr-admin:SolrRocks.
> > > >
> > > > But, when I try to change the default password using the curl command
> > as
> > > > follows,
> > > >
> > > > curl --user solr-admin:SolrRocks
> > > > http://localhost:8983/solr/admin/authentication -H
> > > > 'Content-type:application/json' -d
> > '{"set-user":{"solr-admin":"s2019"}}'
> > > >
> > > >
> > > >
> > > > I get the following error message,
> > > >
> > > >
> > > > 
> > > >
> > > > 
> > > >
> > > > 
> > > >
> > > > Error 403 Unauthorized request, Response code: 403
> > > >
> > > > 
> > > >
> > > > HTTP ERROR 403
> > > >
> > > > Problem accessing /solr/admin/authentication. Reason:
> > > >
> > > > Unauthorized request, Response code: 403
> > > >
> > > > 
> > > >
> > > > 
> > > >
> > > >
> > > > Please help.
> > > >
> > > >
> > > > *Thanks and Regards,*
> > > > Salmaan Rashid Syed
> > > > +91 8978353445 | www.panna.ai |
> > > > 5550 Granite Pkwy, Suite #225, Plano TX-75024.
> > > > Cyber Gateways, Hi-tech City, Hyderabad, Telangana, India.
> > > >
> > > >
> > > >
> > > > On Thu, Aug 1, 2019 at 1:48 PM Salmaan Rashid Syed <
> > > > salmaan.ras...@mroads.com> wrote:
> > > >
> > > >> Hi Solr Users,
> > > >>
> > > >> I have enabled Solr basic authentication as shown in Solr
> > > documentations.
> > > >>
> > > >> I have changed username from solr to solr-admin as follow
> > > >>
> > > >> {
> > > >> "authentication":{
> > > >>"blockUnknown": true,
> > > >>"class":"solr.BasicAuthPlugin",
> > > >>
> > > >>
> > >
> "credentials":{"solr-admin":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0=
> > > >> Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="}
> > > >> },
> > > >> "authorization":{
> > > >>"class":"solr.RuleBasedAuthorizationPlugin",
> > > >>"permissions":[{"name":"security-edit",
> > > >>

Re: Basic Authentication problem

2019-08-01 Thread Salmaan Rashid Syed
Hi Zheng,

I tried and it works. But, when I use the curl command to update password
or add new users it doesn't work.

I don't know what is going wrong with curl command!

Regards,
Salmaan


On Fri, Aug 2, 2019 at 8:26 AM Zheng Lin Edwin Yeo 
wrote:

> Have you tried to access the Solr Admin UI with your created user name and
> password to see if it works?
>
> Regards,
> Edwin
>
> On Thu, 1 Aug 2019 at 19:51, Salmaan Rashid Syed <
> salmaan.ras...@mroads.com>
> wrote:
>
> > Hi Solr User,
> >
> > Please help me with my issue.
> >
> > I have enabled Solr basic authentication as shown in Solr documentations.
> >
> > I have changed username from solr to solr-admin as follow
> >
> > {
> > "authentication":{
> >"blockUnknown": true,
> >"class":"solr.BasicAuthPlugin",
> >
> >
> "credentials":{"solr-admin":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0=
> > Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="}
> > },
> > "authorization":{
> >"class":"solr.RuleBasedAuthorizationPlugin",
> >"permissions":[{"name":"security-edit",
> >   "role":"admin"}],
> >"user-role":{"solr-admin":"admin"}
> > }}
> >
> > I am able to login to the page using the credentials
> solr-admin:SolrRocks.
> >
> > But, when I try to change the default password using the curl command as
> > follows,
> >
> > curl --user solr-admin:SolrRocks
> > http://localhost:8983/solr/admin/authentication -H
> > 'Content-type:application/json' -d '{"set-user":{"solr-admin":"s2019"}}'
> >
> >
> > I get the following error message,
> >
> >
> > 
> >
> > 
> >
> > 
> >
> > Error 403 Unauthorized request, Response code: 403
> >
> > 
> >
> > HTTP ERROR 403
> >
> > Problem accessing /solr/admin/authentication. Reason:
> >
> > Unauthorized request, Response code: 403
> >
> > 
> >
> > 
> >
> >
> > Please help.
> >
> > Regards,
> > Salmaan
> >
> >
> > On Thu, Aug 1, 2019 at 1:51 PM Salmaan Rashid Syed <
> > salmaan.ras...@mroads.com> wrote:
> >
> > > Small correction in the user-name. It is solr-admin everywhere.
> > >
> > > Hi Solr Users,
> > >
> > > I have enabled Solr basic authentication as shown in Solr
> documentations.
> > >
> > > I have changed username from solr to solr-admin as follow
> > >
> > > {
> > > "authentication":{
> > >"blockUnknown": true,
> > >"class":"solr.BasicAuthPlugin",
> > >
> > >
> > "credentials":{"solr-admin":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0=
> > > Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="}
> > > },
> > > "authorization":{
> > >"class":"solr.RuleBasedAuthorizationPlugin",
> > >"permissions":[{"name":"security-edit",
> > >   "role":"admin"}],
> > >"user-role":{"solr-admin":"admin"}
> > > }}
> > >
> > > I am able to login to the page using the credentials
> > > mroads-solr-admin:SolrRocks.
> > >
> > > But, when I try to change the default password using the curl command
> as
> > > follows,
> > >
> > > curl --user solr-admin:SolrRocks
> > > http://localhost:8983/solr/admin/authentication -H
> > > 'Content-type:application/json' -d
> '{"set-user":{"solr-admin":"s2019"}}'
> > >
> > >
> > >
> > > I get the following error message,
> > >
> > >
> > > 
> > >
> > > 
> > >
> > > 
> > >
> > > Error 403 Unauthorized request, Response code: 403
> > >
> > > 
> > >
> > > HTTP ERROR 403
> > >
> > > Problem accessing /solr/admin/authentication. Reason:
> > >
> > > Unauthorized request, Response code: 403
> > >
> > > 
> > >
> > > 
> > >
> > >
> > > Please help.
> > >
> > >
> > > *Thanks and Regards,*
> > > Salmaan Rashid Syed
> > > +91 8978353445 | www.panna.ai |
> > > 5550 Granite Pkwy, Suite #225, Plano TX-75024.
> > > Cyber Gateways, Hi-tech City, Hyderabad, Telangana, India.
> > >
> > >
> > >
> > > On Thu, Aug 1, 2019 at 1:48 PM Salmaan Rashid Syed <
> > > salmaan.ras...@mroads.com> wrote:
> > >
> > >> Hi Solr Users,
> > >>
> > >> I have enabled Solr basic authentication as shown in Solr
> > documentations.
> > >>
> > >> I have changed username from solr to solr-admin as follow
> > >>
> > >> {
> > >> "authentication":{
> > >>"blockUnknown": true,
> > >>"class":"solr.BasicAuthPlugin",
> > >>
> > >>
> > "credentials":{"solr-admin":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0=
> > >> Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="}
> > >> },
> > >> "authorization":{
> > >>"class":"solr.RuleBasedAuthorizationPlugin",
> > >>"permissions":[{"name":"security-edit",
> > >>   "role":"admin"}],
> > >>"user-role":{"solr-admin":"admin"}
> > >> }}
> > >>
> > >> I am able to login to the page using the credentials
> > >> mroads-solr-admin:SolrRocks.
> > >>
> > >> But, when I try to change the default password using the curl command
> as
> > >> follows,
> > >>
> > >> curl --user mroads-solr-admin:SolrRocks
> > >> http://localhost:8983/solr/admin/authentication -H
> > >> 'Content-type:application/json' -d
> > '{"set-user":{"mroads-solr":"Mroads@2019
> > >> #"}}'
> > >>
> > >>
> > >>
> > >> I get the following error message,
> > >>
> > >>
> > >> 
> > >>
> > >> 
> > >>
> > >> 
> > >>
> 

Re: Basic Authentication problem

2019-08-01 Thread Zheng Lin Edwin Yeo
Have you tried to access the Solr Admin UI with your created user name and
password to see if it works?

Regards,
Edwin

On Thu, 1 Aug 2019 at 19:51, Salmaan Rashid Syed 
wrote:

> Hi Solr User,
>
> Please help me with my issue.
>
> I have enabled Solr basic authentication as shown in Solr documentations.
>
> I have changed username from solr to solr-admin as follow
>
> {
> "authentication":{
>"blockUnknown": true,
>"class":"solr.BasicAuthPlugin",
>
>  "credentials":{"solr-admin":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0=
> Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="}
> },
> "authorization":{
>"class":"solr.RuleBasedAuthorizationPlugin",
>"permissions":[{"name":"security-edit",
>   "role":"admin"}],
>"user-role":{"solr-admin":"admin"}
> }}
>
> I am able to login to the page using the credentials solr-admin:SolrRocks.
>
> But, when I try to change the default password using the curl command as
> follows,
>
> curl --user solr-admin:SolrRocks
> http://localhost:8983/solr/admin/authentication -H
> 'Content-type:application/json' -d '{"set-user":{"solr-admin":"s2019"}}'
>
>
> I get the following error message,
>
>
> 
>
> 
>
> 
>
> Error 403 Unauthorized request, Response code: 403
>
> 
>
> HTTP ERROR 403
>
> Problem accessing /solr/admin/authentication. Reason:
>
> Unauthorized request, Response code: 403
>
> 
>
> 
>
>
> Please help.
>
> Regards,
> Salmaan
>
>
> On Thu, Aug 1, 2019 at 1:51 PM Salmaan Rashid Syed <
> salmaan.ras...@mroads.com> wrote:
>
> > Small correction in the user-name. It is solr-admin everywhere.
> >
> > Hi Solr Users,
> >
> > I have enabled Solr basic authentication as shown in Solr documentations.
> >
> > I have changed username from solr to solr-admin as follow
> >
> > {
> > "authentication":{
> >"blockUnknown": true,
> >"class":"solr.BasicAuthPlugin",
> >
> >
> "credentials":{"solr-admin":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0=
> > Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="}
> > },
> > "authorization":{
> >"class":"solr.RuleBasedAuthorizationPlugin",
> >"permissions":[{"name":"security-edit",
> >   "role":"admin"}],
> >"user-role":{"solr-admin":"admin"}
> > }}
> >
> > I am able to login to the page using the credentials
> > mroads-solr-admin:SolrRocks.
> >
> > But, when I try to change the default password using the curl command as
> > follows,
> >
> > curl --user solr-admin:SolrRocks
> > http://localhost:8983/solr/admin/authentication -H
> > 'Content-type:application/json' -d '{"set-user":{"solr-admin":"s2019"}}'
> >
> >
> >
> > I get the following error message,
> >
> >
> > 
> >
> > 
> >
> > 
> >
> > Error 403 Unauthorized request, Response code: 403
> >
> > 
> >
> > HTTP ERROR 403
> >
> > Problem accessing /solr/admin/authentication. Reason:
> >
> > Unauthorized request, Response code: 403
> >
> > 
> >
> > 
> >
> >
> > Please help.
> >
> >
> > *Thanks and Regards,*
> > Salmaan Rashid Syed
> > +91 8978353445 | www.panna.ai |
> > 5550 Granite Pkwy, Suite #225, Plano TX-75024.
> > Cyber Gateways, Hi-tech City, Hyderabad, Telangana, India.
> >
> >
> >
> > On Thu, Aug 1, 2019 at 1:48 PM Salmaan Rashid Syed <
> > salmaan.ras...@mroads.com> wrote:
> >
> >> Hi Solr Users,
> >>
> >> I have enabled Solr basic authentication as shown in Solr
> documentations.
> >>
> >> I have changed username from solr to solr-admin as follow
> >>
> >> {
> >> "authentication":{
> >>"blockUnknown": true,
> >>"class":"solr.BasicAuthPlugin",
> >>
> >>
> "credentials":{"solr-admin":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0=
> >> Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="}
> >> },
> >> "authorization":{
> >>"class":"solr.RuleBasedAuthorizationPlugin",
> >>"permissions":[{"name":"security-edit",
> >>   "role":"admin"}],
> >>"user-role":{"solr-admin":"admin"}
> >> }}
> >>
> >> I am able to login to the page using the credentials
> >> mroads-solr-admin:SolrRocks.
> >>
> >> But, when I try to change the default password using the curl command as
> >> follows,
> >>
> >> curl --user mroads-solr-admin:SolrRocks
> >> http://localhost:8983/solr/admin/authentication -H
> >> 'Content-type:application/json' -d
> '{"set-user":{"mroads-solr":"Mroads@2019
> >> #"}}'
> >>
> >>
> >>
> >> I get the following error message,
> >>
> >>
> >> 
> >>
> >> 
> >>
> >> 
> >>
> >> Error 403 Unauthorized request, Response code: 403
> >>
> >> 
> >>
> >> HTTP ERROR 403
> >>
> >> Problem accessing /solr/admin/authentication. Reason:
> >>
> >> Unauthorized request, Response code: 403
> >>
> >> 
> >>
> >> 
> >>
> >>
> >> Please help.
> >>
> >>
> >>
> >> *Thanks and Regards,*
> >> Salmaan Rashid Syed
> >> +91 8978353445 | www.panna.ai |
> >> 5550 Granite Pkwy, Suite #225, Plano TX-75024.
> >> Cyber Gateways, Hi-tech City, Hyderabad, Telangana, India.
> >>
> >>
> >
>


RE: Basic Authentication problem

2019-08-01 Thread Oakley, Craig (NIH/NLM/NCBI) [C]
The hash value 
"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0=Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="
 is based on both the plain text password AND the plain test login. Since 
"solr" is not the same string as "solr-admin", the password will not work. If 
the only authorization in security.json is restricting security-edit, then you 
can do anything else with any password, or with no password.

What you can do is setup the security.json file as specified in the Reference 
Guide (whence you got the hash of the login and password), then use the default 
solr login to run your set-user (to add the solr-admin user alongside the 
existing solr login), then use the default solr login to run 
{"set-user-role":{"solr-admin":["security-edit"]}}, and then (when you are sure 
things are correctly setup for solr-admin) drop the default solr login

-Original Message-
From: Salmaan Rashid Syed  
Sent: Thursday, August 01, 2019 7:51 AM
To: solr-user@lucene.apache.org
Subject: Re: Basic Authentication problem

Hi Solr User,

Please help me with my issue.

I have enabled Solr basic authentication as shown in Solr documentations.

I have changed username from solr to solr-admin as follow

{
"authentication":{
   "blockUnknown": true,
   "class":"solr.BasicAuthPlugin",

 "credentials":{"solr-admin":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0=
Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="}
},
"authorization":{
   "class":"solr.RuleBasedAuthorizationPlugin",
   "permissions":[{"name":"security-edit",
  "role":"admin"}],
   "user-role":{"solr-admin":"admin"}
}}

I am able to login to the page using the credentials solr-admin:SolrRocks.

But, when I try to change the default password using the curl command as
follows,

curl --user solr-admin:SolrRocks
http://localhost:8983/solr/admin/authentication -H
'Content-type:application/json' -d '{"set-user":{"solr-admin":"s2019"}}'


I get the following error message,








Error 403 Unauthorized request, Response code: 403



HTTP ERROR 403

Problem accessing /solr/admin/authentication. Reason:

Unauthorized request, Response code: 403






Please help.

Regards,
Salmaan


On Thu, Aug 1, 2019 at 1:51 PM Salmaan Rashid Syed <
salmaan.ras...@mroads.com> wrote:

> Small correction in the user-name. It is solr-admin everywhere.
>
> Hi Solr Users,
>
> I have enabled Solr basic authentication as shown in Solr documentations.
>
> I have changed username from solr to solr-admin as follow
>
> {
> "authentication":{
>"blockUnknown": true,
>"class":"solr.BasicAuthPlugin",
>
>  "credentials":{"solr-admin":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0=
> Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="}
> },
> "authorization":{
>"class":"solr.RuleBasedAuthorizationPlugin",
>"permissions":[{"name":"security-edit",
>   "role":"admin"}],
>"user-role":{"solr-admin":"admin"}
> }}
>
> I am able to login to the page using the credentials
> mroads-solr-admin:SolrRocks.
>
> But, when I try to change the default password using the curl command as
> follows,
>
> curl --user solr-admin:SolrRocks
> http://localhost:8983/solr/admin/authentication -H
> 'Content-type:application/json' -d '{"set-user":{"solr-admin":"s2019"}}'
>
>
>
> I get the following error message,
>
>
> 
>
> 
>
> 
>
> Error 403 Unauthorized request, Response code: 403
>
> 
>
> HTTP ERROR 403
>
> Problem accessing /solr/admin/authentication. Reason:
>
> Unauthorized request, Response code: 403
>
> 
>
> 
>
>
> Please help.
>
>
> *Thanks and Regards,*
> Salmaan Rashid Syed
> +91 8978353445 | www.panna.ai |
> 5550 Granite Pkwy, Suite #225, Plano TX-75024.
> Cyber Gateways, Hi-tech City, Hyderabad, Telangana, India.
>
>
>
> On Thu, Aug 1, 2019 at 1:48 PM Salmaan Rashid Syed <
> salmaan.ras...@mroads.com> wrote:
>
>> Hi Solr Users,
>>
>> I have enabled Solr basic authentication as shown in Solr documentations.
>>
>> I have changed username from solr to solr-admin as follow
>>
>> {
>> "authentication":{
>>"blockUnknown": true,
>>"class":"solr.BasicAuthPlugin",
>>
>>  "credentials":{"solr-admin":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0=
>> Ndd7LKv

Re: Basic Authentication problem

2019-08-01 Thread Salmaan Rashid Syed
Hi Solr User,

Please help me with my issue.

I have enabled Solr basic authentication as shown in Solr documentations.

I have changed username from solr to solr-admin as follow

{
"authentication":{
   "blockUnknown": true,
   "class":"solr.BasicAuthPlugin",

 "credentials":{"solr-admin":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0=
Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="}
},
"authorization":{
   "class":"solr.RuleBasedAuthorizationPlugin",
   "permissions":[{"name":"security-edit",
  "role":"admin"}],
   "user-role":{"solr-admin":"admin"}
}}

I am able to login to the page using the credentials solr-admin:SolrRocks.

But, when I try to change the default password using the curl command as
follows,

curl --user solr-admin:SolrRocks
http://localhost:8983/solr/admin/authentication -H
'Content-type:application/json' -d '{"set-user":{"solr-admin":"s2019"}}'


I get the following error message,








Error 403 Unauthorized request, Response code: 403



HTTP ERROR 403

Problem accessing /solr/admin/authentication. Reason:

Unauthorized request, Response code: 403






Please help.

Regards,
Salmaan


On Thu, Aug 1, 2019 at 1:51 PM Salmaan Rashid Syed <
salmaan.ras...@mroads.com> wrote:

> Small correction in the user-name. It is solr-admin everywhere.
>
> Hi Solr Users,
>
> I have enabled Solr basic authentication as shown in Solr documentations.
>
> I have changed username from solr to solr-admin as follow
>
> {
> "authentication":{
>"blockUnknown": true,
>"class":"solr.BasicAuthPlugin",
>
>  "credentials":{"solr-admin":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0=
> Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="}
> },
> "authorization":{
>"class":"solr.RuleBasedAuthorizationPlugin",
>"permissions":[{"name":"security-edit",
>   "role":"admin"}],
>"user-role":{"solr-admin":"admin"}
> }}
>
> I am able to login to the page using the credentials
> mroads-solr-admin:SolrRocks.
>
> But, when I try to change the default password using the curl command as
> follows,
>
> curl --user solr-admin:SolrRocks
> http://localhost:8983/solr/admin/authentication -H
> 'Content-type:application/json' -d '{"set-user":{"solr-admin":"s2019"}}'
>
>
>
> I get the following error message,
>
>
> 
>
> 
>
> 
>
> Error 403 Unauthorized request, Response code: 403
>
> 
>
> HTTP ERROR 403
>
> Problem accessing /solr/admin/authentication. Reason:
>
> Unauthorized request, Response code: 403
>
> 
>
> 
>
>
> Please help.
>
>
> *Thanks and Regards,*
> Salmaan Rashid Syed
> +91 8978353445 | www.panna.ai |
> 5550 Granite Pkwy, Suite #225, Plano TX-75024.
> Cyber Gateways, Hi-tech City, Hyderabad, Telangana, India.
>
>
>
> On Thu, Aug 1, 2019 at 1:48 PM Salmaan Rashid Syed <
> salmaan.ras...@mroads.com> wrote:
>
>> Hi Solr Users,
>>
>> I have enabled Solr basic authentication as shown in Solr documentations.
>>
>> I have changed username from solr to solr-admin as follow
>>
>> {
>> "authentication":{
>>"blockUnknown": true,
>>"class":"solr.BasicAuthPlugin",
>>
>>  "credentials":{"solr-admin":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0=
>> Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="}
>> },
>> "authorization":{
>>"class":"solr.RuleBasedAuthorizationPlugin",
>>"permissions":[{"name":"security-edit",
>>   "role":"admin"}],
>>"user-role":{"solr-admin":"admin"}
>> }}
>>
>> I am able to login to the page using the credentials
>> mroads-solr-admin:SolrRocks.
>>
>> But, when I try to change the default password using the curl command as
>> follows,
>>
>> curl --user mroads-solr-admin:SolrRocks
>> http://localhost:8983/solr/admin/authentication -H
>> 'Content-type:application/json' -d '{"set-user":{"mroads-solr":"Mroads@2019
>> #"}}'
>>
>>
>>
>> I get the following error message,
>>
>>
>> 
>>
>> 
>>
>> 
>>
>> Error 403 Unauthorized request, Response code: 403
>>
>> 
>>
>> HTTP ERROR 403
>>
>> Problem accessing /solr/admin/authentication. Reason:
>>
>> Unauthorized request, Response code: 403
>>
>> 
>>
>> 
>>
>>
>> Please help.
>>
>>
>>
>> *Thanks and Regards,*
>> Salmaan Rashid Syed
>> +91 8978353445 | www.panna.ai |
>> 5550 Granite Pkwy, Suite #225, Plano TX-75024.
>> Cyber Gateways, Hi-tech City, Hyderabad, Telangana, India.
>>
>>
>


Re: Basic Authentication problem

2019-08-01 Thread Salmaan Rashid Syed
Small correction in the user-name. It is solr-admin everywhere.

Hi Solr Users,

I have enabled Solr basic authentication as shown in Solr documentations.

I have changed username from solr to solr-admin as follow

{
"authentication":{
   "blockUnknown": true,
   "class":"solr.BasicAuthPlugin",

 "credentials":{"solr-admin":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0=
Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="}
},
"authorization":{
   "class":"solr.RuleBasedAuthorizationPlugin",
   "permissions":[{"name":"security-edit",
  "role":"admin"}],
   "user-role":{"solr-admin":"admin"}
}}

I am able to login to the page using the credentials
mroads-solr-admin:SolrRocks.

But, when I try to change the default password using the curl command as
follows,

curl --user solr-admin:SolrRocks
http://localhost:8983/solr/admin/authentication -H
'Content-type:application/json' -d '{"set-user":{"solr-admin":"s2019"}}'



I get the following error message,








Error 403 Unauthorized request, Response code: 403



HTTP ERROR 403

Problem accessing /solr/admin/authentication. Reason:

Unauthorized request, Response code: 403






Please help.


*Thanks and Regards,*
Salmaan Rashid Syed
+91 8978353445 | www.panna.ai |
5550 Granite Pkwy, Suite #225, Plano TX-75024.
Cyber Gateways, Hi-tech City, Hyderabad, Telangana, India.



On Thu, Aug 1, 2019 at 1:48 PM Salmaan Rashid Syed <
salmaan.ras...@mroads.com> wrote:

> Hi Solr Users,
>
> I have enabled Solr basic authentication as shown in Solr documentations.
>
> I have changed username from solr to solr-admin as follow
>
> {
> "authentication":{
>"blockUnknown": true,
>"class":"solr.BasicAuthPlugin",
>
>  "credentials":{"solr-admin":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0=
> Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="}
> },
> "authorization":{
>"class":"solr.RuleBasedAuthorizationPlugin",
>"permissions":[{"name":"security-edit",
>   "role":"admin"}],
>"user-role":{"solr-admin":"admin"}
> }}
>
> I am able to login to the page using the credentials
> mroads-solr-admin:SolrRocks.
>
> But, when I try to change the default password using the curl command as
> follows,
>
> curl --user mroads-solr-admin:SolrRocks
> http://localhost:8983/solr/admin/authentication -H
> 'Content-type:application/json' -d '{"set-user":{"mroads-solr":"Mroads@2019
> #"}}'
>
>
>
> I get the following error message,
>
>
> 
>
> 
>
> 
>
> Error 403 Unauthorized request, Response code: 403
>
> 
>
> HTTP ERROR 403
>
> Problem accessing /solr/admin/authentication. Reason:
>
> Unauthorized request, Response code: 403
>
> 
>
> 
>
>
> Please help.
>
>
>
> *Thanks and Regards,*
> Salmaan Rashid Syed
> +91 8978353445 | www.panna.ai |
> 5550 Granite Pkwy, Suite #225, Plano TX-75024.
> Cyber Gateways, Hi-tech City, Hyderabad, Telangana, India.
>
>