diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index ad0667d99e1..4afae423896 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -84,6 +84,9 @@ Release 2.5.0 - UNRELEASED HADOOP-10531. hadoop-config.sh - bug in --hosts argument. (Sebastien Barrier via wang) + HADOOP-10539. Provide backward compatibility for ProxyUsers.authorize() + call. (Benoy Antony via cnauroth) + Release 2.4.1 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/authorize/ProxyUsers.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/authorize/ProxyUsers.java index 5d2891ce62d..06b64b2f6b6 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/authorize/ProxyUsers.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/authorize/ProxyUsers.java @@ -34,7 +34,7 @@ import com.google.common.annotations.VisibleForTesting; -@InterfaceAudience.Private +@InterfaceAudience.LimitedPrivate({"HDFS", "MapReduce", "HBase", "Hive"}) public class ProxyUsers { private static final String CONF_HOSTS = ".hosts"; @@ -188,6 +188,20 @@ public static synchronized void authorize(UserGroupInformation user, + 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