sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject sqoop git commit: SQOOP-2249: Sqoop2: ErrorCodes: Move SecurityError to core module
Date Mon, 23 Mar 2015 22:24:25 GMT
Repository: sqoop
Updated Branches:
  refs/heads/sqoop2 205cf2c02 -> 587f50d18


SQOOP-2249: Sqoop2: ErrorCodes: Move SecurityError to core module

(Jarek Jarcec Cecho via Abraham Elmahrek)


Project: http://git-wip-us.apache.org/repos/asf/sqoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/sqoop/commit/587f50d1
Tree: http://git-wip-us.apache.org/repos/asf/sqoop/tree/587f50d1
Diff: http://git-wip-us.apache.org/repos/asf/sqoop/diff/587f50d1

Branch: refs/heads/sqoop2
Commit: 587f50d184494597bbb2d1c6b0832bb837b2a1cb
Parents: 205cf2c
Author: Abraham Elmahrek <abe@apache.org>
Authored: Mon Mar 23 15:23:34 2015 -0700
Committer: Abraham Elmahrek <abe@apache.org>
Committed: Mon Mar 23 15:23:34 2015 -0700

----------------------------------------------------------------------
 .../apache/sqoop/error/code/SecurityError.java  | 82 --------------------
 .../apache/sqoop/security/SecurityError.java    | 82 ++++++++++++++++++++
 .../apache/sqoop/security/SecurityFactory.java  |  1 -
 .../KerberosAuthenticationHandler.java          |  2 +-
 .../DefaultAuthenticationProvider.java          |  2 +-
 .../sqoop/filter/SqoopAuthenticationFilter.java |  2 +-
 .../handler/AuthorizationRequestHandler.java    |  2 +-
 7 files changed, 86 insertions(+), 87 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sqoop/blob/587f50d1/common/src/main/java/org/apache/sqoop/error/code/SecurityError.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/sqoop/error/code/SecurityError.java b/common/src/main/java/org/apache/sqoop/error/code/SecurityError.java
deleted file mode 100644
index dee745d..0000000
--- a/common/src/main/java/org/apache/sqoop/error/code/SecurityError.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.sqoop.error.code;
-
-import org.apache.sqoop.common.ErrorCode;
-
-public enum SecurityError implements ErrorCode {
-
-  /** An unknown error has occurred. */
-  AUTH_0000("An unknown error has occurred"),
-
-  /** The system was not able to find Kerberos keytab in sqoop configuration. */
-  AUTH_0001("Unable to find Kerberos keytab"),
-
-  /** The system was not able to find Kerberos principal in sqoop configuration. */
-  AUTH_0002("Unable to find Kerberos principal"),
-
-  /** The system was not able to login using Kerberos keytab and principal in sqoop configuration.
*/
-  AUTH_0003("Unable to login using Kerberos keytab and principal"),
-
-  /** Invalid authentication type {simple, Kerberos}. */
-  AUTH_0004("Invalid authentication type"),
-
-  /** The system was not able to find Kerberos keytab for http in sqoop configuration. */
-  AUTH_0005("Unable to find Kerberos keytab for http"),
-
-  /** The system was not able to find Kerberos principal for http in sqoop configuration.
*/
-  AUTH_0006("Unable to find Kerberos principal for http"),
-
-  /** The system was not able to find authorization handler. */
-  AUTH_0007("Unable to find authorization handler"),
-
-  /** The system was not able to find authorization access controller. */
-  AUTH_0008("Unable to find authorization access controller"),
-
-  /** The system was not able to find authorization validator. */
-  AUTH_0009("Unable to find authorization validator"),
-
-  /** The system was not able to find authentication provider. */
-  AUTH_0010("Unable to find authentication provider"),
-
-  /** The system was not able to get authentication from http request. */
-  AUTH_0011("Unable to get remote authentication from http request"),
-
-  /** The system was not able to get role name from http request. */
-  AUTH_0012("Unable to get role name from http request"),
-
-  /** The system was not able to get principal from http request. */
-  AUTH_0013("Unable to get principal from http request"),
-
-  /** Authorization Exception, used by authorization implementation, etc. Sentry. */
-  AUTH_0014("Authorization exception");
-
-  private final String message;
-
-  private SecurityError(String message) {
-    this.message = message;
-  }
-
-  public String getCode() {
-    return name();
-  }
-
-  public String getMessage() {
-    return message;
-  }
-}

http://git-wip-us.apache.org/repos/asf/sqoop/blob/587f50d1/core/src/main/java/org/apache/sqoop/security/SecurityError.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/sqoop/security/SecurityError.java b/core/src/main/java/org/apache/sqoop/security/SecurityError.java
new file mode 100644
index 0000000..9f85b9e
--- /dev/null
+++ b/core/src/main/java/org/apache/sqoop/security/SecurityError.java
@@ -0,0 +1,82 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sqoop.security;
+
+import org.apache.sqoop.common.ErrorCode;
+
+public enum SecurityError implements ErrorCode {
+
+  /** An unknown error has occurred. */
+  AUTH_0000("An unknown error has occurred"),
+
+  /** The system was not able to find Kerberos keytab in sqoop configuration. */
+  AUTH_0001("Unable to find Kerberos keytab"),
+
+  /** The system was not able to find Kerberos principal in sqoop configuration. */
+  AUTH_0002("Unable to find Kerberos principal"),
+
+  /** The system was not able to login using Kerberos keytab and principal in sqoop configuration.
*/
+  AUTH_0003("Unable to login using Kerberos keytab and principal"),
+
+  /** Invalid authentication type {simple, Kerberos}. */
+  AUTH_0004("Invalid authentication type"),
+
+  /** The system was not able to find Kerberos keytab for http in sqoop configuration. */
+  AUTH_0005("Unable to find Kerberos keytab for http"),
+
+  /** The system was not able to find Kerberos principal for http in sqoop configuration.
*/
+  AUTH_0006("Unable to find Kerberos principal for http"),
+
+  /** The system was not able to find authorization handler. */
+  AUTH_0007("Unable to find authorization handler"),
+
+  /** The system was not able to find authorization access controller. */
+  AUTH_0008("Unable to find authorization access controller"),
+
+  /** The system was not able to find authorization validator. */
+  AUTH_0009("Unable to find authorization validator"),
+
+  /** The system was not able to find authentication provider. */
+  AUTH_0010("Unable to find authentication provider"),
+
+  /** The system was not able to get authentication from http request. */
+  AUTH_0011("Unable to get remote authentication from http request"),
+
+  /** The system was not able to get role name from http request. */
+  AUTH_0012("Unable to get role name from http request"),
+
+  /** The system was not able to get principal from http request. */
+  AUTH_0013("Unable to get principal from http request"),
+
+  /** Authorization Exception, used by authorization implementation, etc. Sentry. */
+  AUTH_0014("Authorization exception");
+
+  private final String message;
+
+  private SecurityError(String message) {
+    this.message = message;
+  }
+
+  public String getCode() {
+    return name();
+  }
+
+  public String getMessage() {
+    return message;
+  }
+}

http://git-wip-us.apache.org/repos/asf/sqoop/blob/587f50d1/core/src/main/java/org/apache/sqoop/security/SecurityFactory.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/sqoop/security/SecurityFactory.java b/core/src/main/java/org/apache/sqoop/security/SecurityFactory.java
index 9fdf5f8..727d3be 100644
--- a/core/src/main/java/org/apache/sqoop/security/SecurityFactory.java
+++ b/core/src/main/java/org/apache/sqoop/security/SecurityFactory.java
@@ -18,7 +18,6 @@
 package org.apache.sqoop.security;
 
 import org.apache.sqoop.common.SqoopException;
-import org.apache.sqoop.error.code.SecurityError;
 import org.apache.sqoop.utils.ClassUtils;
 
 /**

http://git-wip-us.apache.org/repos/asf/sqoop/blob/587f50d1/security/src/main/java/org/apache/sqoop/security/Authentication/KerberosAuthenticationHandler.java
----------------------------------------------------------------------
diff --git a/security/src/main/java/org/apache/sqoop/security/Authentication/KerberosAuthenticationHandler.java
b/security/src/main/java/org/apache/sqoop/security/Authentication/KerberosAuthenticationHandler.java
index 3515b81..db89a2d 100644
--- a/security/src/main/java/org/apache/sqoop/security/Authentication/KerberosAuthenticationHandler.java
+++ b/security/src/main/java/org/apache/sqoop/security/Authentication/KerberosAuthenticationHandler.java
@@ -26,7 +26,7 @@ import org.apache.sqoop.common.SqoopException;
 import org.apache.sqoop.core.SqoopConfiguration;
 import org.apache.sqoop.security.AuthenticationHandler;
 import org.apache.sqoop.security.SecurityConstants;
-import org.apache.sqoop.error.code.SecurityError;
+import org.apache.sqoop.security.SecurityError;
 
 import java.io.IOException;
 

http://git-wip-us.apache.org/repos/asf/sqoop/blob/587f50d1/security/src/main/java/org/apache/sqoop/security/Authorization/DefaultAuthenticationProvider.java
----------------------------------------------------------------------
diff --git a/security/src/main/java/org/apache/sqoop/security/Authorization/DefaultAuthenticationProvider.java
b/security/src/main/java/org/apache/sqoop/security/Authorization/DefaultAuthenticationProvider.java
index e05f1de..547040b 100644
--- a/security/src/main/java/org/apache/sqoop/security/Authorization/DefaultAuthenticationProvider.java
+++ b/security/src/main/java/org/apache/sqoop/security/Authorization/DefaultAuthenticationProvider.java
@@ -22,7 +22,7 @@ import org.apache.hadoop.security.UserGroupInformation;
 import org.apache.hadoop.security.token.delegation.web.HttpUserGroupInformation;
 import org.apache.sqoop.common.SqoopException;
 import org.apache.sqoop.security.AuthenticationProvider;
-import org.apache.sqoop.error.code.SecurityError;
+import org.apache.sqoop.security.SecurityError;
 
 public class DefaultAuthenticationProvider extends AuthenticationProvider {
 

http://git-wip-us.apache.org/repos/asf/sqoop/blob/587f50d1/server/src/main/java/org/apache/sqoop/filter/SqoopAuthenticationFilter.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/sqoop/filter/SqoopAuthenticationFilter.java b/server/src/main/java/org/apache/sqoop/filter/SqoopAuthenticationFilter.java
index 20d43e4..ddca9d4 100644
--- a/server/src/main/java/org/apache/sqoop/filter/SqoopAuthenticationFilter.java
+++ b/server/src/main/java/org/apache/sqoop/filter/SqoopAuthenticationFilter.java
@@ -29,7 +29,7 @@ import org.apache.sqoop.common.MapContext;
 import org.apache.sqoop.common.SqoopException;
 import org.apache.sqoop.core.SqoopConfiguration;
 import org.apache.sqoop.security.SecurityConstants;
-import org.apache.sqoop.error.code.SecurityError;
+import org.apache.sqoop.security.SecurityError;
 
 import javax.servlet.FilterConfig;
 import javax.servlet.ServletException;

http://git-wip-us.apache.org/repos/asf/sqoop/blob/587f50d1/server/src/main/java/org/apache/sqoop/handler/AuthorizationRequestHandler.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/sqoop/handler/AuthorizationRequestHandler.java
b/server/src/main/java/org/apache/sqoop/handler/AuthorizationRequestHandler.java
index 1d2af8d..00f4b52 100644
--- a/server/src/main/java/org/apache/sqoop/handler/AuthorizationRequestHandler.java
+++ b/server/src/main/java/org/apache/sqoop/handler/AuthorizationRequestHandler.java
@@ -28,7 +28,7 @@ import org.apache.sqoop.model.MResource;
 import org.apache.sqoop.model.MRole;
 import org.apache.sqoop.security.AuthorizationHandler;
 import org.apache.sqoop.security.AuthorizationManager;
-import org.apache.sqoop.error.code.SecurityError;
+import org.apache.sqoop.security.SecurityError;
 import org.apache.sqoop.server.RequestContext;
 import org.apache.sqoop.server.RequestHandler;
 import org.json.simple.JSONObject;


Mime
View raw message