gabrieledarrigo opened a new issue #12074:
URL: https://github.com/apache/druid/issues/12074


   ### Affected Version
   
   Apache Druid 0.22.0
   Zookeper 3.5
   
   ### Description
   
   I'm working on a dockerized Druid cluster, similar to the one defined here: 
   
   
https://github.com/apache/druid/blob/0.22.0/distribution/docker/docker-compose.yml
   
   I'm trying to integrate the Apache Ranger extension;  
   I managed to find the undocumented `druid-ranger-security.xml` configuration 
file (here is another issue that I recently opened: 
https://github.com/apache/druid/issues/12059) that I correctly mount to the 
Coordinator `/opt/druid/conf/druid/cluster/_common/` folder, but when I startup 
the cluster I get back the following error:
   
   ```
   Problem parsing object at prefix[druid.auth.authorizer.ranger]: Cannot 
construct instance of 
org.apache.druid.security.ranger.authorizer.RangerAuthorizer, problem: 
java.lang.NullPointerException
    at [Source: UNKNOWN; line: -1, column: -1].
     at 
org.apache.druid.server.initialization.AuthorizerMapperModule.configure(AuthorizerMapperModule.java:57)
 (via modules: com.google.inject.util.Modules$OverrideModule -> 
com.google.inject.util.Modules$OverrideModule -> 
org.apache.druid.server.initialization.AuthorizerMapperModule)
     at 
org.apache.druid.server.initialization.AuthorizerMapperModule.configure(AuthorizerMapperModule.java:57)
 (via modules: com.google.inject.util.Modules$OverrideModule -> 
com.google.inject.util.Modules$OverrideModule -> 
org.apache.druid.server.initialization.AuthorizerMapperModule)
     while locating org.apache.druid.server.security.AuthorizerMapper
       for the 1st parameter of 
org.apache.druid.security.basic.authorization.db.updater.CoordinatorBasicAuthorizerMetadataStorageUpdater.<init>(CoordinatorBasicAuthorizerMetadataStorageUpdater.java:116)
     at 
org.apache.druid.security.basic.authorization.db.updater.CoordinatorBasicAuthorizerMetadataStorageUpdater.class(CoordinatorBasicAuthorizerMetadataStorageUpdater.java:77)
     while locating 
org.apache.druid.security.basic.authorization.db.updater.CoordinatorBasicAuthorizerMetadataStorageUpdater
     at 
org.apache.druid.security.basic.BasicSecurityDruidModule.createAuthorizerStorageUpdater(BasicSecurityDruidModule.java:158)
 (via modules: com.google.inject.util.Modules$OverrideModule -> 
org.apache.druid.security.basic.BasicSecurityDruidModule)
     at 
org.apache.druid.security.basic.BasicSecurityDruidModule.createAuthorizerStorageUpdater(BasicSecurityDruidModule.java:158)
 (via modules: com.google.inject.util.Modules$OverrideModule -> 
org.apache.druid.security.basic.BasicSecurityDruidModule)
     while locating 
org.apache.druid.security.basic.authorization.db.updater.BasicAuthorizerMetadataStorageUpdater
   Caused by: java.lang.IllegalArgumentException: Cannot construct instance of 
org.apache.druid.security.ranger.authorizer.RangerAuthorizer, problem: 
java.lang.NullPointerException
   ```
   Here's my environment file with the authenticator and authorizer 
configuration (in fact, the same one of the documentation):
   
   https://gist.github.com/gabrieledarrigo/f03869706a968f4d05c0412076a668fb
   
   And here's my druid-ranger-security.xml:
   
   ```xml
   <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
   <configuration xmlns:xi="http://www.w3.org/2001/XInclude";>
       <property>
           <name>ranger.plugin.druid.service.name</name>
           <value>ranger</value>
           <description>
               Name of the Ranger service containing policies for this 
SampleApp instance
           </description>
       </property>
   
       <property>
           <name>ranger.plugin.druid.policy.source.impl</name>
           
<value>org.apache.druid.security.ranger.authorizer.RangerAdminClientImpl</value>
           <description>
               Policy source.
           </description>
       </property>
   
       <property>
           <name>ranger.plugin.druid.policy.pollIntervalMs</name>
           <value>30000</value>
           <description>
               How often to poll for changes in policies?
           </description>
       </property>
   
       <property>
           <name>ranger.plugin.druid.policy.cache.dir</name>
           <value>${project.build.directory}</value>
           <description>
               Directory where Ranger policies are cached after successful 
retrieval from the source
           </description>
       </property>
   </configuration>
   ```
   
   Someone got any idea on what is causing the exception?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to