You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by "wu.kehua (Jira)" <ji...@apache.org> on 2019/09/05 11:57:00 UTC
[jira] [Updated] (RANGER-2560) Solve the problem of the order of
the configuration items of the Solr plugin
[ https://issues.apache.org/jira/browse/RANGER-2560?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
wu.kehua updated RANGER-2560:
-----------------------------
Description:
There is one problem in the method "init()" of class "RangerSolrAuthorizer".
Firstly, the code logic is to get the parameters "useProxyIP", "useProxyIP","solrAppName" and "solrAppName" from RangerConfiguration, as follows:
{code:java}
useProxyIP = RangerConfiguration.getInstance().getBoolean(useProxyIP = RangerConfiguration.getInstance().getBoolean( PROP_USE_PROXY_IP, useProxyIP);
proxyIPHeader = RangerConfiguration.getInstance().get( PROP_PROXY_IP_HEADER, proxyIPHeader);
// First get from the -D property
solrAppName = System.getProperty("solr.kerberos.jaas.appname", solrAppName);
// Override if required from Ranger properties
solrAppName = RangerConfiguration.getInstance().get( PROP_SOLR_APP_NAME, solrAppName);
{code}
But after that, the code logic is to call "solrPlugin.init()" to parse the configuration file, as follows:
{code:java}
configuration.addResourcesForServiceType(serviceType);
{code}
Due to the opposite logic, the values of the parameters "useProxyIP", "useProxyIP","solrAppName" and "solrAppName" are not available.
was:
There is one problem in the method "init()" of class "RangerSolrAuthorizer".
Firstly, the code logic is to get the parameters "useProxyIP", "useProxyIP","solrAppName" and "solrAppName" from RangerConfiguration, as follows:
{code:java}
useProxyIP = RangerConfiguration.getInstance().getBoolean(useProxyIP = RangerConfiguration.getInstance().getBoolean( PROP_USE_PROXY_IP, useProxyIP);
proxyIPHeader = RangerConfiguration.getInstance().get( PROP_PROXY_IP_HEADER, proxyIPHeader);
// First get from the -D property
solrAppName = System.getProperty("solr.kerberos.jaas.appname", solrAppName);
// Override if required from Ranger properties
solrAppName = RangerConfiguration.getInstance().get( PROP_SOLR_APP_NAME, solrAppName);
{code}
But after that, the code logic is to call "solrPlugin.init()" to parse the configuration file, as follows:
{code:java}
configuration.addResourcesForServiceType(serviceType);
{code}
Due to the opposite logic, the values of the parameters "useProxyIP", "useProxyIP","solrAppName" and "solrAppName" are not available.
> Solve the problem of the order of the configuration items of the Solr plugin
> ----------------------------------------------------------------------------
>
> Key: RANGER-2560
> URL: https://issues.apache.org/jira/browse/RANGER-2560
> Project: Ranger
> Issue Type: Bug
> Components: Ranger
> Reporter: wu.kehua
> Assignee: wu.kehua
> Priority: Major
> Labels: patch
> Fix For: 2.1.0
>
>
> There is one problem in the method "init()" of class "RangerSolrAuthorizer".
> Firstly, the code logic is to get the parameters "useProxyIP", "useProxyIP","solrAppName" and "solrAppName" from RangerConfiguration, as follows:
> {code:java}
> useProxyIP = RangerConfiguration.getInstance().getBoolean(useProxyIP = RangerConfiguration.getInstance().getBoolean( PROP_USE_PROXY_IP, useProxyIP);
> proxyIPHeader = RangerConfiguration.getInstance().get( PROP_PROXY_IP_HEADER, proxyIPHeader);
> // First get from the -D property
> solrAppName = System.getProperty("solr.kerberos.jaas.appname", solrAppName);
> // Override if required from Ranger properties
> solrAppName = RangerConfiguration.getInstance().get( PROP_SOLR_APP_NAME, solrAppName);
> {code}
> But after that, the code logic is to call "solrPlugin.init()" to parse the configuration file, as follows:
> {code:java}
> configuration.addResourcesForServiceType(serviceType);
> {code}
> Due to the opposite logic, the values of the parameters "useProxyIP", "useProxyIP","solrAppName" and "solrAppName" are not available.
>
--
This message was sent by Atlassian Jira
(v8.3.2#803003)