Apache Drill - DrillStartupException with CustomAuthenticaor
<p>I tried creating a custom authenticator with Drill 1.5.0 by creating jar based on below source code and drill configuration. I placed the jar in <code>$DRILLHOME/jars/</code></p>
<p><code>drill-override.conf</code> File :</p>
<pre><code>drill.exec: {   
  cluster-id: &quot;drillbits1&quot;,  
  zk.connect: &quot;host1:2181,host2:2181,host3:2181&quot;   
 security.user.auth: {   
            enabled: true,  
            packages += “myorg.drill.security&quot;,  
            impl: “sso&quot;  
       }   
}
</code></pre>
<p><code>DrillMyUserAuthenticator</code> Class:</p>
<pre><code>package myorg.drill.security;
import myorg.drill.security.SSOFilter;

import myorg.drill.security.SecurityServiceException;    
import org.apache.drill.common.config.DrillConfig;    
import org.apache.drill.exec.exception.DrillbitStartupException;  
import org.apache.drill.exec.rpc.user.security.UserAuthenticationException;    
import org.apache.drill.exec.rpc.user.security.UserAuthenticator;   
import org.apache.drill.exec.rpc.user.security.UserAuthenticatorTemplate;
       
import java.io.IOException;    
import java.net.InetAddress;   
import java.net.UnknownHostException;
  
@UserAuthenticatorTemplate(type = “sso&quot;) 
public class DrillMyUserAuthenticator implements UserAuthenticator {

private  String ipAddress;


    public void setup(DrillConfig drillConfig) throws DrillbitStartupException {

        try {
            ipAddress= InetAddress.getLocalHost().getHostAddress();

        } catch (UnknownHostException e) {
            e.printStackTrace();
            throw new DrillbitStartupException(e);  
        }   
    }
    
    public void authenticate(String userName, String password) throws UserAuthenticationException {

        try { 
            SSOFilter.setSourceAddress(ipAddress); 
            SSOFilter.authenticate(userName, password);

        } catch (SecurityServiceException e) { 
            e.printStackTrace(); 
            throw new UserAuthenticationException(e.getMessage());
        }

    }

    public void close() throws IOException {
    }  
}
</code></pre>
<p>And I am getting below exception:</p>
<blockquote>
<p>exception in thread &quot;main&quot; org.apache.drill.exec.exception.DrillbitStartupException: Failure while initializing values in Drillbit.</p>
<p>at org.apache.drill.exec.server.Drillbit.start(Drillbit.java:277)</p>
<p>at org.apache.drill.exec.server.Drillbit.start(Drillbit.java:261)</p>
<p>at org.apache.drill.exec.server.Drillbit.main(Drillbit.java:257)</p>
<p>Caused by: org.apache.drill.exec.exception.DrillbitStartupException: Failed to find the implementation of 'org.apache.drill.exec.rpc.user.security.UserAuthenticator' for type ’sso'</p>
<p>at org.apache.drill.exec.rpc.user.security.UserAuthenticatorFactory.createAuthenticator(UserAuthenticatorFactory.java:103)</p>
<p>at org.apache.drill.exec.rpc.user.UserServer.(UserServer.java:80)</p>
<p>at org.apache.drill.exec.service.ServiceEngine.(ServiceEngine.java:79)</p>
<p>at org.apache.drill.exec.server.Drillbit.(Drillbit.java:89)</p>
<p>at org.apache.drill.exec.server.Drillbit.start(Drillbit.java:275)</p>
</blockquote>
<p>Please let me know if I am missing something with the config or code.</p>
<p>I followed <a href="https://drill.apache.org/docs/configuring-user-authentication/" rel="nofollow noreferrer">Drill's documentation</a> to create this.</p>