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

Jan Høydahl commented on SOLR-9481:
-----------------------------------

Has to be some global state or thread issues I figure. Are you suggesting that 
some username/password is entered by another test and then we use wrong 
credentials for this?

The extra DEBUG logging revealed something interesting too. In a passing test 
run we see these lines:
{noformat}
   [junit4]   2> 3904 DEBUG (qtp1698836513-21) [    ] 
o.a.s.s.SolrDispatchFilter Request to authenticate: Request(GET 
//127.0.0.1:58765/solr/admin/authentication)@b521fd6, domain: 127.0.0.1, port: 
58765
   [junit4]   2> 3908 DEBUG (qtp1698836513-21) [    ] 
o.a.s.s.SolrDispatchFilter User principal: null
   [junit4]   2> 3908 DEBUG (qtp1698836513-21) [    ] o.a.s.s.HttpSolrCall 
AuthorizationContext : userPrincipal: [null] type: [ADMIN], collections: [], 
Path: [/admin/authentication] path : /admin/authentication params :
   [junit4]   2> 3911 DEBUG (qtp1698836513-21) [    ] 
o.a.s.s.RuleBasedAuthorizationPlugin No permissions configured for the resource 
/admin/authentication . So allowed to access
   [junit4]   2> 3912 INFO  (qtp1698836513-21) [    ] o.a.s.s.HttpSolrCall 
[admin] webapp=null path=/admin/authentication params={} status=0 QTime=3
   [junit4]   2> 3912 DEBUG (qtp1698836513-21) [    ] o.a.s.s.HttpSolrCall 
Closing out SolrRequest: {{params(),defaults(wt=json&indent=true)}}
[...many more lines...]
   [junit4]   2> 4005 INFO  
(TEST-BasicAuthStandaloneTest.testBasicAuth-seed#[3F9AB8AA5B5A65E6]) [    ] 
o.e.j.s.ServerConnector Stopped 
ServerConnector@117a0348{HTTP/1.1,[http/1.1]}{127.0.0.1:0}
{noformat}

But in the failing test we see no logs about checking userPrincipal at all:
{noformat}
  [junit4]   2> 2497828 DEBUG (qtp1492928552-46458) [    ] 
o.a.s.s.SolrDispatchFilter Request to authenticate: Request(GET 
https://127.0.0.1:64493/solr/admin/authentication)@7a1251ec, domain: 127.0.0.1, 
port: 64493
  [junit4]   2> 2497830 INFO  
(TEST-BasicAuthStandaloneTest.testBasicAuth-seed#[89F7DD5B01C6CD5E]) [    ] 
o.e.j.s.ServerConnector Stopped ServerConnector@66783857{SSL,[ssl, 
http/1.1]}{127.0.0.1:0}
{noformat}

I'm not sure why. The log {{o.a.s.s.SolrDispatchFilter User principal: null}} 
is always printed if {{cores.getAuthenticationPlugin() != null}}... Too little 
log statements in this part of the code...

> BasicAuthPlugin should support standalone mode
> ----------------------------------------------
>
>                 Key: SOLR-9481
>                 URL: https://issues.apache.org/jira/browse/SOLR-9481
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: security
>            Reporter: Jan Høydahl
>            Assignee: Jan Høydahl
>              Labels: authentication
>             Fix For: master (7.0), 6.4
>
>         Attachments: SOLR-9481.patch, SOLR-9481.patch
>
>
> The BasicAuthPlugin currently only supports SolrCloud, and reads users and 
> credentials from ZK /security.json
> Add support for standalone mode operation



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to