From 2b016dac8232e0f5c43293adcbdf7164f5fca74c Mon Sep 17 00:00:00 2001 From: Tsz-wo Sze Date: Wed, 31 Aug 2011 22:40:03 +0000 Subject: [PATCH] HADOOP-7579. Rename package names from alfredo to auth. Contributed by Alejandro Abdelnur git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1163852 13f79535-47bb-0310-9956-ffa450edef68 --- .../examples => hadoop-auth-examples}/pom.xml | 24 ++++++++++++----- .../examples/RequestLoggerFilter.java | 2 +- .../authentication}/examples/WhoClient.java | 4 +-- .../authentication}/examples/WhoServlet.java | 2 +- .../src/main/resources/log4j.properties | 2 +- .../src/main/webapp/WEB-INF/web.xml | 10 +++---- .../src/main/webapp/annonymous/index.html | 2 +- .../src/main/webapp/index.html | 2 +- .../src/main/webapp/kerberos}/index.html | 2 +- .../src/main/webapp/simple}/index.html | 2 +- .../hadoop-auth/BUILDING.txt | 12 ++++----- hadoop-common-project/hadoop-auth/README.txt | 6 ++--- hadoop-common-project/hadoop-auth/pom.xml | 7 +++-- .../client/AuthenticatedURL.java | 6 ++--- .../client/AuthenticationException.java | 2 +- .../authentication}/client/Authenticator.java | 2 +- .../client/KerberosAuthenticator.java | 2 +- .../client/PseudoAuthenticator.java | 2 +- .../server/AuthenticationFilter.java | 12 ++++----- .../server/AuthenticationHandler.java | 4 +-- .../server/AuthenticationToken.java | 4 +-- .../server/KerberosAuthenticationHandler.java | 8 +++--- .../server/PseudoAuthenticationHandler.java | 6 ++--- .../authentication}/util/KerberosName.java | 2 +- .../authentication}/util/Signer.java | 2 +- .../authentication}/util/SignerException.java | 2 +- .../src/site/apt/BuildingIt.apt.vm | 14 +++++----- .../src/site/apt/Configuration.apt.vm | 26 +++++++++---------- .../hadoop-auth/src/site/apt/Examples.apt.vm | 26 +++++++++---------- .../hadoop-auth/src/site/apt/index.apt.vm | 14 +++++----- .../hadoop-auth/src/site/site.xml | 2 +- .../authentication}/KerberosTestUtils.java | 4 +-- .../client/AuthenticatorTestCase.java | 4 +-- .../client/TestAuthenticatedURL.java | 2 +- .../client/TestKerberosAuthenticator.java | 10 +++---- .../client/TestPseudoAuthenticator.java | 6 ++--- .../server/TestAuthenticationFilter.java | 8 +++--- .../server/TestAuthenticationToken.java | 4 +-- .../TestKerberosAuthenticationHandler.java | 8 +++--- .../TestPseudoAuthenticationHandler.java | 6 ++--- .../util/TestKerberosName.java | 4 +-- .../authentication}/util/TestSigner.java | 2 +- .../hadoop-common/CHANGES.txt | 3 +++ hadoop-common-project/hadoop-common/pom.xml | 2 +- .../AuthenticationFilterInitializer.java | 2 +- .../hadoop/security/HadoopKerberosName.java | 2 +- .../security/TestAuthenticationFilter.java | 2 +- hadoop-common-project/pom.xml | 1 + hadoop-project/pom.xml | 7 ++++- 49 files changed, 155 insertions(+), 135 deletions(-) rename hadoop-common-project/{hadoop-auth/src/examples => hadoop-auth-examples}/pom.xml (73%) rename hadoop-common-project/{hadoop-auth/src/examples/src/main/java/org/apache/hadoop/alfredo => hadoop-auth-examples/src/main/java/org/apache/hadoop/security/authentication}/examples/RequestLoggerFilter.java (98%) rename hadoop-common-project/{hadoop-auth/src/examples/src/main/java/org/apache/hadoop/alfredo => hadoop-auth-examples/src/main/java/org/apache/hadoop/security/authentication}/examples/WhoClient.java (93%) rename hadoop-common-project/{hadoop-auth/src/examples/src/main/java/org/apache/hadoop/alfredo => hadoop-auth-examples/src/main/java/org/apache/hadoop/security/authentication}/examples/WhoServlet.java (96%) rename hadoop-common-project/{hadoop-auth/src/examples => hadoop-auth-examples}/src/main/resources/log4j.properties (92%) rename hadoop-common-project/{hadoop-auth/src/examples => hadoop-auth-examples}/src/main/webapp/WEB-INF/web.xml (86%) rename hadoop-common-project/{hadoop-auth/src/examples => hadoop-auth-examples}/src/main/webapp/annonymous/index.html (88%) rename hadoop-common-project/{hadoop-auth/src/examples => hadoop-auth-examples}/src/main/webapp/index.html (93%) rename hadoop-common-project/{hadoop-auth/src/examples/src/main/webapp/simple => hadoop-auth-examples/src/main/webapp/kerberos}/index.html (90%) rename hadoop-common-project/{hadoop-auth/src/examples/src/main/webapp/kerberos => hadoop-auth-examples/src/main/webapp/simple}/index.html (90%) rename hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/{alfredo => security/authentication}/client/AuthenticatedURL.java (97%) rename hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/{alfredo => security/authentication}/client/AuthenticationException.java (95%) rename hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/{alfredo => security/authentication}/client/Authenticator.java (95%) rename hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/{alfredo => security/authentication}/client/KerberosAuthenticator.java (99%) rename hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/{alfredo => security/authentication}/client/PseudoAuthenticator.java (97%) rename hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/{alfredo => security/authentication}/server/AuthenticationFilter.java (97%) rename hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/{alfredo => security/authentication}/server/AuthenticationHandler.java (96%) rename hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/{alfredo => security/authentication}/server/AuthenticationToken.java (98%) rename hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/{alfredo => security/authentication}/server/KerberosAuthenticationHandler.java (97%) rename hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/{alfredo => security/authentication}/server/PseudoAuthenticationHandler.java (95%) rename hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/{alfredo => security/authentication}/util/KerberosName.java (99%) rename hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/{alfredo => security/authentication}/util/Signer.java (98%) rename hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/{alfredo => security/authentication}/util/SignerException.java (94%) rename hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/{alfredo => security/authentication}/KerberosTestUtils.java (97%) rename hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/{alfredo => security/authentication}/client/AuthenticatorTestCase.java (97%) rename hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/{alfredo => security/authentication}/client/TestAuthenticatedURL.java (98%) rename hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/{alfredo => security/authentication}/client/TestKerberosAuthenticator.java (88%) rename hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/{alfredo => security/authentication}/client/TestPseudoAuthenticator.java (93%) rename hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/{alfredo => security/authentication}/server/TestAuthenticationFilter.java (98%) rename hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/{alfredo => security/authentication}/server/TestAuthenticationToken.java (96%) rename hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/{alfredo => security/authentication}/server/TestKerberosAuthenticationHandler.java (95%) rename hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/{alfredo => security/authentication}/server/TestPseudoAuthenticationHandler.java (94%) rename hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/{alfredo => security/authentication}/util/TestKerberosName.java (95%) rename hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/{alfredo => security/authentication}/util/TestSigner.java (97%) diff --git a/hadoop-common-project/hadoop-auth/src/examples/pom.xml b/hadoop-common-project/hadoop-auth-examples/pom.xml similarity index 73% rename from hadoop-common-project/hadoop-auth/src/examples/pom.xml rename to hadoop-common-project/hadoop-auth-examples/pom.xml index 1ce2b81c3b..67f113ba2c 100644 --- a/hadoop-common-project/hadoop-auth/src/examples/pom.xml +++ b/hadoop-common-project/hadoop-auth-examples/pom.xml @@ -18,15 +18,15 @@ org.apache.hadoop hadoop-project 0.24.0-SNAPSHOT - ../hadoop-project + ../../hadoop-project org.apache.hadoop - hadoop-alfredo-examples + hadoop-auth-examples 0.24.0-SNAPSHOT war - Hadoop Alfredo Examples - Hadoop Alfredo - Java HTTP SPNEGO Examples + Apache Hadoop Auth Examples + Apache Hadoop Auth Examples - Java HTTP SPNEGO @@ -36,7 +36,7 @@ org.apache.hadoop - hadoop-alfredo + hadoop-auth compile @@ -53,6 +53,18 @@ + + maven-war-plugin + + hadoop-auth-examples + + + + maven-deploy-plugin + + true + + org.codehaus.mojo exec-maven-plugin @@ -64,7 +76,7 @@ - org.apache.hadoop.alfredo.examples.WhoClient + org.apache.hadoop.security.authentication.examples.WhoClient ${url} diff --git a/hadoop-common-project/hadoop-auth/src/examples/src/main/java/org/apache/hadoop/alfredo/examples/RequestLoggerFilter.java b/hadoop-common-project/hadoop-auth-examples/src/main/java/org/apache/hadoop/security/authentication/examples/RequestLoggerFilter.java similarity index 98% rename from hadoop-common-project/hadoop-auth/src/examples/src/main/java/org/apache/hadoop/alfredo/examples/RequestLoggerFilter.java rename to hadoop-common-project/hadoop-auth-examples/src/main/java/org/apache/hadoop/security/authentication/examples/RequestLoggerFilter.java index 015862d468..a9721c9eba 100644 --- a/hadoop-common-project/hadoop-auth/src/examples/src/main/java/org/apache/hadoop/alfredo/examples/RequestLoggerFilter.java +++ b/hadoop-common-project/hadoop-auth-examples/src/main/java/org/apache/hadoop/security/authentication/examples/RequestLoggerFilter.java @@ -11,7 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. See accompanying LICENSE file. */ -package org.apache.hadoop.alfredo.examples; +package org.apache.hadoop.security.authentication.examples; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/hadoop-common-project/hadoop-auth/src/examples/src/main/java/org/apache/hadoop/alfredo/examples/WhoClient.java b/hadoop-common-project/hadoop-auth-examples/src/main/java/org/apache/hadoop/security/authentication/examples/WhoClient.java similarity index 93% rename from hadoop-common-project/hadoop-auth/src/examples/src/main/java/org/apache/hadoop/alfredo/examples/WhoClient.java rename to hadoop-common-project/hadoop-auth-examples/src/main/java/org/apache/hadoop/security/authentication/examples/WhoClient.java index fcbd7a23b4..2299ae1fd8 100644 --- a/hadoop-common-project/hadoop-auth/src/examples/src/main/java/org/apache/hadoop/alfredo/examples/WhoClient.java +++ b/hadoop-common-project/hadoop-auth-examples/src/main/java/org/apache/hadoop/security/authentication/examples/WhoClient.java @@ -11,9 +11,9 @@ * See the License for the specific language governing permissions and * limitations under the License. See accompanying LICENSE file. */ -package org.apache.hadoop.alfredo.examples; +package org.apache.hadoop.security.authentication.examples; -import org.apache.hadoop.alfredo.client.AuthenticatedURL; +import org.apache.hadoop.security.authentication.client.AuthenticatedURL; import java.io.BufferedReader; import java.io.InputStreamReader; diff --git a/hadoop-common-project/hadoop-auth/src/examples/src/main/java/org/apache/hadoop/alfredo/examples/WhoServlet.java b/hadoop-common-project/hadoop-auth-examples/src/main/java/org/apache/hadoop/security/authentication/examples/WhoServlet.java similarity index 96% rename from hadoop-common-project/hadoop-auth/src/examples/src/main/java/org/apache/hadoop/alfredo/examples/WhoServlet.java rename to hadoop-common-project/hadoop-auth-examples/src/main/java/org/apache/hadoop/security/authentication/examples/WhoServlet.java index 2d703daf0f..aae38133bb 100644 --- a/hadoop-common-project/hadoop-auth/src/examples/src/main/java/org/apache/hadoop/alfredo/examples/WhoServlet.java +++ b/hadoop-common-project/hadoop-auth-examples/src/main/java/org/apache/hadoop/security/authentication/examples/WhoServlet.java @@ -11,7 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. See accompanying LICENSE file. */ -package org.apache.hadoop.alfredo.examples; +package org.apache.hadoop.security.authentication.examples; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; diff --git a/hadoop-common-project/hadoop-auth/src/examples/src/main/resources/log4j.properties b/hadoop-common-project/hadoop-auth-examples/src/main/resources/log4j.properties similarity index 92% rename from hadoop-common-project/hadoop-auth/src/examples/src/main/resources/log4j.properties rename to hadoop-common-project/hadoop-auth-examples/src/main/resources/log4j.properties index 979be5cadc..5fa402026c 100644 --- a/hadoop-common-project/hadoop-auth/src/examples/src/main/resources/log4j.properties +++ b/hadoop-common-project/hadoop-auth-examples/src/main/resources/log4j.properties @@ -16,4 +16,4 @@ log4j.appender.test.Target=System.out log4j.appender.test.layout=org.apache.log4j.PatternLayout log4j.appender.test.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n -log4j.logger.org.apache.hadoop.alfredo=DEBUG, test +log4j.logger.org.apache.hadoop.security.authentication=DEBUG, test diff --git a/hadoop-common-project/hadoop-auth/src/examples/src/main/webapp/WEB-INF/web.xml b/hadoop-common-project/hadoop-auth-examples/src/main/webapp/WEB-INF/web.xml similarity index 86% rename from hadoop-common-project/hadoop-auth/src/examples/src/main/webapp/WEB-INF/web.xml rename to hadoop-common-project/hadoop-auth-examples/src/main/webapp/WEB-INF/web.xml index 400a25a9ad..e287abdd9e 100644 --- a/hadoop-common-project/hadoop-auth/src/examples/src/main/webapp/WEB-INF/web.xml +++ b/hadoop-common-project/hadoop-auth-examples/src/main/webapp/WEB-INF/web.xml @@ -16,7 +16,7 @@ whoServlet - org.apache.hadoop.alfredo.examples.WhoServlet + org.apache.hadoop.security.authentication.examples.WhoServlet @@ -36,12 +36,12 @@ requestLoggerFilter - org.apache.hadoop.alfredo.examples.RequestLoggerFilter + org.apache.hadoop.security.authentication.examples.RequestLoggerFilter anonymousFilter - org.apache.hadoop.alfredo.server.AuthenticationFilter + org.apache.hadoop.security.authentication.server.AuthenticationFilter type simple @@ -58,7 +58,7 @@ simpleFilter - org.apache.hadoop.alfredo.server.AuthenticationFilter + org.apache.hadoop.security.authentication.server.AuthenticationFilter type simple @@ -75,7 +75,7 @@ kerberosFilter - org.apache.hadoop.alfredo.server.AuthenticationFilter + org.apache.hadoop.security.authentication.server.AuthenticationFilter type kerberos diff --git a/hadoop-common-project/hadoop-auth/src/examples/src/main/webapp/annonymous/index.html b/hadoop-common-project/hadoop-auth-examples/src/main/webapp/annonymous/index.html similarity index 88% rename from hadoop-common-project/hadoop-auth/src/examples/src/main/webapp/annonymous/index.html rename to hadoop-common-project/hadoop-auth-examples/src/main/webapp/annonymous/index.html index 54e040d0cc..73294e1d17 100644 --- a/hadoop-common-project/hadoop-auth/src/examples/src/main/webapp/annonymous/index.html +++ b/hadoop-common-project/hadoop-auth-examples/src/main/webapp/annonymous/index.html @@ -13,6 +13,6 @@ --> -

Hello Hadoop Alfredo Pseudo/Simple Authentication with anonymous users!

+

Hello Hadoop Auth Pseudo/Simple Authentication with anonymous users!

diff --git a/hadoop-common-project/hadoop-auth/src/examples/src/main/webapp/index.html b/hadoop-common-project/hadoop-auth-examples/src/main/webapp/index.html similarity index 93% rename from hadoop-common-project/hadoop-auth/src/examples/src/main/webapp/index.html rename to hadoop-common-project/hadoop-auth-examples/src/main/webapp/index.html index f6b5737fd3..7c09261d4c 100644 --- a/hadoop-common-project/hadoop-auth/src/examples/src/main/webapp/index.html +++ b/hadoop-common-project/hadoop-auth-examples/src/main/webapp/index.html @@ -13,6 +13,6 @@ --> -

Hello Hadoop Alfredo Examples

+

Hello Hadoop Auth Examples!

diff --git a/hadoop-common-project/hadoop-auth/src/examples/src/main/webapp/simple/index.html b/hadoop-common-project/hadoop-auth-examples/src/main/webapp/kerberos/index.html similarity index 90% rename from hadoop-common-project/hadoop-auth/src/examples/src/main/webapp/simple/index.html rename to hadoop-common-project/hadoop-auth-examples/src/main/webapp/kerberos/index.html index bb0aef5cc7..fec01f6921 100644 --- a/hadoop-common-project/hadoop-auth/src/examples/src/main/webapp/simple/index.html +++ b/hadoop-common-project/hadoop-auth-examples/src/main/webapp/kerberos/index.html @@ -13,6 +13,6 @@ --> -

Hello Hadoop Alfredo Pseudo/Simple Authentication!

+

Hello Hadoop Auth Kerberos SPNEGO Authentication!

diff --git a/hadoop-common-project/hadoop-auth/src/examples/src/main/webapp/kerberos/index.html b/hadoop-common-project/hadoop-auth-examples/src/main/webapp/simple/index.html similarity index 90% rename from hadoop-common-project/hadoop-auth/src/examples/src/main/webapp/kerberos/index.html rename to hadoop-common-project/hadoop-auth-examples/src/main/webapp/simple/index.html index 39108400c0..7981219db3 100644 --- a/hadoop-common-project/hadoop-auth/src/examples/src/main/webapp/kerberos/index.html +++ b/hadoop-common-project/hadoop-auth-examples/src/main/webapp/simple/index.html @@ -13,6 +13,6 @@ --> -

Hello Hadoop Alfredo Kerberos SPNEGO Authentication!

+

Hello Hadoop Auth Pseudo/Simple Authentication!

diff --git a/hadoop-common-project/hadoop-auth/BUILDING.txt b/hadoop-common-project/hadoop-auth/BUILDING.txt index cbeaf54767..b81b71cbb3 100644 --- a/hadoop-common-project/hadoop-auth/BUILDING.txt +++ b/hadoop-common-project/hadoop-auth/BUILDING.txt @@ -1,20 +1,20 @@ -Build instructions for Hadoop Alfredo +Build instructions for Hadoop Auth Same as for Hadoop. -For more details refer to the Alfredo documentation pages. +For more details refer to the Hadoop Auth documentation pages. ----------------------------------------------------------------------------- Caveats: -* Alfredo has profile to enable Kerberos testcases (testKerberos) +* Hadoop Auth has profile to enable Kerberos testcases (testKerberos) To run Kerberos testcases a KDC, 2 kerberos principals and a keytab file - are required (refer to the Alfredo documentation pages for details). + are required (refer to the Hadoop Auth documentation pages for details). -* Alfredo does not have a distribution profile (dist) +* Hadoop Auth does not have a distribution profile (dist) -* Alfredo does not have a native code profile (native) +* Hadoop Auth does not have a native code profile (native) ----------------------------------------------------------------------------- diff --git a/hadoop-common-project/hadoop-auth/README.txt b/hadoop-common-project/hadoop-auth/README.txt index a51f6d3586..efa95dd516 100644 --- a/hadoop-common-project/hadoop-auth/README.txt +++ b/hadoop-common-project/hadoop-auth/README.txt @@ -1,6 +1,6 @@ -Hadoop Alfredo, Java HTTP SPNEGO +Hadoop Auth, Java HTTP SPNEGO -Hadoop Alfredo is a Java library consisting of a client and a server +Hadoop Auth is a Java library consisting of a client and a server components to enable Kerberos SPNEGO authentication for HTTP. The client component is the AuthenticatedURL class. @@ -10,6 +10,6 @@ The server component is the AuthenticationFilter servlet filter class. Authentication mechanisms support is pluggable in both the client and the server components via interfaces. -In addition to Kerberos SPNEGO, Alfredo also supports Pseudo/Simple +In addition to Kerberos SPNEGO, Hadoop Auth also supports Pseudo/Simple authentication (trusting the value of the query string parameter 'user.name'). diff --git a/hadoop-common-project/hadoop-auth/pom.xml b/hadoop-common-project/hadoop-auth/pom.xml index 66bdbfb6f6..9bcf629f03 100644 --- a/hadoop-common-project/hadoop-auth/pom.xml +++ b/hadoop-common-project/hadoop-auth/pom.xml @@ -21,13 +21,12 @@ ../../hadoop-project org.apache.hadoop - hadoop-alfredo + hadoop-auth 0.24.0-SNAPSHOT jar - Apache Hadoop Alfredo - Apache Hadoop Alfredo - Java HTTP SPNEGO - http://hadoop.apache.org/alfredo + Apache Hadoop Auth + Apache Hadoop Auth - Java HTTP SPNEGO yyyyMMdd diff --git a/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/alfredo/client/AuthenticatedURL.java b/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/client/AuthenticatedURL.java similarity index 97% rename from hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/alfredo/client/AuthenticatedURL.java rename to hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/client/AuthenticatedURL.java index 22a43b8454..5a446609c2 100644 --- a/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/alfredo/client/AuthenticatedURL.java +++ b/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/client/AuthenticatedURL.java @@ -11,9 +11,9 @@ * See the License for the specific language governing permissions and * limitations under the License. See accompanying LICENSE file. */ -package org.apache.hadoop.alfredo.client; +package org.apache.hadoop.security.authentication.client; -import org.apache.hadoop.alfredo.server.AuthenticationFilter; +import org.apache.hadoop.security.authentication.server.AuthenticationFilter; import java.io.IOException; import java.net.HttpURLConnection; @@ -63,7 +63,7 @@ public class AuthenticatedURL { /** * Name of the HTTP cookie used for the authentication token between the client and the server. */ - public static final String AUTH_COOKIE = "alfredo.auth"; + public static final String AUTH_COOKIE = "hadoop.auth"; private static final String AUTH_COOKIE_EQ = AUTH_COOKIE + "="; diff --git a/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/alfredo/client/AuthenticationException.java b/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/client/AuthenticationException.java similarity index 95% rename from hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/alfredo/client/AuthenticationException.java rename to hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/client/AuthenticationException.java index ba91847665..13632fb1bc 100644 --- a/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/alfredo/client/AuthenticationException.java +++ b/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/client/AuthenticationException.java @@ -11,7 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. See accompanying LICENSE file. */ -package org.apache.hadoop.alfredo.client; +package org.apache.hadoop.security.authentication.client; /** * Exception thrown when an authentication error occurrs. diff --git a/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/alfredo/client/Authenticator.java b/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/client/Authenticator.java similarity index 95% rename from hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/alfredo/client/Authenticator.java rename to hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/client/Authenticator.java index 85f5d40530..7b23f20699 100644 --- a/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/alfredo/client/Authenticator.java +++ b/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/client/Authenticator.java @@ -11,7 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. See accompanying LICENSE file. */ -package org.apache.hadoop.alfredo.client; +package org.apache.hadoop.security.authentication.client; import java.io.IOException; diff --git a/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/alfredo/client/KerberosAuthenticator.java b/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/client/KerberosAuthenticator.java similarity index 99% rename from hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/alfredo/client/KerberosAuthenticator.java rename to hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/client/KerberosAuthenticator.java index 3635f76d70..b3dc6fe85c 100644 --- a/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/alfredo/client/KerberosAuthenticator.java +++ b/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/client/KerberosAuthenticator.java @@ -11,7 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. See accompanying LICENSE file. */ -package org.apache.hadoop.alfredo.client; +package org.apache.hadoop.security.authentication.client; import com.sun.security.auth.module.Krb5LoginModule; import org.apache.commons.codec.binary.Base64; diff --git a/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/alfredo/client/PseudoAuthenticator.java b/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/client/PseudoAuthenticator.java similarity index 97% rename from hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/alfredo/client/PseudoAuthenticator.java rename to hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/client/PseudoAuthenticator.java index fb7991d64f..dff7a31003 100644 --- a/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/alfredo/client/PseudoAuthenticator.java +++ b/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/client/PseudoAuthenticator.java @@ -11,7 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. See accompanying LICENSE file. */ -package org.apache.hadoop.alfredo.client; +package org.apache.hadoop.security.authentication.client; import java.io.IOException; import java.net.HttpURLConnection; diff --git a/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/alfredo/server/AuthenticationFilter.java b/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/server/AuthenticationFilter.java similarity index 97% rename from hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/alfredo/server/AuthenticationFilter.java rename to hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/server/AuthenticationFilter.java index f7f4944216..f7305d0282 100644 --- a/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/alfredo/server/AuthenticationFilter.java +++ b/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/server/AuthenticationFilter.java @@ -11,12 +11,12 @@ * See the License for the specific language governing permissions and * limitations under the License. See accompanying LICENSE file. */ -package org.apache.hadoop.alfredo.server; +package org.apache.hadoop.security.authentication.server; -import org.apache.hadoop.alfredo.client.AuthenticatedURL; -import org.apache.hadoop.alfredo.client.AuthenticationException; -import org.apache.hadoop.alfredo.util.Signer; -import org.apache.hadoop.alfredo.util.SignerException; +import org.apache.hadoop.security.authentication.client.AuthenticatedURL; +import org.apache.hadoop.security.authentication.client.AuthenticationException; +import org.apache.hadoop.security.authentication.util.Signer; +import org.apache.hadoop.security.authentication.util.SignerException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -383,7 +383,7 @@ public Principal getUserPrincipal() { } /** - * Creates the Alfredo authentiation HTTP cookie. + * Creates the Hadoop authentiation HTTP cookie. *

* It sets the domain and path specified in the configuration. * diff --git a/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/alfredo/server/AuthenticationHandler.java b/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/server/AuthenticationHandler.java similarity index 96% rename from hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/alfredo/server/AuthenticationHandler.java rename to hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/server/AuthenticationHandler.java index e79c938699..958680fcad 100644 --- a/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/alfredo/server/AuthenticationHandler.java +++ b/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/server/AuthenticationHandler.java @@ -11,9 +11,9 @@ * See the License for the specific language governing permissions and * limitations under the License. See accompanying LICENSE file. */ -package org.apache.hadoop.alfredo.server; +package org.apache.hadoop.security.authentication.server; -import org.apache.hadoop.alfredo.client.AuthenticationException; +import org.apache.hadoop.security.authentication.client.AuthenticationException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; diff --git a/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/alfredo/server/AuthenticationToken.java b/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/server/AuthenticationToken.java similarity index 98% rename from hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/alfredo/server/AuthenticationToken.java rename to hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/server/AuthenticationToken.java index 0ae9947a8f..fd17249ce6 100644 --- a/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/alfredo/server/AuthenticationToken.java +++ b/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/server/AuthenticationToken.java @@ -11,9 +11,9 @@ * See the License for the specific language governing permissions and * limitations under the License. See accompanying LICENSE file. */ -package org.apache.hadoop.alfredo.server; +package org.apache.hadoop.security.authentication.server; -import org.apache.hadoop.alfredo.client.AuthenticationException; +import org.apache.hadoop.security.authentication.client.AuthenticationException; import java.security.Principal; import java.util.Arrays; diff --git a/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/alfredo/server/KerberosAuthenticationHandler.java b/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/server/KerberosAuthenticationHandler.java similarity index 97% rename from hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/alfredo/server/KerberosAuthenticationHandler.java rename to hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/server/KerberosAuthenticationHandler.java index ee985d9cdd..121d96628b 100644 --- a/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/alfredo/server/KerberosAuthenticationHandler.java +++ b/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/server/KerberosAuthenticationHandler.java @@ -11,13 +11,13 @@ * See the License for the specific language governing permissions and * limitations under the License. See accompanying LICENSE file. */ -package org.apache.hadoop.alfredo.server; +package org.apache.hadoop.security.authentication.server; -import org.apache.hadoop.alfredo.client.AuthenticationException; -import org.apache.hadoop.alfredo.client.KerberosAuthenticator; +import org.apache.hadoop.security.authentication.client.AuthenticationException; +import org.apache.hadoop.security.authentication.client.KerberosAuthenticator; import com.sun.security.auth.module.Krb5LoginModule; import org.apache.commons.codec.binary.Base64; -import org.apache.hadoop.alfredo.util.KerberosName; +import org.apache.hadoop.security.authentication.util.KerberosName; import org.ietf.jgss.GSSContext; import org.ietf.jgss.GSSCredential; import org.ietf.jgss.GSSManager; diff --git a/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/alfredo/server/PseudoAuthenticationHandler.java b/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/server/PseudoAuthenticationHandler.java similarity index 95% rename from hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/alfredo/server/PseudoAuthenticationHandler.java rename to hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/server/PseudoAuthenticationHandler.java index 4783c00822..f23b2d0381 100644 --- a/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/alfredo/server/PseudoAuthenticationHandler.java +++ b/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/server/PseudoAuthenticationHandler.java @@ -11,10 +11,10 @@ * See the License for the specific language governing permissions and * limitations under the License. See accompanying LICENSE file. */ -package org.apache.hadoop.alfredo.server; +package org.apache.hadoop.security.authentication.server; -import org.apache.hadoop.alfredo.client.AuthenticationException; -import org.apache.hadoop.alfredo.client.PseudoAuthenticator; +import org.apache.hadoop.security.authentication.client.AuthenticationException; +import org.apache.hadoop.security.authentication.client.PseudoAuthenticator; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; diff --git a/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/alfredo/util/KerberosName.java b/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/util/KerberosName.java similarity index 99% rename from hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/alfredo/util/KerberosName.java rename to hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/util/KerberosName.java index 7d68e8cf20..6a7ae0e412 100644 --- a/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/alfredo/util/KerberosName.java +++ b/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/util/KerberosName.java @@ -1,4 +1,4 @@ -package org.apache.hadoop.alfredo.util; +package org.apache.hadoop.security.authentication.util; /** * Licensed to the Apache Software Foundation (ASF) under one diff --git a/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/alfredo/util/Signer.java b/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/util/Signer.java similarity index 98% rename from hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/alfredo/util/Signer.java rename to hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/util/Signer.java index aba73cbaee..10c9a8e238 100644 --- a/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/alfredo/util/Signer.java +++ b/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/util/Signer.java @@ -11,7 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. See accompanying LICENSE file. */ -package org.apache.hadoop.alfredo.util; +package org.apache.hadoop.security.authentication.util; import org.apache.commons.codec.binary.Base64; diff --git a/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/alfredo/util/SignerException.java b/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/util/SignerException.java similarity index 94% rename from hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/alfredo/util/SignerException.java rename to hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/util/SignerException.java index 7bab225cf0..faf2007b0b 100644 --- a/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/alfredo/util/SignerException.java +++ b/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/util/SignerException.java @@ -11,7 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. See accompanying LICENSE file. */ -package org.apache.hadoop.alfredo.util; +package org.apache.hadoop.security.authentication.util; /** * Exception thrown by {@link Signer} when a string signature is invalid. diff --git a/hadoop-common-project/hadoop-auth/src/site/apt/BuildingIt.apt.vm b/hadoop-common-project/hadoop-auth/src/site/apt/BuildingIt.apt.vm index 32d09d7c43..a2e015ae0c 100644 --- a/hadoop-common-project/hadoop-auth/src/site/apt/BuildingIt.apt.vm +++ b/hadoop-common-project/hadoop-auth/src/site/apt/BuildingIt.apt.vm @@ -11,12 +11,12 @@ ~~ limitations under the License. See accompanying LICENSE file. --- - Hadoop Alfredo, Java HTTP SPNEGO ${project.version} - Building It + Hadoop Auth, Java HTTP SPNEGO ${project.version} - Building It --- --- ${maven.build.timestamp} -Hadoop Alfredo, Java HTTP SPNEGO ${project.version} - Building It +Hadoop Auth, Java HTTP SPNEGO ${project.version} - Building It \[ {{{./index.html}Go Back}} \] @@ -50,14 +50,14 @@ $ mvn test -PtestKerberos The following Maven <<<-D>>> options can be used to change the default values: - * <<>>: default value <> + * <<>>: default value <> - * <<>>: default value <> + * <<>>: default value <> - * <<>>: default value + * <<>>: default value <> (it must start 'HTTP/') - * <<>>: default value + * <<>>: default value <<${HOME}/${USER}.keytab>> ** Generating Documentation @@ -69,7 +69,7 @@ $ mvn package -Pdocs +---+ The generated documentation is available at - <<>>. + <<>>. \[ {{{./index.html}Go Back}} \] diff --git a/hadoop-common-project/hadoop-auth/src/site/apt/Configuration.apt.vm b/hadoop-common-project/hadoop-auth/src/site/apt/Configuration.apt.vm index d4d18151c3..e42ee8b4c3 100644 --- a/hadoop-common-project/hadoop-auth/src/site/apt/Configuration.apt.vm +++ b/hadoop-common-project/hadoop-auth/src/site/apt/Configuration.apt.vm @@ -11,30 +11,30 @@ ~~ limitations under the License. See accompanying LICENSE file. --- - Hadoop Alfredo, Java HTTP SPNEGO ${project.version} - Server Side + Hadoop Auth, Java HTTP SPNEGO ${project.version} - Server Side Configuration --- --- ${maven.build.timestamp} -Hadoop Alfredo, Java HTTP SPNEGO ${project.version} - Server Side +Hadoop Auth, Java HTTP SPNEGO ${project.version} - Server Side Configuration \[ {{{./index.html}Go Back}} \] * Server Side Configuration Setup - The {{{./apidocs/org/apache/hadoop/alfredo/server/AuthenticationFilter.html} - AuthenticationFilter filter}} is Alfredo's server side component. + The {{{./apidocs/org/apache/hadoop/auth/server/AuthenticationFilter.html} + AuthenticationFilter filter}} is Hadoop Auth's server side component. This filter must be configured in front of all the web application resources that required authenticated requests. For example: - The Alfredo and dependent JAR files must be in the web application classpath - (commonly the <<>> directory). + The Hadoop Auth and dependent JAR files must be in the web application + classpath (commonly the <<>> directory). - Alfredo uses SLF4J-API for logging. Alfredo Maven POM dependencies define the - SLF4J API dependency but it does not define the dependency on a concrete + Hadoop Auth uses SLF4J-API for logging. Auth Maven POM dependencies define + the SLF4J API dependency but it does not define the dependency on a concrete logging implementation, this must be addded explicitly to the web application. For example, if the web applicationan uses Log4j, the SLF4J-LOG4J12 and LOG4J jar files must be part part of the web application @@ -47,7 +47,7 @@ Configuration * <<<[PREFIX.]type>>>: the authentication type keyword (<<>> or <<>>) or a - {{{./apidocs/org/apache/hadoop/alfredo/server/AuthenticationHandler.html} + {{{./apidocs/org/apache/hadoop/auth/server/AuthenticationHandler.html} Authentication handler implementation}}. * <<<[PREFIX.]signature.secret>>>: The secret to SHA-sign the generated @@ -80,7 +80,7 @@ Configuration * <<<[PREFIX.]kerberos.keytab>>>: The path to the keytab file containing the credentials for the kerberos principal. For example: - <<>>. There is no default value. + <<>>. There is no default value. <>: @@ -90,7 +90,7 @@ Configuration kerberosFilter - org.apache.hadoop.alfredo.server.AuthenticationFilter + org.apache.hadoop.security.auth.server.AuthenticationFilter type kerberos @@ -113,7 +113,7 @@ Configuration kerberos.keytab - /tmp/alfredo.keytab + /tmp/auth.keytab @@ -146,7 +146,7 @@ Configuration simpleFilter - org.apache.hadoop.alfredo.server.AuthenticationFilter + org.apache.hadoop.security.auth.server.AuthenticationFilter type simple diff --git a/hadoop-common-project/hadoop-auth/src/site/apt/Examples.apt.vm b/hadoop-common-project/hadoop-auth/src/site/apt/Examples.apt.vm index d17b7e8a98..7070862d9e 100644 --- a/hadoop-common-project/hadoop-auth/src/site/apt/Examples.apt.vm +++ b/hadoop-common-project/hadoop-auth/src/site/apt/Examples.apt.vm @@ -11,16 +11,16 @@ ~~ limitations under the License. See accompanying LICENSE file. --- - Hadoop Alfredo, Java HTTP SPNEGO ${project.version} - Examples + Hadoop Auth, Java HTTP SPNEGO ${project.version} - Examples --- --- ${maven.build.timestamp} -Hadoop Alfredo, Java HTTP SPNEGO ${project.version} - Examples +Hadoop Auth, Java HTTP SPNEGO ${project.version} - Examples \[ {{{./index.html}Go Back}} \] -* Accessing a Alfredo protected URL Using a browser +* Accessing a Hadoop Auth protected URL Using a browser <> The browser must support HTTP Kerberos SPNEGO. For example, Firefox or Internet Explorer. @@ -31,7 +31,7 @@ Hadoop Alfredo, Java HTTP SPNEGO ${project.version} - Examples the domain of the web server that is HTTP Kerberos SPNEGO protected (if using multiple domains and hostname use comma to separate them). -* Accessing a Alfredo protected URL Using <<>> +* Accessing a Hadoop Auth protected URL Using <<>> <> The <<>> version must support GSS, run <<>>. @@ -48,10 +48,10 @@ Features: GSS-Negotiate IPv6 Largefile NTLM SSL libz +---+ $ kinit Please enter the password for tucu@LOCALHOST: -$ curl --negotiate -u foo -b ~/cookiejar.txt -c ~/cookiejar.txt http://localhost:8080/alfredo-examples/kerberos/who +$ curl --negotiate -u foo -b ~/cookiejar.txt -c ~/cookiejar.txt http://localhost:8080/hadoop-auth-examples/kerberos/who Enter host password for user 'tucu': -Hello Alfredo! +Hello Hadoop Auth Examples! +---+ * The <<<--negotiate>>> option enables SPNEGO in <<>>. @@ -68,7 +68,7 @@ Hello Alfredo! +---+ ... -URL url = new URL("http://localhost:8080/alfredo/kerberos/who"); +URL url = new URL("http://localhost:8080/hadoop-auth/kerberos/who"); AuthenticatedURL.Token token = new AuthenticatedURL.Token(); ... HttpURLConnection conn = new AuthenticatedURL(url, token).openConnection(); @@ -79,12 +79,12 @@ conn = new AuthenticatedURL(url, token).openConnection(); * Building and Running the Examples - Download Alfredo's source code, the examples are in the + Download Hadoop-Auth's source code, the examples are in the <<>> directory. ** Server Example: - Edit the <<>> and set the + Edit the <<>> and set the right configuration init parameters for the <<>> definition configured for Kerberos (the right Kerberos principal and keytab file must be specified). Refer to the {{{./Configuration.html}Configuration @@ -106,11 +106,11 @@ conn = new AuthenticatedURL(url, token).openConnection(); $ kinit Please enter the password for tucu@LOCALHOST: -$ curl http://localhost:8080/alfredo-examples/anonymous/who +$ curl http://localhost:8080/hadoop-auth-examples/anonymous/who -$ curl http://localhost:8080/alfredo-examples/simple/who?user.name=foo +$ curl http://localhost:8080/hadoop-auth-examples/simple/who?user.name=foo -$ curl --negotiate -u foo -b ~/cookiejar.txt -c ~/cookiejar.txt http://localhost:8080/alfredo-examples/kerberos/who +$ curl --negotiate -u foo -b ~/cookiejar.txt -c ~/cookiejar.txt http://localhost:8080/hadoop-auth-examples/kerberos/who +---+ ** Accessing the server using the Java client example @@ -121,7 +121,7 @@ Please enter the password for tucu@LOCALHOST: $ cd examples -$ mvn exec:java -Durl=http://localhost:8080/alfredo-examples/kerberos/who +$ mvn exec:java -Durl=http://localhost:8080/hadoop-auth-examples/kerberos/who .... diff --git a/hadoop-common-project/hadoop-auth/src/site/apt/index.apt.vm b/hadoop-common-project/hadoop-auth/src/site/apt/index.apt.vm index d070ff92b2..a2e7b5e915 100644 --- a/hadoop-common-project/hadoop-auth/src/site/apt/index.apt.vm +++ b/hadoop-common-project/hadoop-auth/src/site/apt/index.apt.vm @@ -11,27 +11,27 @@ ~~ limitations under the License. See accompanying LICENSE file. --- - Hadoop Alfredo, Java HTTP SPNEGO ${project.version} + Hadoop Auth, Java HTTP SPNEGO ${project.version} --- --- ${maven.build.timestamp} -Hadoop Alfredo, Java HTTP SPNEGO ${project.version} +Hadoop Auth, Java HTTP SPNEGO ${project.version} - Hadoop Alfredo is a Java library consisting of a client and a server + Hadoop Auth is a Java library consisting of a client and a server components to enable Kerberos SPNEGO authentication for HTTP. - Alfredo also supports additional authentication mechanisms on the client + Hadoop Auth also supports additional authentication mechanisms on the client and the server side via 2 simple interfaces. * License - Alfredo is distributed under {{{http://www.apache.org/licenses/}Apache + Hadoop Auth is distributed under {{{http://www.apache.org/licenses/}Apache License 2.0}}. -* How Does Alfredo Works? +* How Does Auth Works? - Alfredo enforces authentication on protected resources, once authentiation + Hadoop Auth enforces authentication on protected resources, once authentiation has been established it sets a signed HTTP Cookie that contains an authentication token with the user name, user principal, authentication type and expiration time. diff --git a/hadoop-common-project/hadoop-auth/src/site/site.xml b/hadoop-common-project/hadoop-auth/src/site/site.xml index 483581dc9f..4fab0f0e1d 100644 --- a/hadoop-common-project/hadoop-auth/src/site/site.xml +++ b/hadoop-common-project/hadoop-auth/src/site/site.xml @@ -11,7 +11,7 @@ See the License for the specific language governing permissions and limitations under the License. See accompanying LICENSE file. --> - + diff --git a/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/alfredo/KerberosTestUtils.java b/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/KerberosTestUtils.java similarity index 97% rename from hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/alfredo/KerberosTestUtils.java rename to hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/KerberosTestUtils.java index ae720dbb79..92e1de5a26 100644 --- a/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/alfredo/KerberosTestUtils.java +++ b/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/KerberosTestUtils.java @@ -11,7 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. See accompanying LICENSE file. */ -package org.apache.hadoop.alfredo; +package org.apache.hadoop.security.authentication; import com.sun.security.auth.module.Krb5LoginModule; @@ -34,7 +34,7 @@ * Test helper class for Java Kerberos setup. */ public class KerberosTestUtils { - private static final String PREFIX = "alfredo.test."; + private static final String PREFIX = "hadoop-auth.test."; public static final String REALM = PREFIX + "kerberos.realm"; diff --git a/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/alfredo/client/AuthenticatorTestCase.java b/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/client/AuthenticatorTestCase.java similarity index 97% rename from hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/alfredo/client/AuthenticatorTestCase.java rename to hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/client/AuthenticatorTestCase.java index d28f5278f1..93c519808f 100644 --- a/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/alfredo/client/AuthenticatorTestCase.java +++ b/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/client/AuthenticatorTestCase.java @@ -11,9 +11,9 @@ * See the License for the specific language governing permissions and * limitations under the License. See accompanying LICENSE file. */ -package org.apache.hadoop.alfredo.client; +package org.apache.hadoop.security.authentication.client; -import org.apache.hadoop.alfredo.server.AuthenticationFilter; +import org.apache.hadoop.security.authentication.server.AuthenticationFilter; import junit.framework.TestCase; import org.mortbay.jetty.Server; import org.mortbay.jetty.servlet.Context; diff --git a/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/alfredo/client/TestAuthenticatedURL.java b/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/client/TestAuthenticatedURL.java similarity index 98% rename from hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/alfredo/client/TestAuthenticatedURL.java rename to hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/client/TestAuthenticatedURL.java index f082fadfc8..525af62606 100644 --- a/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/alfredo/client/TestAuthenticatedURL.java +++ b/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/client/TestAuthenticatedURL.java @@ -11,7 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. See accompanying LICENSE file. */ -package org.apache.hadoop.alfredo.client; +package org.apache.hadoop.security.authentication.client; import junit.framework.TestCase; import org.mockito.Mockito; diff --git a/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/alfredo/client/TestKerberosAuthenticator.java b/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/client/TestKerberosAuthenticator.java similarity index 88% rename from hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/alfredo/client/TestKerberosAuthenticator.java rename to hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/client/TestKerberosAuthenticator.java index 2fdb9bc253..f086870ee1 100644 --- a/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/alfredo/client/TestKerberosAuthenticator.java +++ b/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/client/TestKerberosAuthenticator.java @@ -11,12 +11,12 @@ * See the License for the specific language governing permissions and * limitations under the License. See accompanying LICENSE file. */ -package org.apache.hadoop.alfredo.client; +package org.apache.hadoop.security.authentication.client; -import org.apache.hadoop.alfredo.KerberosTestUtils; -import org.apache.hadoop.alfredo.server.AuthenticationFilter; -import org.apache.hadoop.alfredo.server.PseudoAuthenticationHandler; -import org.apache.hadoop.alfredo.server.KerberosAuthenticationHandler; +import org.apache.hadoop.security.authentication.KerberosTestUtils; +import org.apache.hadoop.security.authentication.server.AuthenticationFilter; +import org.apache.hadoop.security.authentication.server.PseudoAuthenticationHandler; +import org.apache.hadoop.security.authentication.server.KerberosAuthenticationHandler; import java.net.HttpURLConnection; import java.net.URL; diff --git a/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/alfredo/client/TestPseudoAuthenticator.java b/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/client/TestPseudoAuthenticator.java similarity index 93% rename from hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/alfredo/client/TestPseudoAuthenticator.java rename to hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/client/TestPseudoAuthenticator.java index 5d151c2337..807052e848 100644 --- a/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/alfredo/client/TestPseudoAuthenticator.java +++ b/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/client/TestPseudoAuthenticator.java @@ -11,10 +11,10 @@ * See the License for the specific language governing permissions and * limitations under the License. See accompanying LICENSE file. */ -package org.apache.hadoop.alfredo.client; +package org.apache.hadoop.security.authentication.client; -import org.apache.hadoop.alfredo.server.AuthenticationFilter; -import org.apache.hadoop.alfredo.server.PseudoAuthenticationHandler; +import org.apache.hadoop.security.authentication.server.AuthenticationFilter; +import org.apache.hadoop.security.authentication.server.PseudoAuthenticationHandler; import java.net.HttpURLConnection; import java.net.URL; diff --git a/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/alfredo/server/TestAuthenticationFilter.java b/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/server/TestAuthenticationFilter.java similarity index 98% rename from hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/alfredo/server/TestAuthenticationFilter.java rename to hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/server/TestAuthenticationFilter.java index e450a5603f..415600e97e 100644 --- a/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/alfredo/server/TestAuthenticationFilter.java +++ b/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/server/TestAuthenticationFilter.java @@ -11,11 +11,11 @@ * See the License for the specific language governing permissions and * limitations under the License. See accompanying LICENSE file. */ -package org.apache.hadoop.alfredo.server; +package org.apache.hadoop.security.authentication.server; -import org.apache.hadoop.alfredo.client.AuthenticatedURL; -import org.apache.hadoop.alfredo.client.AuthenticationException; -import org.apache.hadoop.alfredo.util.Signer; +import org.apache.hadoop.security.authentication.client.AuthenticatedURL; +import org.apache.hadoop.security.authentication.client.AuthenticationException; +import org.apache.hadoop.security.authentication.util.Signer; import junit.framework.TestCase; import org.mockito.Mockito; import org.mockito.invocation.InvocationOnMock; diff --git a/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/alfredo/server/TestAuthenticationToken.java b/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/server/TestAuthenticationToken.java similarity index 96% rename from hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/alfredo/server/TestAuthenticationToken.java rename to hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/server/TestAuthenticationToken.java index 1c29a3364d..25f9100217 100644 --- a/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/alfredo/server/TestAuthenticationToken.java +++ b/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/server/TestAuthenticationToken.java @@ -11,9 +11,9 @@ * See the License for the specific language governing permissions and * limitations under the License. See accompanying LICENSE file. */ -package org.apache.hadoop.alfredo.server; +package org.apache.hadoop.security.authentication.server; -import org.apache.hadoop.alfredo.client.AuthenticationException; +import org.apache.hadoop.security.authentication.client.AuthenticationException; import junit.framework.TestCase; public class TestAuthenticationToken extends TestCase { diff --git a/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/alfredo/server/TestKerberosAuthenticationHandler.java b/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/server/TestKerberosAuthenticationHandler.java similarity index 95% rename from hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/alfredo/server/TestKerberosAuthenticationHandler.java rename to hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/server/TestKerberosAuthenticationHandler.java index 3089d1a659..8187c9ec66 100644 --- a/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/alfredo/server/TestKerberosAuthenticationHandler.java +++ b/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/server/TestKerberosAuthenticationHandler.java @@ -11,11 +11,11 @@ * See the License for the specific language governing permissions and * limitations under the License. See accompanying LICENSE file. */ -package org.apache.hadoop.alfredo.server; +package org.apache.hadoop.security.authentication.server; -import org.apache.hadoop.alfredo.KerberosTestUtils; -import org.apache.hadoop.alfredo.client.AuthenticationException; -import org.apache.hadoop.alfredo.client.KerberosAuthenticator; +import org.apache.hadoop.security.authentication.KerberosTestUtils; +import org.apache.hadoop.security.authentication.client.AuthenticationException; +import org.apache.hadoop.security.authentication.client.KerberosAuthenticator; import junit.framework.TestCase; import org.apache.commons.codec.binary.Base64; import org.ietf.jgss.GSSContext; diff --git a/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/alfredo/server/TestPseudoAuthenticationHandler.java b/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/server/TestPseudoAuthenticationHandler.java similarity index 94% rename from hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/alfredo/server/TestPseudoAuthenticationHandler.java rename to hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/server/TestPseudoAuthenticationHandler.java index 3a05bd435d..dbc2c36833 100644 --- a/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/alfredo/server/TestPseudoAuthenticationHandler.java +++ b/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/server/TestPseudoAuthenticationHandler.java @@ -11,11 +11,11 @@ * See the License for the specific language governing permissions and * limitations under the License. See accompanying LICENSE file. */ -package org.apache.hadoop.alfredo.server; +package org.apache.hadoop.security.authentication.server; -import org.apache.hadoop.alfredo.client.AuthenticationException; +import org.apache.hadoop.security.authentication.client.AuthenticationException; import junit.framework.TestCase; -import org.apache.hadoop.alfredo.client.PseudoAuthenticator; +import org.apache.hadoop.security.authentication.client.PseudoAuthenticator; import org.mockito.Mockito; import javax.servlet.http.HttpServletRequest; diff --git a/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/alfredo/util/TestKerberosName.java b/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/util/TestKerberosName.java similarity index 95% rename from hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/alfredo/util/TestKerberosName.java rename to hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/util/TestKerberosName.java index 16a15aa647..b6c0b0fb2e 100644 --- a/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/alfredo/util/TestKerberosName.java +++ b/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/util/TestKerberosName.java @@ -1,4 +1,4 @@ -package org.apache.hadoop.alfredo.util; +package org.apache.hadoop.security.authentication.util; /** * Licensed to the Apache Software Foundation (ASF) under one @@ -20,7 +20,7 @@ import java.io.IOException; -import org.apache.hadoop.alfredo.KerberosTestUtils; +import org.apache.hadoop.security.authentication.KerberosTestUtils; import org.junit.Before; import org.junit.Test; import static org.junit.Assert.*; diff --git a/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/alfredo/util/TestSigner.java b/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/util/TestSigner.java similarity index 97% rename from hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/alfredo/util/TestSigner.java rename to hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/util/TestSigner.java index c0236ba7c4..9b3d1a2a2a 100644 --- a/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/alfredo/util/TestSigner.java +++ b/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/util/TestSigner.java @@ -11,7 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. See accompanying LICENSE file. */ -package org.apache.hadoop.alfredo.util; +package org.apache.hadoop.security.authentication.util; import junit.framework.TestCase; diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 8f72154eb4..8b7bfd2dbf 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -347,6 +347,9 @@ Release 0.23.0 - Unreleased HADOOP-7547. Add generic type in WritableComparable subclasses. (Uma Maheswara Rao G via szetszwo) + HADOOP-7579. Rename package names from alfredo to auth. + (Alejandro Abdelnur via szetszwo) + OPTIMIZATIONS HADOOP-7333. Performance improvement in PureJavaCrc32. (Eric Caspole diff --git a/hadoop-common-project/hadoop-common/pom.xml b/hadoop-common-project/hadoop-common/pom.xml index 1dbc2a908f..bd94253029 100644 --- a/hadoop-common-project/hadoop-common/pom.xml +++ b/hadoop-common-project/hadoop-common/pom.xml @@ -239,7 +239,7 @@ org.apache.hadoop - hadoop-alfredo + hadoop-auth compile diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/AuthenticationFilterInitializer.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/AuthenticationFilterInitializer.java index 7f983f3e3d..cd6ab7b326 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/AuthenticationFilterInitializer.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/AuthenticationFilterInitializer.java @@ -17,7 +17,7 @@ */ package org.apache.hadoop.security; -import org.apache.hadoop.alfredo.server.AuthenticationFilter; +import org.apache.hadoop.security.authentication.server.AuthenticationFilter; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.http.FilterContainer; import org.apache.hadoop.http.FilterInitializer; diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/HadoopKerberosName.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/HadoopKerberosName.java index 35e8d39d6d..36f1943f50 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/HadoopKerberosName.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/HadoopKerberosName.java @@ -23,7 +23,7 @@ import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.classification.InterfaceStability; import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.alfredo.util.KerberosName; +import org.apache.hadoop.security.authentication.util.KerberosName; import sun.security.krb5.Config; import sun.security.krb5.KrbException; diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/TestAuthenticationFilter.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/TestAuthenticationFilter.java index a820cd49b3..7a21e4c6b8 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/TestAuthenticationFilter.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/TestAuthenticationFilter.java @@ -18,7 +18,7 @@ import junit.framework.TestCase; -import org.apache.hadoop.alfredo.server.AuthenticationFilter; +import org.apache.hadoop.security.authentication.server.AuthenticationFilter; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.http.FilterContainer; import org.mockito.Mockito; diff --git a/hadoop-common-project/pom.xml b/hadoop-common-project/pom.xml index 552b3c76c6..ac196188a7 100644 --- a/hadoop-common-project/pom.xml +++ b/hadoop-common-project/pom.xml @@ -29,6 +29,7 @@ hadoop-auth + hadoop-auth-examples hadoop-common hadoop-annotations diff --git a/hadoop-project/pom.xml b/hadoop-project/pom.xml index 901b27c66b..013dd54a0e 100644 --- a/hadoop-project/pom.xml +++ b/hadoop-project/pom.xml @@ -108,7 +108,7 @@ org.apache.hadoop - hadoop-alfredo + hadoop-auth ${project.version} @@ -485,6 +485,11 @@ maven-project-info-reports-plugin 2.4 + + org.codehaus.mojo + exec-maven-plugin + 1.2 +