[ 
https://issues.apache.org/jira/browse/SOLR-13344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16804915#comment-16804915
 ] 

Jason Gerlowski commented on SOLR-13344:
----------------------------------------

I'm not the most familiar with the admin UI, but I'm looking into 
RuleVasedAuthorizationPlugin and the "all" permission for other issues atm, so 
I can offer a bit of info on that side of things.

bq. debugging why the admin UI is blocked by the "all" rule
As far as I can tell, there's no special casing in RuleBasedAuthorizationPlugin 
for the Admin UI.  When I go to the Admin UI in my browser 
("http://localhost:8983/solr/";), the RBAP sees that as a request for the 
context {{userPrincipal: [null] type: [UNKNOWN], collections: [], Path: [/] 
path : / params :null}}, finds the matching "all" rule that locks things down 
to the "solr" user, and rejects the request because there's no user/principal 
specified.  (See the line 
[here|https://github.com/apache/lucene-solr/blob/master/solr/core/src/java/org/apache/solr/security/RuleBasedAuthorizationPlugin.java#L150]).

Did you expect something different to happen, or did you expect a special 
codepath for the admin UI?

Noble added the "all" permission in SOLR-8428, maybe he could chime in on how 
this is supposed to work with admin-ui requests? [~noble.paul]

> Admin UI inaccessible with RuleBasedAuthorizationPlugin
> -------------------------------------------------------
>
>                 Key: SOLR-13344
>                 URL: https://issues.apache.org/jira/browse/SOLR-13344
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: Admin UI, Authentication
>    Affects Versions: 7.7, 8.0
>            Reporter: Märt
>            Priority: Major
>
> SOLR-7896 made some changes to the admin ui login. After the changes I can no 
> longer log in at all.
> I'm running standalone solr 7.7 (same with 8.0) with the following 
> security.json:
> {code}
> {
>   "authentication": {
>     "class": "solr.BasicAuthPlugin",
>     "blockUnknown": true,
>     "credentials": {
>       "solr": "IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0= 
> Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="
>     },
>   },
>   "authorization": {
>     "class": "solr.RuleBasedAuthorizationPlugin",
>     "permissions": [
>       {
>         "name": "all",
>         "role": "admin"
>       }
>     ],
>     "user-role": {
>       "solr": "admin"
>     }
>   }
> }
> {code}
> Opening the UI at http://localhost:8080/solr/ shows an error page with 401. 
> The login page is not displayed because of the "all" permission being 
> required. The browser's basic auth popup is not shown because the 
> WWW-Authenticate header is not present. Changing the 
> RuleBasedAuthorizationPlugin required permission from "all" to 
> "security-edit" makes the login page appear.
> The bug can be reproduced as follows:
> # unpack solr-8.0.0.zip
> # copy the security.json example from 
> https://lucene.apache.org/solr/guide/7_7/basic-authentication-plugin.html 
> into server/solr/ and replace "name":"security-edit" with "name":"all"
> # start with bin/solr -f -p 8080
> # open http://localhost:8080/
> The bug was discussed on solr-user list 
> http://mail-archives.apache.org/mod_mbox/lucene-solr-user/201903.mbox/%3C7629BDDD-3D22-4203-9188-0E0A8DCF2FEE%40cominvent.com%3E



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to