You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Kevin Risden (Jira)" <ji...@apache.org> on 2022/11/08 00:56:00 UTC

[jira] [Assigned] (SOLR-16527) RuleBasedAuthorizationPluginBase NPE

     [ https://issues.apache.org/jira/browse/SOLR-16527?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Risden reassigned SOLR-16527:
-----------------------------------

    Assignee: Kevin Risden

> RuleBasedAuthorizationPluginBase NPE
> ------------------------------------
>
>                 Key: SOLR-16527
>                 URL: https://issues.apache.org/jira/browse/SOLR-16527
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: Authorization
>    Affects Versions: 9.1
>            Reporter: Alex Deparvu
>            Assignee: Kevin Risden
>            Priority: Blocker
>             Fix For: 9.1, main (10.0)
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> I set up a SolrCloud with 2 nodes and enabled basic auth following the Solr guide ([https://solr.apache.org/guide/solr/latest/deployment-guide/basic-authentication-plugin.html#enable-basic-authentication]).
> {noformat}
> ERROR (qtp1527086220-49) [] o.a.s.h.RequestHandlerBase java.lang.NullPointerException => java.lang.NullPointerException
> at org.apache.solr.security.RuleBasedAuthorizationPluginBase.getPermissionNamesForRoles(RuleBasedAuthorizationPluginBase.java:123)
> java.lang.NullPointerException: null
> at org.apache.solr.security.RuleBasedAuthorizationPluginBase.getPermissionNamesForRoles(RuleBasedAuthorizationPluginBase.java:123) ~[?:?]
> at org.apache.solr.handler.admin.SystemInfoHandler.getSecurityInfo(SystemInfoHandler.java:342) ~[?:?]
> at org.apache.solr.handler.admin.SystemInfoHandler.handleRequestBody(SystemInfoHandler.java:153) ~[?:?]
> {noformat}
> Logs seen on the Solr node originating the request:
> {noformat}
> 2022-11-04 09:26:46.251 INFO  (qtp1658512704-126) [] o.a.s.s.HttpSolrCall [admin] webapp=null path=/admin/info/system params={wt=javabin&version=2&_=1667579206203} status=0 QTime=1
> 2022-11-04 09:26:46.259 WARN  (qtp1658512704-81) [] o.a.s.h.a.AdminHandlersProxy Exception when fetching result from node localhost:6564_solr => java.util.concurrent.ExecutionException: org.apache.solr.client.solrj.impl.BaseHttpSolrClient$RemoteSolrException: Error from server at http://localhost:6564/solr: java.lang.NullPointerException
> at org.apache.solr.security.RuleBasedAuthorizationPluginBase.getPermissionNamesForRoles(RuleBasedAuthorizationPluginBase.java:126)
> java.util.concurrent.ExecutionException: org.apache.solr.client.solrj.impl.BaseHttpSolrClient$RemoteSolrException: Error from server at http://localhost:6564/solr: java.lang.NullPointerException
> {noformat}
>  
> I believe the reason is the 'roles' set is null on inter-node requests so this method will throw a NPE [https://github.com/apache/solr/blob/26195c82493422cb9d6d4bdf9d4452046e7b3f67/solr/core/src/java/org/apache/solr/security/RuleBasedAuthorizationPluginBase.java#L122]
>  
> It looks like this was introduced with following commit for SOLR-15776 [https://github.com/apache/solr/commit/a1406847ba256965e636e05b11e53c0ac696e2a9#diff-83579b1681fbe3ea47f7340796963b034594921405afb41c62d9415f52f5adcfR356]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org