You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@falcon.apache.org by aj...@apache.org on 2016/01/11 10:54:26 UTC

[3/3] falcon git commit: FALCON-1601 Make Falcon StateStore more secure by not disclosing imp params in startup.props. Contributed by Pavan Kumar Kolamuri.

FALCON-1601 Make Falcon StateStore more secure by not disclosing imp params in startup.props. Contributed by Pavan Kumar Kolamuri.


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

Branch: refs/heads/0.9
Commit: eb598ee992f975401ba414ba87f9cdb0e08d27d6
Parents: db1b681
Author: Ajay Yadava <aj...@gmail.com>
Authored: Mon Jan 11 14:51:49 2016 +0530
Committer: Ajay Yadava <aj...@gmail.com>
Committed: Mon Jan 11 15:23:46 2016 +0530

----------------------------------------------------------------------
 CHANGES.txt                                     |   2 +
 .../falcon/util/ApplicationProperties.java      |  20 ++--
 .../falcon/util/StateStoreProperties.java       | 114 +++++++++++++++++++
 .../src/main/resources/statestore.credentials   |  22 ++++
 common/src/main/resources/statestore.properties |  45 ++++++++
 docs/src/site/twiki/FalconNativeScheduler.twiki |  14 ++-
 .../falcon/state/store/AbstractStateStore.java  |   4 +-
 .../falcon/state/store/jdbc/JDBCStateStore.java |   4 +-
 .../state/store/service/FalconJPAService.java   |  26 ++---
 .../falcon/tools/FalconStateStoreDBCLI.java     |  10 +-
 .../service/SchedulerServiceTest.java           |   3 +-
 .../falcon/state/AbstractSchedulerTestBase.java |   5 +-
 .../falcon/state/EntityStateServiceTest.java    |   4 +-
 .../falcon/state/InstanceStateServiceTest.java  |   4 +-
 .../engine/WorkflowEngineFactoryTest.java       |   4 +-
 scheduler/src/test/resources/startup.properties |  20 ----
 .../src/test/resources/statestore.credentials   |  20 ++++
 .../src/test/resources/statestore.properties    |  36 ++++++
 src/conf/startup.properties                     |  21 ----
 src/conf/statestore.credentials                 |  22 ++++
 src/conf/statestore.properties                  |  45 ++++++++
 .../AbstractSchedulerManagerJerseyIT.java       |   5 +-
 .../src/test/resources/statestore.credentials   |  20 ++++
 webapp/src/test/resources/statestore.properties |  35 ++++++
 24 files changed, 419 insertions(+), 86 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/falcon/blob/eb598ee9/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 94010c3..b7f2d22 100755
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -45,6 +45,8 @@ Proposed Release Version: 0.9
     FALCON-1213 Base framework of the native scheduler(Pallavi Rao)
 
   IMPROVEMENTS
+    FALCON-1601 Make Falcon StateStore more secure by not disclosing imp params in startup.props(Pavan Kumar Kolamuri via Ajay Yadava)
+
     FALCON-1705 Standardization of error handling in falcon Server(Praveen Adlakha via Ajay Yadava)
 
     FALCON-1640 Cascading Delete for instances in Native Scheduler(Pavan Kumar Kolamuri via Ajay Yadava)

http://git-wip-us.apache.org/repos/asf/falcon/blob/eb598ee9/common/src/main/java/org/apache/falcon/util/ApplicationProperties.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/falcon/util/ApplicationProperties.java b/common/src/main/java/org/apache/falcon/util/ApplicationProperties.java
index 1d8cf49..adf09c4 100644
--- a/common/src/main/java/org/apache/falcon/util/ApplicationProperties.java
+++ b/common/src/main/java/org/apache/falcon/util/ApplicationProperties.java
@@ -44,7 +44,7 @@ public abstract class ApplicationProperties extends Properties {
 
     protected abstract String getPropertyFile();
 
-    private String domain;
+    protected String domain;
 
     protected ApplicationProperties() throws FalconException {
         init();
@@ -104,15 +104,21 @@ public abstract class ApplicationProperties extends Properties {
         InputStream resourceAsStream = null;
         if (confDir != null) {
             File fileToLoad = new File(confDir, propertyFileName);
-            if (fileToLoad.exists() && fileToLoad.isFile() && fileToLoad.canRead()) {
-                LOG.info("config.location is set, using: {}/{}", confDir, propertyFileName);
-                resourceAsStream = new FileInputStream(fileToLoad);
-            }
+            resourceAsStream = getResourceAsStream(fileToLoad);
+        }
+        return resourceAsStream;
+    }
+
+    protected InputStream getResourceAsStream(File fileToLoad) throws FileNotFoundException {
+        InputStream resourceAsStream = null;
+        if (fileToLoad.exists() && fileToLoad.isFile() && fileToLoad.canRead()) {
+            LOG.info("config.location is set, using: {}", fileToLoad.getAbsolutePath());
+            resourceAsStream = new FileInputStream(fileToLoad);
         }
         return resourceAsStream;
     }
 
-    private InputStream checkClassPath(String propertyFileName) {
+    protected InputStream checkClassPath(String propertyFileName) {
 
         InputStream resourceAsStream = null;
         Class clazz = ApplicationProperties.class;
@@ -154,7 +160,7 @@ public abstract class ApplicationProperties extends Properties {
         }
     }
 
-    private Set<String> getKeys(Set<Object> keySet) {
+    protected Set<String> getKeys(Set<Object> keySet) {
         Set<String> keys = new HashSet<String>();
         for (Object keyObj : keySet) {
             String key = (String) keyObj;

http://git-wip-us.apache.org/repos/asf/falcon/blob/eb598ee9/common/src/main/java/org/apache/falcon/util/StateStoreProperties.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/falcon/util/StateStoreProperties.java b/common/src/main/java/org/apache/falcon/util/StateStoreProperties.java
new file mode 100644
index 0000000..a3e6a56
--- /dev/null
+++ b/common/src/main/java/org/apache/falcon/util/StateStoreProperties.java
@@ -0,0 +1,114 @@
+/**
+ * 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.falcon.util;
+
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang.StringUtils;
+import org.apache.falcon.FalconException;
+import org.apache.falcon.expression.ExpressionHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicReference;
+
+/**
+ * Properties for State Store during application startup.
+ */
+public final class StateStoreProperties extends ApplicationProperties {
+
+    private static final Logger LOG = LoggerFactory.getLogger(StateStoreProperties.class);
+
+    private static final String PROPERTY_FILE = "statestore.properties";
+    private static final String CREDENTIALS_FILE= "falcon.statestore.credentials.file";
+    private static final String DEFAULT_CREDENTIALS_FILE = "statestore.credentials";
+
+    private static final AtomicReference<StateStoreProperties> INSTANCE =
+            new AtomicReference<>();
+
+
+    protected StateStoreProperties() throws FalconException {
+        super();
+    }
+
+    @Override
+    protected String getPropertyFile() {
+        return PROPERTY_FILE;
+    }
+
+    @Override
+    protected void loadProperties() throws FalconException {
+        super.loadProperties();
+
+        String credentialsFile = (String)get(CREDENTIALS_FILE);
+        try {
+            InputStream resourceAsStream = null;
+            if (StringUtils.isNotBlank(credentialsFile)) {
+                resourceAsStream = getResourceAsStream(new File(credentialsFile));
+            }
+            // fall back to class path.
+            if (resourceAsStream == null) {
+                resourceAsStream = checkClassPath(DEFAULT_CREDENTIALS_FILE);
+            }
+            if (resourceAsStream != null) {
+                try {
+                    loadCredentials(resourceAsStream);
+                    return;
+                } finally {
+                    IOUtils.closeQuietly(resourceAsStream);
+                }
+            } else {
+                throw new FalconException("Unable to find state store credentials file");
+            }
+        } catch (IOException e) {
+            throw new FalconException("Error loading properties file: " + getPropertyFile(), e);
+        }
+    }
+
+    private void loadCredentials(InputStream resourceAsStream) throws IOException {
+        Properties origProps = new Properties();
+        origProps.load(resourceAsStream);
+        LOG.info("Initializing {} properties with domain {}", this.getClass().getName(), domain);
+        Set<String> keys = getKeys(origProps.keySet());
+        for (String key : keys) {
+            String value = origProps.getProperty(domain + "." + key, origProps.getProperty("*." + key));
+            if (value != null) {
+                value = ExpressionHelper.substitute(value);
+                LOG.debug("{}={}", key, value);
+                put(key, value);
+            }
+        }
+    }
+
+
+    public static Properties get() {
+        try {
+            if (INSTANCE.get() == null) {
+                INSTANCE.compareAndSet(null, new StateStoreProperties());
+            }
+            return INSTANCE.get();
+        } catch (FalconException e) {
+            throw new RuntimeException("Unable to read application state store properties", e);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/falcon/blob/eb598ee9/common/src/main/resources/statestore.credentials
----------------------------------------------------------------------
diff --git a/common/src/main/resources/statestore.credentials b/common/src/main/resources/statestore.credentials
new file mode 100644
index 0000000..86c32a1
--- /dev/null
+++ b/common/src/main/resources/statestore.credentials
@@ -0,0 +1,22 @@
+#
+# 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.
+#
+
+
+######### StateStore Credentials #####
+#*.falcon.statestore.jdbc.username=sa
+#*.falcon.statestore.jdbc.password=
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/falcon/blob/eb598ee9/common/src/main/resources/statestore.properties
----------------------------------------------------------------------
diff --git a/common/src/main/resources/statestore.properties b/common/src/main/resources/statestore.properties
new file mode 100644
index 0000000..a67a871
--- /dev/null
+++ b/common/src/main/resources/statestore.properties
@@ -0,0 +1,45 @@
+#
+# 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.
+#
+
+*.domain=debug
+
+######### StateStore Properties #####
+#*.falcon.state.store.impl=org.apache.falcon.state.store.jdbc.JDBCStateStore
+#*.falcon.statestore.jdbc.driver=org.apache.derby.jdbc.EmbeddedDriver
+## Falcon currently supports derby and mysql, change url based on DB.
+#*.falcon.statestore.jdbc.url=jdbc:derby:data/falcon.db;create=true
+
+## StateStore credentials file where username,password and other properties can be stored securely.
+## Set this credentials file permission 400 and make sure user who starts falcon should only have read permission.
+## Give Absolute path to credentials file along with file name or put in classpath with filename statestore.credentials.
+## Credentials file should be present either in given location or class path, otherwise falcon won't start.
+#*.falcon.statestore.credentials.file=
+
+#*.falcon.statestore.connection.data.source=org.apache.commons.dbcp.BasicDataSource
+## Maximum number of active connections that can be allocated from this pool at the same time.
+#*.falcon.statestore.pool.max.active.conn=10
+## Any additional connection properties that need to be used, specified as comma separated key=value pairs.
+#*.falcon.statestore.connection.properties=
+## Indicates the interval (in milliseconds) between eviction runs.
+#*.falcon.statestore.validate.db.connection.eviction.interval=300000
+## The number of objects to examine during each run of the idle object evictor thread.
+#*.falcon.statestore.validate.db.connection.eviction.num=10
+## Creates Falcon DB.
+## If set to true, it creates the DB schema if it does not exist. If the DB schema exists is a NOP.
+## If set to false, it does not create the DB schema. If the DB schema does not exist it fails start up.
+#*.falcon.statestore.create.db.schema=true
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/falcon/blob/eb598ee9/docs/src/site/twiki/FalconNativeScheduler.twiki
----------------------------------------------------------------------
diff --git a/docs/src/site/twiki/FalconNativeScheduler.twiki b/docs/src/site/twiki/FalconNativeScheduler.twiki
index 9403ae7..d2b3208 100644
--- a/docs/src/site/twiki/FalconNativeScheduler.twiki
+++ b/docs/src/site/twiki/FalconNativeScheduler.twiki
@@ -56,13 +56,19 @@ If you wish to make the Falcon Native Scheduler your default scheduler and remov
 </verbatim>
 
 ---+++ Configuring the state store for Native Scheduler
+You can configure statestore by making changes to __$FALCON_HOME/conf/statestore.properties__ as follows. You will need to restart Falcon Server for the changes to take effect.
 
-Falcon Server needs to maintain state of the entities and instances in a persistent store for the system to be recoverable. Since Prism only federates, it does not need to maintain any state information. Following properties need to be set in startup.properties of Falcon Servers:
+Falcon Server needs to maintain state of the entities and instances in a persistent store for the system to be recoverable. Since Prism only federates, it does not need to maintain any state information. Following properties need to be set in statestore.properties of Falcon Servers:
 <verbatim>
 ######### StateStore Properties #####
 *.falcon.state.store.impl=org.apache.falcon.state.store.jdbc.JDBCStateStore
 *.falcon.statestore.jdbc.driver=org.apache.derby.jdbc.EmbeddedDriver
 *.falcon.statestore.jdbc.url=jdbc:derby:data/falcon.db
+# StateStore credentials file where username,password and other properties can be stored securely.
+# Set this credentials file permission 400 and make sure user who starts falcon should only have read permission.
+# Give Absolute path to credentials file along with file name or put in classpath with file name statestore.credentials.
+# Credentials file should be present either in given location or class path, otherwise falcon won't start.
+*.falcon.statestore.credentials.file=
 *.falcon.statestore.jdbc.username=sa
 *.falcon.statestore.jdbc.password=
 *.falcon.statestore.connection.data.source=org.apache.commons.dbcp.BasicDataSource
@@ -79,11 +85,11 @@ Falcon Server needs to maintain state of the entities and instances in a persist
 *.falcon.statestore.create.db.schema=true
 </verbatim> 
 
-The _*.falcon.statestore.jdbc.url_ property in startup.properties determines the DB and data location. All other properties are common across RDBMS.
+The _*.falcon.statestore.jdbc.url_ property in statestore.properties determines the DB and data location. All other properties are common across RDBMS.
 
 *NOTE : Although multiple Falcon Servers can share a DB (not applicable for Derby DB), it is recommended that you have different DBs for different Falcon Servers for better performance.*
 
-You will need to create the state DB and tables before starting the Falcon Server. To create tables, a tool comes bundled with the Falcon installation. You can use the _falcon-db.sh_ script to create tables in the DB. The script needs to be run only for Falcon Servers and can be run by any user that has execute permission on the script. The script picks up the DB connection details from __$FALCON_HOME/conf/startup.properties__. Ensure that you have granted the right privileges to the user mentioned in _startup.properties_, so the tables can be created.  
+You will need to create the state DB and tables before starting the Falcon Server. To create tables, a tool comes bundled with the Falcon installation. You can use the _falcon-db.sh_ script to create tables in the DB. The script needs to be run only for Falcon Servers and can be run by any user that has execute permission on the script. The script picks up the DB connection details from __$FALCON_HOME/conf/statestore.properties__. Ensure that you have granted the right privileges to the user mentioned in statestore.properties_, so the tables can be created.
 
 You can use the help command to get details on the sub-commands supported:
 <verbatim>
@@ -117,7 +123,7 @@ For example,
  tells Falcon to use the Derby JDBC connector, with data directory, $FALCON_HOME/data/ and DB name 'falcon'. If _create=true_ is specified, you will not need to create a DB up front; a database will be created if it does not exist.
 
 ---++++ Using MySQL as the State Store
-The jdbc.url property in startup.properties determines the DB and data location.
+The jdbc.url property in statestore.properties determines the DB and data location.
 For example,
  <verbatim> *.falcon.statestore.jdbc.url=jdbc:mysql://localhost:3306/falcon </verbatim>
 

http://git-wip-us.apache.org/repos/asf/falcon/blob/eb598ee9/scheduler/src/main/java/org/apache/falcon/state/store/AbstractStateStore.java
----------------------------------------------------------------------
diff --git a/scheduler/src/main/java/org/apache/falcon/state/store/AbstractStateStore.java b/scheduler/src/main/java/org/apache/falcon/state/store/AbstractStateStore.java
index 2d576e5..84d12f8 100644
--- a/scheduler/src/main/java/org/apache/falcon/state/store/AbstractStateStore.java
+++ b/scheduler/src/main/java/org/apache/falcon/state/store/AbstractStateStore.java
@@ -24,7 +24,7 @@ import org.apache.falcon.service.ConfigurationChangeListener;
 import org.apache.falcon.state.EntityID;
 import org.apache.falcon.state.EntityState;
 import org.apache.falcon.util.ReflectionUtils;
-import org.apache.falcon.util.StartupProperties;
+import org.apache.falcon.util.StateStoreProperties;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -79,7 +79,7 @@ public abstract class AbstractStateStore implements StateStore, ConfigurationCha
      */
     public static synchronized StateStore get() {
         if (stateStore == null) {
-            String storeImpl = StartupProperties.get().getProperty("falcon.state.store.impl",
+            String storeImpl = StateStoreProperties.get().getProperty("falcon.state.store.impl",
                     "org.apache.falcon.state.store.InMemoryStateStore");
             try {
                 stateStore = ReflectionUtils.getInstanceByClassName(storeImpl);

http://git-wip-us.apache.org/repos/asf/falcon/blob/eb598ee9/scheduler/src/main/java/org/apache/falcon/state/store/jdbc/JDBCStateStore.java
----------------------------------------------------------------------
diff --git a/scheduler/src/main/java/org/apache/falcon/state/store/jdbc/JDBCStateStore.java b/scheduler/src/main/java/org/apache/falcon/state/store/jdbc/JDBCStateStore.java
index abd4119..e898247 100644
--- a/scheduler/src/main/java/org/apache/falcon/state/store/jdbc/JDBCStateStore.java
+++ b/scheduler/src/main/java/org/apache/falcon/state/store/jdbc/JDBCStateStore.java
@@ -30,7 +30,7 @@ import org.apache.falcon.state.InstanceState;
 import org.apache.falcon.state.store.AbstractStateStore;
 import org.apache.falcon.state.store.StateStore;
 import org.apache.falcon.state.store.service.FalconJPAService;
-import org.apache.falcon.util.StartupProperties;
+import org.apache.falcon.util.StateStoreProperties;
 import org.joda.time.DateTime;
 
 import javax.persistence.EntityManager;
@@ -444,7 +444,7 @@ public final class JDBCStateStore extends AbstractStateStore {
 
     // Debug enabled for test cases
     private boolean isModeDebug() {
-        return DEBUG.equals(StartupProperties.get().getProperty("domain")) ? true : false;
+        return DEBUG.equals(StateStoreProperties.get().getProperty("domain")) ? true : false;
     }
 
     private void commitAndCloseTransaction(EntityManager entityManager) {

http://git-wip-us.apache.org/repos/asf/falcon/blob/eb598ee9/scheduler/src/main/java/org/apache/falcon/state/store/service/FalconJPAService.java
----------------------------------------------------------------------
diff --git a/scheduler/src/main/java/org/apache/falcon/state/store/service/FalconJPAService.java b/scheduler/src/main/java/org/apache/falcon/state/store/service/FalconJPAService.java
index 72d1aba..f678a6f 100644
--- a/scheduler/src/main/java/org/apache/falcon/state/store/service/FalconJPAService.java
+++ b/scheduler/src/main/java/org/apache/falcon/state/store/service/FalconJPAService.java
@@ -22,7 +22,7 @@ import org.apache.falcon.FalconException;
 import org.apache.falcon.service.FalconService;
 import org.apache.falcon.state.store.jdbc.EntityBean;
 import org.apache.falcon.state.store.jdbc.InstanceBean;
-import org.apache.falcon.util.StartupProperties;
+import org.apache.falcon.util.StateStoreProperties;
 import org.apache.openjpa.persistence.OpenJPAEntityManagerFactorySPI;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -105,19 +105,19 @@ public final class FalconJPAService implements FalconService {
     }
 
     private Properties getPropsforStore() throws FalconException {
-        String dbSchema = StartupProperties.get().getProperty(DB_SCHEMA);
-        String url = StartupProperties.get().getProperty(URL);
-        String driver = StartupProperties.get().getProperty(DRIVER);
-        String user = StartupProperties.get().getProperty(USERNAME);
-        String password = StartupProperties.get().getProperty(PASSWORD).trim();
-        String maxConn = StartupProperties.get().getProperty(MAX_ACTIVE_CONN).trim();
-        String dataSource = StartupProperties.get().getProperty(CONN_DATA_SOURCE);
-        String connPropsConfig = StartupProperties.get().getProperty(CONN_PROPERTIES);
-        boolean autoSchemaCreation = Boolean.parseBoolean(StartupProperties.get().getProperty(CREATE_DB_SCHEMA,
+        String dbSchema = StateStoreProperties.get().getProperty(DB_SCHEMA);
+        String url = StateStoreProperties.get().getProperty(URL);
+        String driver = StateStoreProperties.get().getProperty(DRIVER);
+        String user = StateStoreProperties.get().getProperty(USERNAME);
+        String password = StateStoreProperties.get().getProperty(PASSWORD).trim();
+        String maxConn = StateStoreProperties.get().getProperty(MAX_ACTIVE_CONN).trim();
+        String dataSource = StateStoreProperties.get().getProperty(CONN_DATA_SOURCE);
+        String connPropsConfig = StateStoreProperties.get().getProperty(CONN_PROPERTIES);
+        boolean autoSchemaCreation = Boolean.parseBoolean(StateStoreProperties.get().getProperty(CREATE_DB_SCHEMA,
                 "false"));
-        boolean validateDbConn = Boolean.parseBoolean(StartupProperties.get().getProperty(VALIDATE_DB_CONN, "true"));
-        String evictionInterval = StartupProperties.get().getProperty(VALIDATE_DB_CONN_EVICTION_INTERVAL).trim();
-        String evictionNum = StartupProperties.get().getProperty(VALIDATE_DB_CONN_EVICTION_NUM).trim();
+        boolean validateDbConn = Boolean.parseBoolean(StateStoreProperties.get().getProperty(VALIDATE_DB_CONN, "true"));
+        String evictionInterval = StateStoreProperties.get().getProperty(VALIDATE_DB_CONN_EVICTION_INTERVAL).trim();
+        String evictionNum = StateStoreProperties.get().getProperty(VALIDATE_DB_CONN_EVICTION_NUM).trim();
 
         if (!url.startsWith("jdbc:")) {
             throw new FalconException("invalid JDBC URL, must start with 'jdbc:'" + url);

http://git-wip-us.apache.org/repos/asf/falcon/blob/eb598ee9/scheduler/src/main/java/org/apache/falcon/tools/FalconStateStoreDBCLI.java
----------------------------------------------------------------------
diff --git a/scheduler/src/main/java/org/apache/falcon/tools/FalconStateStoreDBCLI.java b/scheduler/src/main/java/org/apache/falcon/tools/FalconStateStoreDBCLI.java
index f4058c8..7f22b0e 100644
--- a/scheduler/src/main/java/org/apache/falcon/tools/FalconStateStoreDBCLI.java
+++ b/scheduler/src/main/java/org/apache/falcon/tools/FalconStateStoreDBCLI.java
@@ -24,7 +24,7 @@ import org.apache.commons.cli.ParseException;
 import org.apache.falcon.cli.CLIParser;
 import org.apache.falcon.state.store.service.FalconJPAService;
 import org.apache.falcon.util.BuildProperties;
-import org.apache.falcon.util.StartupProperties;
+import org.apache.falcon.util.StateStoreProperties;
 
 import java.io.File;
 import java.io.FileWriter;
@@ -205,11 +205,11 @@ public class FalconStateStoreDBCLI {
 
     private Map<String, String> getJdbcConf() throws Exception {
         Map<String, String> jdbcConf = new HashMap<String, String>();
-        jdbcConf.put("driver", StartupProperties.get().getProperty(FalconJPAService.DRIVER));
-        String url = StartupProperties.get().getProperty(FalconJPAService.URL);
+        jdbcConf.put("driver", StateStoreProperties.get().getProperty(FalconJPAService.DRIVER));
+        String url = StateStoreProperties.get().getProperty(FalconJPAService.URL);
         jdbcConf.put("url", url);
-        jdbcConf.put("user", StartupProperties.get().getProperty(FalconJPAService.USERNAME));
-        jdbcConf.put("password", StartupProperties.get().getProperty(FalconJPAService.PASSWORD));
+        jdbcConf.put("user", StateStoreProperties.get().getProperty(FalconJPAService.USERNAME));
+        jdbcConf.put("password", StateStoreProperties.get().getProperty(FalconJPAService.PASSWORD));
         String dbType = url.substring("jdbc:".length());
         if (dbType.indexOf(":") <= 0) {
             throw new RuntimeException("Invalid JDBC URL, missing vendor 'jdbc:[VENDOR]:...'");

http://git-wip-us.apache.org/repos/asf/falcon/blob/eb598ee9/scheduler/src/test/java/org/apache/falcon/notification/service/SchedulerServiceTest.java
----------------------------------------------------------------------
diff --git a/scheduler/src/test/java/org/apache/falcon/notification/service/SchedulerServiceTest.java b/scheduler/src/test/java/org/apache/falcon/notification/service/SchedulerServiceTest.java
index 5a66518..a7ce748 100644
--- a/scheduler/src/test/java/org/apache/falcon/notification/service/SchedulerServiceTest.java
+++ b/scheduler/src/test/java/org/apache/falcon/notification/service/SchedulerServiceTest.java
@@ -42,6 +42,7 @@ import org.apache.falcon.state.InstanceState;
 import org.apache.falcon.state.store.AbstractStateStore;
 import org.apache.falcon.state.store.StateStore;
 import org.apache.falcon.util.StartupProperties;
+import org.apache.falcon.util.StateStoreProperties;
 import org.apache.falcon.workflow.engine.DAGEngine;
 import org.apache.falcon.workflow.engine.DAGEngineFactory;
 import org.apache.oozie.client.WorkflowJob;
@@ -79,7 +80,7 @@ public class SchedulerServiceTest extends AbstractTestBase {
 
     @BeforeClass
     public void init() throws Exception {
-        StartupProperties.get().setProperty("falcon.state.store.impl",
+        StateStoreProperties.get().setProperty("falcon.state.store.impl",
                 "org.apache.falcon.state.store.InMemoryStateStore");
         stateStore = AbstractStateStore.get();
         scheduler = Mockito.spy(new SchedulerService());

http://git-wip-us.apache.org/repos/asf/falcon/blob/eb598ee9/scheduler/src/test/java/org/apache/falcon/state/AbstractSchedulerTestBase.java
----------------------------------------------------------------------
diff --git a/scheduler/src/test/java/org/apache/falcon/state/AbstractSchedulerTestBase.java b/scheduler/src/test/java/org/apache/falcon/state/AbstractSchedulerTestBase.java
index a8be06d..155be69 100644
--- a/scheduler/src/test/java/org/apache/falcon/state/AbstractSchedulerTestBase.java
+++ b/scheduler/src/test/java/org/apache/falcon/state/AbstractSchedulerTestBase.java
@@ -20,7 +20,7 @@ package org.apache.falcon.state;
 import org.apache.falcon.entity.AbstractTestBase;
 import org.apache.falcon.state.store.service.FalconJPAService;
 import org.apache.falcon.tools.FalconStateStoreDBCLI;
-import org.apache.falcon.util.StartupProperties;
+import org.apache.falcon.util.StateStoreProperties;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.LocalFileSystem;
 import org.apache.hadoop.fs.Path;
@@ -41,8 +41,7 @@ public class AbstractSchedulerTestBase extends AbstractTestBase {
     protected LocalFileSystem fs = new LocalFileSystem();
 
     public void setup() throws Exception {
-        StartupProperties.get();
-        StartupProperties.get().setProperty(FalconJPAService.URL, url);
+        StateStoreProperties.get().setProperty(FalconJPAService.URL, url);
         Configuration localConf = new Configuration();
         fs.initialize(LocalFileSystem.getDefaultUri(localConf), localConf);
         fs.mkdirs(new Path(DB_BASE_DIR));

http://git-wip-us.apache.org/repos/asf/falcon/blob/eb598ee9/scheduler/src/test/java/org/apache/falcon/state/EntityStateServiceTest.java
----------------------------------------------------------------------
diff --git a/scheduler/src/test/java/org/apache/falcon/state/EntityStateServiceTest.java b/scheduler/src/test/java/org/apache/falcon/state/EntityStateServiceTest.java
index 6676754..695fcc1 100644
--- a/scheduler/src/test/java/org/apache/falcon/state/EntityStateServiceTest.java
+++ b/scheduler/src/test/java/org/apache/falcon/state/EntityStateServiceTest.java
@@ -26,7 +26,7 @@ import org.apache.falcon.entity.v0.process.Process;
 import org.apache.falcon.exception.InvalidStateTransitionException;
 import org.apache.falcon.exception.StateStoreException;
 import org.apache.falcon.state.store.AbstractStateStore;
-import org.apache.falcon.util.StartupProperties;
+import org.apache.falcon.util.StateStoreProperties;
 import org.mockito.Mockito;
 import org.testng.Assert;
 import org.testng.annotations.AfterMethod;
@@ -43,7 +43,7 @@ public class EntityStateServiceTest extends AbstractSchedulerTestBase{
 
     @BeforeClass
     public void setup() throws Exception {
-        StartupProperties.get().setProperty("falcon.state.store.impl",
+        StateStoreProperties.get().setProperty("falcon.state.store.impl",
                 "org.apache.falcon.state.store.InMemoryStateStore");
         super.setup();
         this.dfsCluster = EmbeddedCluster.newCluster("testCluster");

http://git-wip-us.apache.org/repos/asf/falcon/blob/eb598ee9/scheduler/src/test/java/org/apache/falcon/state/InstanceStateServiceTest.java
----------------------------------------------------------------------
diff --git a/scheduler/src/test/java/org/apache/falcon/state/InstanceStateServiceTest.java b/scheduler/src/test/java/org/apache/falcon/state/InstanceStateServiceTest.java
index f0ae7b2..b30acda 100644
--- a/scheduler/src/test/java/org/apache/falcon/state/InstanceStateServiceTest.java
+++ b/scheduler/src/test/java/org/apache/falcon/state/InstanceStateServiceTest.java
@@ -23,7 +23,7 @@ import org.apache.falcon.exception.InvalidStateTransitionException;
 import org.apache.falcon.exception.StateStoreException;
 import org.apache.falcon.execution.ProcessExecutionInstance;
 import org.apache.falcon.state.store.AbstractStateStore;
-import org.apache.falcon.util.StartupProperties;
+import org.apache.falcon.util.StateStoreProperties;
 import org.joda.time.DateTime;
 import org.mockito.Mockito;
 import org.testng.Assert;
@@ -43,7 +43,7 @@ public class InstanceStateServiceTest {
 
     @BeforeClass
     public void init() {
-        StartupProperties.get().setProperty("falcon.state.store.impl",
+        StateStoreProperties.get().setProperty("falcon.state.store.impl",
                 "org.apache.falcon.state.store.InMemoryStateStore");
     }
 

http://git-wip-us.apache.org/repos/asf/falcon/blob/eb598ee9/scheduler/src/test/java/org/apache/falcon/workflow/engine/WorkflowEngineFactoryTest.java
----------------------------------------------------------------------
diff --git a/scheduler/src/test/java/org/apache/falcon/workflow/engine/WorkflowEngineFactoryTest.java b/scheduler/src/test/java/org/apache/falcon/workflow/engine/WorkflowEngineFactoryTest.java
index 7e502cd..aacaced 100644
--- a/scheduler/src/test/java/org/apache/falcon/workflow/engine/WorkflowEngineFactoryTest.java
+++ b/scheduler/src/test/java/org/apache/falcon/workflow/engine/WorkflowEngineFactoryTest.java
@@ -26,7 +26,7 @@ import org.apache.falcon.state.EntityID;
 import org.apache.falcon.state.EntityState;
 import org.apache.falcon.state.store.AbstractStateStore;
 import org.apache.falcon.state.store.StateStore;
-import org.apache.falcon.util.StartupProperties;
+import org.apache.falcon.util.StateStoreProperties;
 import org.apache.falcon.workflow.WorkflowEngineFactory;
 import org.testng.Assert;
 import org.testng.annotations.AfterClass;
@@ -47,7 +47,7 @@ public class WorkflowEngineFactoryTest extends AbstractTestBase {
     public void init() throws Exception {
         this.dfsCluster = EmbeddedCluster.newCluster("testCluster");
         this.conf = dfsCluster.getConf();
-        StartupProperties.get().setProperty("falcon.state.store.impl",
+        StateStoreProperties.get().setProperty("falcon.state.store.impl",
                 "org.apache.falcon.state.store.InMemoryStateStore");
         setupConfigStore();
     }

http://git-wip-us.apache.org/repos/asf/falcon/blob/eb598ee9/scheduler/src/test/resources/startup.properties
----------------------------------------------------------------------
diff --git a/scheduler/src/test/resources/startup.properties b/scheduler/src/test/resources/startup.properties
index 2e938ee..7160bb2 100644
--- a/scheduler/src/test/resources/startup.properties
+++ b/scheduler/src/test/resources/startup.properties
@@ -132,23 +132,3 @@ debug.libext.process.paths=${falcon.libext}
 
 # Comma separated list of black listed users
 *.falcon.http.authentication.blacklisted.users=
-
-
-######## StateStore Properties #####
-*.falcon.state.store.impl=org.apache.falcon.state.store.jdbc.JDBCStateStore
-*.falcon.statestore.jdbc.driver=org.apache.derby.jdbc.EmbeddedDriver
-*.falcon.statestore.jdbc.url=jdbc:derby:target/test-data/data.db;create=true
-*.falcon.statestore.jdbc.username=sa
-*.falcon.statestore.jdbc.password=
-*.falcon.statestore.connection.data.source=org.apache.commons.dbcp.BasicDataSource
-# Maximum number of active connections that can be allocated from this pool at the same time.
-*.falcon.statestore.pool.max.active.conn=10
-*.falcon.statestore.connection.properties=
-# Indicates the interval (in milliseconds) between eviction runs.
-*.falcon.statestore.validate.db.connection.eviction.interval=300000
-# The number of objects to examine during each run of the idle object evictor thread.
-*.falcon.statestore.validate.db.connection.eviction.num=10
-# Creates Falcon DB.
-# If set to true, it creates the DB schema if it does not exist. If the DB schema exists is a NOP.
-# If set to false, it does not create the DB schema. If the DB schema does not exist it fails start up.
-*.falcon.statestore.create.db.schema=true
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/falcon/blob/eb598ee9/scheduler/src/test/resources/statestore.credentials
----------------------------------------------------------------------
diff --git a/scheduler/src/test/resources/statestore.credentials b/scheduler/src/test/resources/statestore.credentials
new file mode 100644
index 0000000..018f02e
--- /dev/null
+++ b/scheduler/src/test/resources/statestore.credentials
@@ -0,0 +1,20 @@
+#
+# 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.
+#
+
+*.falcon.statestore.jdbc.username=sa
+*.falcon.statestore.jdbc.password=
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/falcon/blob/eb598ee9/scheduler/src/test/resources/statestore.properties
----------------------------------------------------------------------
diff --git a/scheduler/src/test/resources/statestore.properties b/scheduler/src/test/resources/statestore.properties
new file mode 100644
index 0000000..2ae642f
--- /dev/null
+++ b/scheduler/src/test/resources/statestore.properties
@@ -0,0 +1,36 @@
+#
+# 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.
+#
+
+
+*.domain=debug
+######## StateStore Properties #####
+*.falcon.state.store.impl=org.apache.falcon.state.store.jdbc.JDBCStateStore
+*.falcon.statestore.jdbc.driver=org.apache.derby.jdbc.EmbeddedDriver
+*.falcon.statestore.jdbc.url=jdbc:derby:target/test-data/data.db;create=true
+*.falcon.statestore.connection.data.source=org.apache.commons.dbcp.BasicDataSource
+# Maximum number of active connections that can be allocated from this pool at the same time.
+*.falcon.statestore.pool.max.active.conn=10
+*.falcon.statestore.connection.properties=
+# Indicates the interval (in milliseconds) between eviction runs.
+*.falcon.statestore.validate.db.connection.eviction.interval=300000
+# The number of objects to examine during each run of the idle object evictor thread.
+*.falcon.statestore.validate.db.connection.eviction.num=10
+# Creates Falcon DB.
+# If set to true, it creates the DB schema if it does not exist. If the DB schema exists is a NOP.
+# If set to false, it does not create the DB schema. If the DB schema does not exist it fails start up.
+*.falcon.statestore.create.db.schema=true
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/falcon/blob/eb598ee9/src/conf/startup.properties
----------------------------------------------------------------------
diff --git a/src/conf/startup.properties b/src/conf/startup.properties
index ef0a2d5..b1a340a 100644
--- a/src/conf/startup.properties
+++ b/src/conf/startup.properties
@@ -274,24 +274,3 @@ prism.configstore.listeners=org.apache.falcon.entity.v0.EntityGraph,\
 # Setting monitoring plugin, if SMTP parameters is defined
 #*.monitoring.plugins=org.apache.falcon.plugin.DefaultMonitoringPlugin,\
 #                     org.apache.falcon.plugin.EmailNotificationPlugin
-
-######### StateStore Properties #####
-#*.falcon.state.store.impl=org.apache.falcon.state.store.jdbc.JDBCStateStore
-#*.falcon.statestore.jdbc.driver=org.apache.derby.jdbc.EmbeddedDriver
-## Falcon currently supports derby and mysql, change url based on DB.
-#*.falcon.statestore.jdbc.url=jdbc:derby:data/falcon.db;create=true
-#*.falcon.statestore.jdbc.username=sa
-#*.falcon.statestore.jdbc.password=
-#*.falcon.statestore.connection.data.source=org.apache.commons.dbcp.BasicDataSource
-## Maximum number of active connections that can be allocated from this pool at the same time.
-#*.falcon.statestore.pool.max.active.conn=10
-## Any additional connection properties that need to be used, specified as comma separated key=value pairs.
-#*.falcon.statestore.connection.properties=
-## Indicates the interval (in milliseconds) between eviction runs.
-#*.falcon.statestore.validate.db.connection.eviction.interval=300000
-## The number of objects to examine during each run of the idle object evictor thread.
-#*.falcon.statestore.validate.db.connection.eviction.num=10
-## Creates Falcon DB.
-## If set to true, it creates the DB schema if it does not exist. If the DB schema exists is a NOP.
-## If set to false, it does not create the DB schema. If the DB schema does not exist it fails start up.
-#*.falcon.statestore.create.db.schema=true

http://git-wip-us.apache.org/repos/asf/falcon/blob/eb598ee9/src/conf/statestore.credentials
----------------------------------------------------------------------
diff --git a/src/conf/statestore.credentials b/src/conf/statestore.credentials
new file mode 100644
index 0000000..86c32a1
--- /dev/null
+++ b/src/conf/statestore.credentials
@@ -0,0 +1,22 @@
+#
+# 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.
+#
+
+
+######### StateStore Credentials #####
+#*.falcon.statestore.jdbc.username=sa
+#*.falcon.statestore.jdbc.password=
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/falcon/blob/eb598ee9/src/conf/statestore.properties
----------------------------------------------------------------------
diff --git a/src/conf/statestore.properties b/src/conf/statestore.properties
new file mode 100644
index 0000000..0c912ad
--- /dev/null
+++ b/src/conf/statestore.properties
@@ -0,0 +1,45 @@
+#
+# 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.
+#
+
+*.domain=${falcon.app.type}
+
+######### StateStore Properties #####
+#*.falcon.state.store.impl=org.apache.falcon.state.store.jdbc.JDBCStateStore
+#*.falcon.statestore.jdbc.driver=org.apache.derby.jdbc.EmbeddedDriver
+## Falcon currently supports derby and mysql, change url based on DB.
+#*.falcon.statestore.jdbc.url=jdbc:derby:data/falcon.db;create=true
+
+## StateStore credentials file where username,password and other properties can be stored securely.
+## Set this credentials file permission 400 and make sure user who starts falcon should only have read permission.
+## Give Absolute path to credentials file along with file name or put in classpath with filename statestore.credentials.
+## Credentials file should be present either in given location or class path, otherwise falcon won't start.
+#*.falcon.statestore.credentials.file=
+
+#*.falcon.statestore.connection.data.source=org.apache.commons.dbcp.BasicDataSource
+## Maximum number of active connections that can be allocated from this pool at the same time.
+#*.falcon.statestore.pool.max.active.conn=10
+## Any additional connection properties that need to be used, specified as comma separated key=value pairs.
+#*.falcon.statestore.connection.properties=
+## Indicates the interval (in milliseconds) between eviction runs.
+#*.falcon.statestore.validate.db.connection.eviction.interval=300000
+## The number of objects to examine during each run of the idle object evictor thread.
+#*.falcon.statestore.validate.db.connection.eviction.num=10
+## Creates Falcon DB.
+## If set to true, it creates the DB schema if it does not exist. If the DB schema exists is a NOP.
+## If set to false, it does not create the DB schema. If the DB schema does not exist it fails start up.
+#*.falcon.statestore.create.db.schema=true
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/falcon/blob/eb598ee9/webapp/src/test/java/org/apache/falcon/resource/AbstractSchedulerManagerJerseyIT.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/falcon/resource/AbstractSchedulerManagerJerseyIT.java b/webapp/src/test/java/org/apache/falcon/resource/AbstractSchedulerManagerJerseyIT.java
index 0a3e984..175833a 100644
--- a/webapp/src/test/java/org/apache/falcon/resource/AbstractSchedulerManagerJerseyIT.java
+++ b/webapp/src/test/java/org/apache/falcon/resource/AbstractSchedulerManagerJerseyIT.java
@@ -27,6 +27,7 @@ import org.apache.falcon.state.AbstractSchedulerTestBase;
 import org.apache.falcon.state.store.service.FalconJPAService;
 import org.apache.falcon.unit.FalconUnitTestBase;
 import org.apache.falcon.util.StartupProperties;
+import org.apache.falcon.util.StateStoreProperties;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FsShell;
 import org.apache.hadoop.fs.LocalFileSystem;
@@ -88,7 +89,7 @@ public class AbstractSchedulerManagerJerseyIT extends FalconUnitTestBase {
         configListeners.remove("org.apache.falcon.service.SharedLibraryHostingService");
         configListeners.add("org.apache.falcon.state.store.jdbc.JDBCStateStore");
         StartupProperties.get().setProperty("configstore.listeners", StringUtils.join(configListeners, ","));
-        StartupProperties.get().getProperty("falcon.state.store.impl",
+        StateStoreProperties.get().getProperty("falcon.state.store.impl",
                 "org.apache.falcon.state.store.jdbc.JDBCStateStore");
     }
 
@@ -119,7 +120,7 @@ public class AbstractSchedulerManagerJerseyIT extends FalconUnitTestBase {
 
     private void createDB() throws Exception {
         AbstractSchedulerTestBase abstractSchedulerTestBase = new AbstractSchedulerTestBase();
-        StartupProperties.get().setProperty(FalconJPAService.URL, url);
+        StateStoreProperties.get().setProperty(FalconJPAService.URL, url);
         abstractSchedulerTestBase.createDB(DB_SQL_FILE);
     }
 

http://git-wip-us.apache.org/repos/asf/falcon/blob/eb598ee9/webapp/src/test/resources/statestore.credentials
----------------------------------------------------------------------
diff --git a/webapp/src/test/resources/statestore.credentials b/webapp/src/test/resources/statestore.credentials
new file mode 100644
index 0000000..018f02e
--- /dev/null
+++ b/webapp/src/test/resources/statestore.credentials
@@ -0,0 +1,20 @@
+#
+# 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.
+#
+
+*.falcon.statestore.jdbc.username=sa
+*.falcon.statestore.jdbc.password=
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/falcon/blob/eb598ee9/webapp/src/test/resources/statestore.properties
----------------------------------------------------------------------
diff --git a/webapp/src/test/resources/statestore.properties b/webapp/src/test/resources/statestore.properties
new file mode 100644
index 0000000..bd9dd26
--- /dev/null
+++ b/webapp/src/test/resources/statestore.properties
@@ -0,0 +1,35 @@
+#
+# 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.
+#
+
+*.domain=debug
+######## StateStore Properties #####
+*.falcon.state.store.impl=org.apache.falcon.state.store.jdbc.JDBCStateStore
+*.falcon.statestore.jdbc.driver=org.apache.derby.jdbc.EmbeddedDriver
+*.falcon.statestore.jdbc.url=jdbc:derby:target/test-data/data.db;create=true
+*.falcon.statestore.connection.data.source=org.apache.commons.dbcp.BasicDataSource
+# Maximum number of active connections that can be allocated from this pool at the same time.
+*.falcon.statestore.pool.max.active.conn=10
+*.falcon.statestore.connection.properties=
+# Indicates the interval (in milliseconds) between eviction runs.
+*.falcon.statestore.validate.db.connection.eviction.interval=300000
+# The number of objects to examine during each run of the idle object evictor thread.
+*.falcon.statestore.validate.db.connection.eviction.num=10
+# Creates Falcon DB.
+# If set to true, it creates the DB schema if it does not exist. If the DB schema exists is a NOP.
+# If set to false, it does not create the DB schema. If the DB schema does not exist it fails start up.
+*.falcon.statestore.create.db.schema=true