I have enabled user authentication in drill using Custom Authenticators.
I am following guide from https://drill.apache.org/docs/creating-custom-authenticators/
Implemented the class with a hard coded user/password, created the jar and placed it in /jars folder.
Able to see the login screen, login is working with user/password.
here is the class implemented –
@UserAuthenticatorTemplate(type = "myCustomAuthenticatorType")
public class MyCustomDrillUserAuthenticatorImpl implements UserAuthenticator {
public static final String USER = "myuser";
public static final String PASSWORD = "mypassword";
@Override
public void setup(DrillConfig drillConfig) throws DrillbitStartupException {}
@Override
public void authenticate(String userName, String password) throws UserAuthenticationException {
if (!(USER.equals(userName) && PASSWORD.equals(password)) ) {
throw new UserAuthenticationException("Authentication Failed");
}
}
@Override
public void close() throws IOException {}
}
added property to drill-override.conf
drill.exec {
security.user.auth {
enabled: true,
packages += "myorg.drill.security",
impl: "myCustomAuthenticatorType"
}
auth.mechanisms: ["PLAIN"]
}
and added property to drill-module.conf
and put that config file inside jar file.
drill {
classpath.scanning {
packages += "myorg.drill.security"
}
}
However Storage plugin options are not visible to that user in drill UI. It is treated as non-admin user.
How do I make a user admin in drill ?
I tried adding property to drill-override.conf
security.admin.users : "myuser"
but of no use.