Uploaded image for project: 'Ranger'
  1. Ranger
  2. RANGER-2560

Solve the problem of the order of the configuration items of the Solr plugin

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1.0
    • Component/s: Ranger
    • Labels:
    • Flags:
      Patch

      Description

      There is one problem in the method "init()" of class "RangerSolrAuthorizer".

      Firstly, the code logic is to get the parameters "useProxyIP", "proxyIPHeader" and "solrAppName" from RangerConfiguration, as follows:

      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);
      

      But after that, the code logic is to call "solrPlugin.init()" to parse the configuration file, as follows:

      configuration.addResourcesForServiceType(serviceType); 
      

      Due to the opposite logic, the values of the parameters "useProxyIP", "proxyIPHeader","solrAppName" and "solrAppName" are not available.

       

        Attachments

          Activity

            People

            • Assignee:
              wkh8011 wu.kehua
              Reporter:
              wkh8011 wu.kehua
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: