mirror of
https://github.com/apache/sqoop.git
synced 2025-05-05 05:21:41 +08:00
SQOOP-1774: Sqoop2: Allow anonymous authentication
(Abraham Elmahrek via Jarek Jarcec Cecho)
This commit is contained in:
parent
3349ae263d
commit
39ab0a6f25
@ -47,6 +47,13 @@ public final class AuthenticationConstants {
|
||||
public static final String AUTHENTICATION_HANDLER =
|
||||
PREFIX_AUTHENTICATION_CONFIG + "handler";
|
||||
|
||||
/**
|
||||
* The config enables or disables anonymous authentication.
|
||||
* <tt>org.apache.sqoop.authentication.anonymous</tt>.
|
||||
*/
|
||||
public static final String AUTHENTICATION_ANONYMOUS =
|
||||
PREFIX_AUTHENTICATION_CONFIG + "anonymous";
|
||||
|
||||
/**
|
||||
* All kerberos authentication related configuration is prefixed with this:
|
||||
* <tt>org.apache.sqoop.authentication.kerberos.</tt>
|
||||
|
1
dist/src/main/server/conf/sqoop.properties
vendored
1
dist/src/main/server/conf/sqoop.properties
vendored
@ -146,6 +146,7 @@ org.apache.sqoop.execution.engine=org.apache.sqoop.execution.mapreduce.Mapreduce
|
||||
#
|
||||
org.apache.sqoop.authentication.type=SIMPLE
|
||||
org.apache.sqoop.authentication.handler=org.apache.sqoop.security.SimpleAuthenticationHandler
|
||||
#org.apache.sqoop.anonymous=true
|
||||
#org.apache.sqoop.authentication.type=KERBEROS
|
||||
#org.apache.sqoop.authentication.handler=org.apache.sqoop.security.KerberosAuthenticationHandler
|
||||
#org.apache.sqoop.authentication.kerberos.principal=sqoop/_HOST@NOVALOCAL
|
||||
|
@ -71,6 +71,8 @@ protected Properties getConfiguration(String configPrefix,
|
||||
properties.setProperty(KerberosAuthenticationHandler.KEYTAB, keytab);
|
||||
} else if (type.equalsIgnoreCase(AuthenticationConstants.TYPE.SIMPLE.name())) {
|
||||
properties.setProperty(AUTH_TYPE, PseudoAuthenticationHandler.class.getName());
|
||||
properties.setProperty(PseudoAuthenticationHandler.ANONYMOUS_ALLOWED,
|
||||
mapContext.getString(AuthenticationConstants.AUTHENTICATION_ANONYMOUS, "true").trim());
|
||||
} else {
|
||||
throw new SqoopException(AuthenticationError.AUTH_0004, type);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user