You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by kb...@apache.org on 2016/09/13 05:52:03 UTC

incubator-atlas git commit: ATLAS-1133 Jetty Server start doesn't throw exception when user-credential.properties file is not found (nixonrodrigues, svimal2106 via kevalbhatt)

Repository: incubator-atlas
Updated Branches:
  refs/heads/master 5ca1ed3f0 -> 165efca69


ATLAS-1133 Jetty Server start doesn't throw exception when user-credential.properties file is not found (nixonrodrigues,svimal2106 via kevalbhatt)


Project: http://git-wip-us.apache.org/repos/asf/incubator-atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-atlas/commit/165efca6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/165efca6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/165efca6

Branch: refs/heads/master
Commit: 165efca69939577f56526d7df48b07ec4509c8e0
Parents: 5ca1ed3
Author: kevalbhatt <kb...@apache.org>
Authored: Tue Sep 13 11:21:45 2016 +0530
Committer: kevalbhatt <kb...@apache.org>
Committed: Tue Sep 13 11:21:45 2016 +0530

----------------------------------------------------------------------
 .../authorize/simple/SimpleAtlasAuthorizer.java    |  1 +
 release-log.txt                                    |  1 +
 webapp/pom.xml                                     | 17 +++++++++++++++++
 .../java/org/apache/atlas/web/dao/UserDao.java     |  4 ++--
 .../web/security/NegativeSSLAndKerberosTest.java   |  9 +++++++++
 5 files changed, 30 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/165efca6/authorization/src/main/java/org/apache/atlas/authorize/simple/SimpleAtlasAuthorizer.java
----------------------------------------------------------------------
diff --git a/authorization/src/main/java/org/apache/atlas/authorize/simple/SimpleAtlasAuthorizer.java b/authorization/src/main/java/org/apache/atlas/authorize/simple/SimpleAtlasAuthorizer.java
index 30e2067..57156b7 100644
--- a/authorization/src/main/java/org/apache/atlas/authorize/simple/SimpleAtlasAuthorizer.java
+++ b/authorization/src/main/java/org/apache/atlas/authorize/simple/SimpleAtlasAuthorizer.java
@@ -113,6 +113,7 @@ public final class SimpleAtlasAuthorizer implements AtlasAuthorizer {
             if (LOG.isErrorEnabled()) {
                 LOG.error("SimpleAtlasAuthorizer could not be initialized properly due to : ", e);
             }
+            throw new RuntimeException(e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/165efca6/release-log.txt
----------------------------------------------------------------------
diff --git a/release-log.txt b/release-log.txt
index 7e3b835..73b8a3a 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -10,6 +10,7 @@ ATLAS-1060 Add composite indexes for exact match performance improvements for al
 ATLAS-1127 Modify creation and modification timestamps to Date instead of Long(sumasai)
 
 ALL CHANGES:
+ATLAS-1133 Jetty Server start doesn't throw exception when user-credential.properties file is not found (nixonrodrigues,svimal2106 via kevalbhatt)
 ATLAS-1149 Changes to UI to sort the hive table schema based on "position" attribute of hive_column (Kalyanikashikar via kevalbhatt)
 ATLAS-1162 Register shutdown hooks with Hadoop's ShutdownHookManager, instead of directly with Java Runtime (mneethiraj via sumasai)
 ATLAS-1098 Atlas allows creation of tag with name "isa" which causes exceptions during search (apoorvnaik via kevalbhatt)

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/165efca6/webapp/pom.xml
----------------------------------------------------------------------
diff --git a/webapp/pom.xml b/webapp/pom.xml
index 708a216..5ef1a7f 100755
--- a/webapp/pom.xml
+++ b/webapp/pom.xml
@@ -489,6 +489,23 @@
                     <testClassesDirectory>${project.build.directory}/../../webapp/target/test-classes/</testClassesDirectory>
                     <useTestClasspath>true</useTestClasspath>
                 </configuration>
+                <dependencies>
+                    <dependency>
+                        <groupId>org.eclipse.jetty</groupId>
+                        <artifactId>jetty-jsp</artifactId>
+                        <version>${jetty.version}</version>
+                        <exclusions>
+                            <exclusion>
+                                <groupId>javax.servlet</groupId>
+                                <artifactId>*</artifactId>
+                            </exclusion>
+                            <exclusion>
+                                <groupId>org.glassfish</groupId>
+                                <artifactId>javax.el</artifactId>
+                            </exclusion>
+                        </exclusions>
+                    </dependency>
+                </dependencies>
                 <executions>
                     <execution>
                         <id>start-jetty</id>

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/165efca6/webapp/src/main/java/org/apache/atlas/web/dao/UserDao.java
----------------------------------------------------------------------
diff --git a/webapp/src/main/java/org/apache/atlas/web/dao/UserDao.java b/webapp/src/main/java/org/apache/atlas/web/dao/UserDao.java
index 6b83c21..e746855 100644
--- a/webapp/src/main/java/org/apache/atlas/web/dao/UserDao.java
+++ b/webapp/src/main/java/org/apache/atlas/web/dao/UserDao.java
@@ -72,8 +72,8 @@ public class UserDao {
             }
 
         } catch (IOException | AtlasException e) {
-            LOG.error("Error while reading user.properties file, filepath="
-                    + PROPERTY_FILE_PATH, e);
+            LOG.error("Error while reading user.properties file, filepath=" + PROPERTY_FILE_PATH, e);
+            throw new RuntimeException(e);
         } finally {
             if(inStr != null) {
                 try {

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/165efca6/webapp/src/test/java/org/apache/atlas/web/security/NegativeSSLAndKerberosTest.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/atlas/web/security/NegativeSSLAndKerberosTest.java b/webapp/src/test/java/org/apache/atlas/web/security/NegativeSSLAndKerberosTest.java
index 4ad01cf..6651b44 100755
--- a/webapp/src/test/java/org/apache/atlas/web/security/NegativeSSLAndKerberosTest.java
+++ b/webapp/src/test/java/org/apache/atlas/web/security/NegativeSSLAndKerberosTest.java
@@ -87,9 +87,18 @@ public class NegativeSSLAndKerberosTest extends BaseSSLAndKerberosTest {
         configuration.setProperty("atlas.authentication.method.kerberos.name.rules",
                 "RULE:[1:$1@$0](.*@EXAMPLE.COM)s/@.*//\nDEFAULT");
 
+        configuration.setProperty("atlas.authentication.method.file", "true");
+        configuration.setProperty("atlas.authentication.method.file.filename", persistDir
+                + "/users-credentials");
+        configuration.setProperty("atlas.auth.policy.file",persistDir
+                + "/policy-store.txt" );
+
         TestUtils.writeConfiguration(configuration, persistDir + File.separator +
                 ApplicationProperties.APPLICATION_PROPERTIES);
 
+        setupUserCredential(persistDir);
+        setUpPolicyStore(persistDir);
+
         // save original setting
         originalConf = System.getProperty("atlas.conf");
         System.setProperty("atlas.conf", persistDir);