|
@@ -36,7 +36,7 @@ import org.apache.hadoop.util.StringUtils;
|
|
|
|
|
|
import com.google.common.annotations.VisibleForTesting;
|
|
|
|
|
|
-@InterfaceAudience.Private
|
|
|
+@InterfaceAudience.LimitedPrivate({"HDFS", "MapReduce", "HBase", "Hive"})
|
|
|
public class ProxyUsers {
|
|
|
|
|
|
private static final String CONF_HOSTS = ".hosts";
|
|
@@ -193,6 +193,20 @@ public class ProxyUsers {
|
|
|
+ superUser.getUserName() + " from IP " + remoteAddress);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * This function is kept to provide backward compatibility.
|
|
|
+ * @param user
|
|
|
+ * @param remoteAddress
|
|
|
+ * @param conf
|
|
|
+ * @throws AuthorizationException
|
|
|
+ * @deprecated use {@link #authorize(UserGroupInformation, String) instead.
|
|
|
+ */
|
|
|
+ @Deprecated
|
|
|
+ public static synchronized void authorize(UserGroupInformation user,
|
|
|
+ String remoteAddress, Configuration conf) throws AuthorizationException {
|
|
|
+ authorize(user,remoteAddress);
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* Return true if the configuration specifies the special configuration value
|