[
https://issues.apache.org/jira/browse/SOLR-16527?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17630114#comment-17630114
]
ASF subversion and git services commented on SOLR-16527:
--------------------------------------------------------
Commit 2e6c7692981828c7da95de4691dd903dd558a576 in solr's branch
refs/heads/main from Kevin Risden
[ https://gitbox.apache.org/repos/asf?p=solr.git;h=2e6c7692981 ]
SOLR-16527: move changes to 9.1
> 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: [email protected]
For additional commands, e-mail: [email protected]