diff --git a/README.md b/README.md
index cee990b0..739437b6 100644
--- a/README.md
+++ b/README.md
@@ -7,7 +7,7 @@
# Welcome to WSO2 IoT Server
-
+
WSO2 IoT Server is a complete solution that enables device manufacturers and enterprises to connect and manage their devices, build apps, manage events, secure devices and data, and visualize sensor data in a scalable manner.
diff --git a/modules/distribution/src/analytics/bin/ciphertool.bat b/modules/distribution/src/analytics/bin/ciphertool.bat
new file mode 100644
index 00000000..0db427c3
--- /dev/null
+++ b/modules/distribution/src/analytics/bin/ciphertool.bat
@@ -0,0 +1,89 @@
+@echo off
+REM Copyright 2017 WSO2, Inc. (http://wso2.com)
+REM Licensed to the Apache Software Foundation (ASF) under one
+REM or more contributor license agreements. See the NOTICE file
+REM distributed with this work for additional information
+REM regarding copyright ownership. The ASF licenses this file
+REM to you under the Apache License, Version 2.0 (the
+REM "License"); you may not use this file except in compliance
+REM with the License. You may obtain a copy of the License at
+REM
+REM http://www.apache.org/licenses/LICENSE-2.0
+REM
+REM Unless required by applicable law or agreed to in writing,
+REM software distributed under the License is distributed on an
+REM # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+REM KIND, either express or implied. See the License for the
+REM specific language governing permissions and limitations
+REM under the License.
+
+rem ---------------------------------------------------------------------------
+rem Startup script for the ciphertool
+rem
+rem Environment Variable Prerequisites
+rem
+rem CARBON_HOME Must point at your CARBON directory
+rem
+rem JAVA_HOME Must point at your Java Development Kit installation.
+rem
+rem JAVA_OPTS (Optional) Java runtime options
+rem ---------------------------------------------------------------------------
+
+rem Make sure prerequisite environment variables are set
+if not "%JAVA_HOME%" == "" goto gotJavaHome
+echo The JAVA_HOME environment variable is not defined
+echo This environment variable is needed to run this program
+goto end
+
+:gotJavaHome
+if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
+goto okJavaHome
+
+:noJavaHome
+echo The JAVA_HOME environment variable is not defined correctly
+echo This environment variable is needed to run this program
+echo NB: JAVA_HOME should point to a JDK/JRE
+goto end
+
+:okJavaHome
+rem check the CARBON_HOME environment variable
+
+set CURRENT_DIR=%cd%
+if not "%CARBON_HOME%" == "" goto gotHome
+set CARBON_HOME=%CURRENT_DIR%
+if exist "%CARBON_HOME%\bin\ciphertool.bat" goto okHome
+
+rem guess the home. Jump one directory up to check if that is the home
+cd ..
+set CARBON_HOME=%cd%
+cd %CARBON_HOME%
+
+:gotHome
+if exist "%CARBON_HOME%\bin\ciphertool.bat" goto okHome
+
+rem set CARBON_HOME=%~sdp0..
+set CARBON_HOME=%~sdp0..
+if exist "%CARBON_HOME%\bin\ciphertool.bat" goto okHome
+
+echo The CARBON_HOME environment variable is not defined correctly
+echo This environment variable is needed to run this program
+goto end
+
+:okHome
+rem set the classes
+setlocal EnableDelayedExpansion
+rem loop through the libs and add them to the class path
+cd "%CARBON_HOME%"
+call ant -buildfile "%CARBON_HOME%\bin\build.xml" -q
+set CARBON_CLASSPATH=.\conf
+FOR %%c in ("%CARBON_HOME%\..\lib\*.jar") DO set CARBON_CLASSPATH=!CARBON_CLASSPATH!;".\..\lib\%%~nc%%~xc"
+FOR %%C in ("%CARBON_HOME%\repository\lib\*.jar") DO set CARBON_CLASSPATH=!CARBON_CLASSPATH!;".\repository\lib\%%~nC%%~xC"
+
+rem ----- Execute The Requested Command ---------------------------------------
+echo Using CARBON_HOME: %CARBON_HOME%
+echo Using JAVA_HOME: %JAVA_HOME%
+set _RUNJAVA="%JAVA_HOME%\bin\java"
+
+%_RUNJAVA% %JAVA_OPTS% -Dcarbon.home="%CARBON_HOME%" -cp "%CARBON_CLASSPATH%" org.wso2.ciphertool.CipherTool %*
+endlocal
+:end
\ No newline at end of file
diff --git a/modules/distribution/src/analytics/bin/ciphertool.sh b/modules/distribution/src/analytics/bin/ciphertool.sh
new file mode 100755
index 00000000..fd8bbcd1
--- /dev/null
+++ b/modules/distribution/src/analytics/bin/ciphertool.sh
@@ -0,0 +1,127 @@
+#!/bin/sh
+# ----------------------------------------------------------------------------
+# Copyright 2017 WSO2, Inc. (http://wso2.com)
+# Licensed 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.
+
+# -----------------------------------------------------------------------------
+# ciphertool script for generating stub, skeleton and other required classes
+#
+# Environment Variable Prequisites
+#
+# CARBON_HOME Home of CARBON installation. If not set I will try
+# to figure it out.
+#
+# JAVA_HOME Must point at your Java Development Kit installation.
+#
+# NOTE: Borrowed generously from Apache Tomcat startup scripts.
+
+# if JAVA_HOME is not set we're not happy
+if [ -z "$JAVA_HOME" ]; then
+ echo "You must set the JAVA_HOME variable before running CARBON."
+ exit 1
+fi
+
+# OS specific support. $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+os400=false;
+mingw=false;
+case "`uname`" in
+CYGWIN*) cygwin=true;;
+MINGW*) mingw=true;;
+OS400*) os400=true;;
+Darwin*) darwin=true
+ if [ -z "$JAVA_VERSION" ] ; then
+ JAVA_VERSION="CurrentJDK"
+ else
+ echo "Using Java version: $JAVA_VERSION"
+ fi
+ if [ -z "$JAVA_HOME" ] ; then
+ JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home
+ fi
+ ;;
+esac
+
+# resolve links - $0 may be a softlink
+PRG="$0"
+
+while [ -h "$PRG" ]; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '.*/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`/"$link"
+ fi
+done
+
+# Get standard environment variables
+PRGDIR=`dirname "$PRG"`
+
+# Only set CARBON_HOME if not already set
+[ -z "$CARBON_HOME" ] && CARBON_HOME=`cd "$PRGDIR/.." ; pwd`
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin; then
+ [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+ [ -n "$CARBON_HOME" ] && CARBON_HOME=`cygpath --unix "$CARBON_HOME"`
+ [ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+fi
+
+# For OS400
+if $os400; then
+ # Set job priority to standard for interactive (interactive - 6) by using
+ # the interactive priority - 6, the helper threads that respond to requests
+ # will be running at the same priority as interactive jobs.
+ COMMAND='chgjob job('$JOBNAME') runpty(6)'
+ system $COMMAND
+
+ # Enable multi threading
+ QIBM_MULTI_THREADED=Y
+ export QIBM_MULTI_THREADED
+fi
+
+# For Migwn, ensure paths are in UNIX format before anything is touched
+if $mingw ; then
+ [ -n "$CARBON_HOME" ] &&
+ CARBON_HOME="`(cd "$CARBON_HOME"; pwd)`"
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
+ [ -n "$AXIS2_HOME" ] &&
+ CARBON_HOME="`(cd "$CARBON_HOME"; pwd)`"
+ # TODO classpath?
+fi
+
+# update classpath
+CARBON_CLASSPATH=""
+for f in "$CARBON_HOME"/../lib/org.wso2.ciphertool*.jar
+do
+ CARBON_CLASSPATH=$CARBON_CLASSPATH:$f
+done
+for h in "$CARBON_HOME"/../components/plugins/*.jar
+do
+ CARBON_CLASSPATH=$CARBON_CLASSPATH:$h
+done
+CARBON_CLASSPATH=$CARBON_CLASSPATH:$CLASSPATH
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+ JAVA_HOME=`cygpath --absolute --windows "$JAVA_HOME"`
+ CARBON_HOME=`cygpath --absolute --windows "$CARBON_HOME"`
+ CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+ JAVA_ENDORSED_DIRS=`cygpath --path --windows "$JAVA_ENDORSED_DIRS"`
+fi
+
+# ----- Execute The Requested Command -----------------------------------------
+
+$JAVA_HOME/bin/java -Dcarbon.home="$CARBON_HOME" -classpath "$CARBON_CLASSPATH" org.wso2.ciphertool.CipherTool $*
diff --git a/modules/distribution/src/analytics/bin/wso2server.bat b/modules/distribution/src/analytics/bin/wso2server.bat
index 4adf4472..98db467a 100644
--- a/modules/distribution/src/analytics/bin/wso2server.bat
+++ b/modules/distribution/src/analytics/bin/wso2server.bat
@@ -1,7 +1,7 @@
@echo off
REM ---------------------------------------------------------------------------
-REM Copyright 2005-2009 WSO2, Inc. http://www.wso2.org
+REM Copyright 2017 WSO2, Inc. http://www.wso2.org
REM
REM Licensed under the Apache License, Version 2.0 (the "License");
REM you may not use this file except in compliance with the License.
diff --git a/modules/distribution/src/analytics/conf/cipher-standalone-config.properties b/modules/distribution/src/analytics/conf/cipher-standalone-config.properties
new file mode 100644
index 00000000..274d8dcf
--- /dev/null
+++ b/modules/distribution/src/analytics/conf/cipher-standalone-config.properties
@@ -0,0 +1,7 @@
+# this file contains the optional Ciphertool configuration parameters for it to work in non-Carbon environments
+primary.key.location=repository/resources/security/wso2carbon.jks
+primary.key.type=JKS
+primary.key.alias=wso2carbon
+cipher.text.properties.file=conf/security/cipher-text.properties
+cipher.tool.properties.file=conf/security/cipher-tool.properties
+secret.conf.properties.file=conf/security/secret-conf.properties
diff --git a/modules/distribution/src/analytics/conf/security/cipher-tool.properties b/modules/distribution/src/analytics/conf/security/cipher-tool.properties
index dfb51832..e826b9fc 100644
--- a/modules/distribution/src/analytics/conf/security/cipher-tool.properties
+++ b/modules/distribution/src/analytics/conf/security/cipher-tool.properties
@@ -4,13 +4,13 @@
# - is the xpath to the property value to be secured
# - This is true if the last parameter in the xpath is parameter (starts with [ and ends with ]) and you want its value to be replaced with "password"
-Carbon.Security.KeyStore.Password=repository/conf/carbon.xml//Server/Security/KeyStore/Password,false
-Carbon.Security.KeyStore.KeyPassword=repository/conf/carbon.xml//Server/Security/KeyStore/KeyPassword,false
-Carbon.Security.TrustStore.Password=repository/conf/carbon.xml//Server/Security/TrustStore/Password,false
-UserManager.AdminUser.Password=repository/conf/user-mgt.xml//UserManager/Realm/Configuration/AdminUser/Password,false
-Datasources.WSO2_CARBON_DB.Configuration.Password=repository/conf/datasources/master-datasources.xml//datasources-configuration/datasources/datasource[name='WSO2_CARBON_DB']/definition[@type='RDBMS']/configuration/password,false
-Server.Service.Connector.keystorePass=repository/conf/tomcat/catalina-server.xml//Server/Service/Connector[@keystorePass],true
-Analytics.Data.Config.Password=repository/conf/analytics/analytics-data-config.xml//AnalyticsDataConfiguration/Password,false
+Carbon.Security.KeyStore.Password=conf/carbon.xml//Server/Security/KeyStore/Password,false
+Carbon.Security.KeyStore.KeyPassword=conf/carbon.xml//Server/Security/KeyStore/KeyPassword,false
+Carbon.Security.TrustStore.Password=conf/carbon.xml//Server/Security/TrustStore/Password,false
+UserManager.AdminUser.Password=conf/user-mgt.xml//UserManager/Realm/Configuration/AdminUser/Password,false
+Datasources.WSO2_CARBON_DB.Configuration.Password=conf/datasources/master-datasources.xml//datasources-configuration/datasources/datasource[name='WSO2_CARBON_DB']/definition[@type='RDBMS']/configuration/password,false
+Server.Service.Connector.keystorePass=conf/tomcat/catalina-server.xml//Server/Service/Connector[@keystorePass],true
+Analytics.Data.Config.Password=conf/analytics/analytics-data-config.xml//AnalyticsDataConfiguration/Password,false
#Analytics.Data.Config.TrustStorePassword=repository/conf/analytics/analytics-data-config.xml//AnalyticsDataConfiguration/TrustStorePassword,false
#Carbon.DeploymentSynchronizer.SvnPassword=repository/conf/carbon.xml//Sever/DeploymentSynchronizer/SvnPassword,false
#UserStoreManager.Property.ConnectionPassword=repository/conf/user-mgt.xml//UserManager/Realm/UserStoreManager/Property[@name='ConnectionPassword'],false
diff --git a/modules/distribution/src/assembly/bin.xml b/modules/distribution/src/assembly/bin.xml
index 2f293cd5..41361479 100755
--- a/modules/distribution/src/assembly/bin.xml
+++ b/modules/distribution/src/assembly/bin.xml
@@ -147,6 +147,7 @@
**/tomcat/context.xml**/security/Owasp.CsrfGuard.Carbon.properties**/security/Owasp.CsrfGuard.dashboard.properties
+ **/security/cipher-tool.properties**/security/application-authenticators.xml**/identity/application-authentication.xml**/identity/identity-providers/iot_default.xml
@@ -752,11 +753,13 @@
**/wso2server***/load-spark-env-vars*
+ **/cipher***/java2wsdl***/tcpmon***/wsdl2java***/build.xml
+ 755
@@ -897,22 +900,23 @@
src/analytics/bin${pom.artifactId}-${pom.version}/wso2/analytics/bin/
-
- **/*.sh
- **/*.bat
-
+
+ **/*.sh
+ **/*.bat
+ true
- 755
+
src/analytics/bin${pom.artifactId}-${pom.version}/wso2/analytics/bin/
-
- **/*.sh
- **/*.bat
-
+
+ **/*.sh
+ **/*.bat
+ true
+ 755
@@ -1020,18 +1024,20 @@
${pom.artifactId}-${pom.version}/wso2/broker/bin
+ **/cipher***/wso2server***/java2wsdl***/tcpmon***/wsdl2java*
+ 755
../p2-profile/broker-profile/target/wso2carbon-core-${carbon.kernel.version}/wso2/deployment/server/webapps
- ${pom.artifactId}-${pom.version}/wso2/borker/repository/deployment/server/webapps
+ ${pom.artifactId}-${pom.version}/wso2/broker/repository/deployment/server/webapps
@@ -1237,6 +1243,10 @@
${pom.artifactId}-${pom.version}/conf/security
+
+
+ ${pom.artifactId}-${pom.version}/conf/security
+ ${pom.artifactId}-${pom.version}
@@ -1310,6 +1320,11 @@
${pom.artifactId}-${pom.version}/conf644
+
+
+ ${pom.artifactId}-${pom.version}/conf
+ 644
+
@@ -1676,6 +1691,12 @@
644
+
+
+ ${pom.artifactId}-${pom.version}/wso2/analytics/conf/
+ 644
+
+
${pom.artifactId}-${pom.version}/wso2/analytics/conf/tomcat
@@ -1747,6 +1768,11 @@
true644
+
+
+ ${pom.artifactId}-${pom.version}/wso2/broker/conf/
+ true
+ ${pom.artifactId}-${pom.version}/wso2/broker/conf/
diff --git a/modules/distribution/src/broker/bin/ciphertool.bat b/modules/distribution/src/broker/bin/ciphertool.bat
new file mode 100644
index 00000000..0db427c3
--- /dev/null
+++ b/modules/distribution/src/broker/bin/ciphertool.bat
@@ -0,0 +1,89 @@
+@echo off
+REM Copyright 2017 WSO2, Inc. (http://wso2.com)
+REM Licensed to the Apache Software Foundation (ASF) under one
+REM or more contributor license agreements. See the NOTICE file
+REM distributed with this work for additional information
+REM regarding copyright ownership. The ASF licenses this file
+REM to you under the Apache License, Version 2.0 (the
+REM "License"); you may not use this file except in compliance
+REM with the License. You may obtain a copy of the License at
+REM
+REM http://www.apache.org/licenses/LICENSE-2.0
+REM
+REM Unless required by applicable law or agreed to in writing,
+REM software distributed under the License is distributed on an
+REM # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+REM KIND, either express or implied. See the License for the
+REM specific language governing permissions and limitations
+REM under the License.
+
+rem ---------------------------------------------------------------------------
+rem Startup script for the ciphertool
+rem
+rem Environment Variable Prerequisites
+rem
+rem CARBON_HOME Must point at your CARBON directory
+rem
+rem JAVA_HOME Must point at your Java Development Kit installation.
+rem
+rem JAVA_OPTS (Optional) Java runtime options
+rem ---------------------------------------------------------------------------
+
+rem Make sure prerequisite environment variables are set
+if not "%JAVA_HOME%" == "" goto gotJavaHome
+echo The JAVA_HOME environment variable is not defined
+echo This environment variable is needed to run this program
+goto end
+
+:gotJavaHome
+if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
+goto okJavaHome
+
+:noJavaHome
+echo The JAVA_HOME environment variable is not defined correctly
+echo This environment variable is needed to run this program
+echo NB: JAVA_HOME should point to a JDK/JRE
+goto end
+
+:okJavaHome
+rem check the CARBON_HOME environment variable
+
+set CURRENT_DIR=%cd%
+if not "%CARBON_HOME%" == "" goto gotHome
+set CARBON_HOME=%CURRENT_DIR%
+if exist "%CARBON_HOME%\bin\ciphertool.bat" goto okHome
+
+rem guess the home. Jump one directory up to check if that is the home
+cd ..
+set CARBON_HOME=%cd%
+cd %CARBON_HOME%
+
+:gotHome
+if exist "%CARBON_HOME%\bin\ciphertool.bat" goto okHome
+
+rem set CARBON_HOME=%~sdp0..
+set CARBON_HOME=%~sdp0..
+if exist "%CARBON_HOME%\bin\ciphertool.bat" goto okHome
+
+echo The CARBON_HOME environment variable is not defined correctly
+echo This environment variable is needed to run this program
+goto end
+
+:okHome
+rem set the classes
+setlocal EnableDelayedExpansion
+rem loop through the libs and add them to the class path
+cd "%CARBON_HOME%"
+call ant -buildfile "%CARBON_HOME%\bin\build.xml" -q
+set CARBON_CLASSPATH=.\conf
+FOR %%c in ("%CARBON_HOME%\..\lib\*.jar") DO set CARBON_CLASSPATH=!CARBON_CLASSPATH!;".\..\lib\%%~nc%%~xc"
+FOR %%C in ("%CARBON_HOME%\repository\lib\*.jar") DO set CARBON_CLASSPATH=!CARBON_CLASSPATH!;".\repository\lib\%%~nC%%~xC"
+
+rem ----- Execute The Requested Command ---------------------------------------
+echo Using CARBON_HOME: %CARBON_HOME%
+echo Using JAVA_HOME: %JAVA_HOME%
+set _RUNJAVA="%JAVA_HOME%\bin\java"
+
+%_RUNJAVA% %JAVA_OPTS% -Dcarbon.home="%CARBON_HOME%" -cp "%CARBON_CLASSPATH%" org.wso2.ciphertool.CipherTool %*
+endlocal
+:end
\ No newline at end of file
diff --git a/modules/distribution/src/broker/bin/ciphertool.sh b/modules/distribution/src/broker/bin/ciphertool.sh
new file mode 100755
index 00000000..fd8bbcd1
--- /dev/null
+++ b/modules/distribution/src/broker/bin/ciphertool.sh
@@ -0,0 +1,127 @@
+#!/bin/sh
+# ----------------------------------------------------------------------------
+# Copyright 2017 WSO2, Inc. (http://wso2.com)
+# Licensed 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.
+
+# -----------------------------------------------------------------------------
+# ciphertool script for generating stub, skeleton and other required classes
+#
+# Environment Variable Prequisites
+#
+# CARBON_HOME Home of CARBON installation. If not set I will try
+# to figure it out.
+#
+# JAVA_HOME Must point at your Java Development Kit installation.
+#
+# NOTE: Borrowed generously from Apache Tomcat startup scripts.
+
+# if JAVA_HOME is not set we're not happy
+if [ -z "$JAVA_HOME" ]; then
+ echo "You must set the JAVA_HOME variable before running CARBON."
+ exit 1
+fi
+
+# OS specific support. $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+os400=false;
+mingw=false;
+case "`uname`" in
+CYGWIN*) cygwin=true;;
+MINGW*) mingw=true;;
+OS400*) os400=true;;
+Darwin*) darwin=true
+ if [ -z "$JAVA_VERSION" ] ; then
+ JAVA_VERSION="CurrentJDK"
+ else
+ echo "Using Java version: $JAVA_VERSION"
+ fi
+ if [ -z "$JAVA_HOME" ] ; then
+ JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home
+ fi
+ ;;
+esac
+
+# resolve links - $0 may be a softlink
+PRG="$0"
+
+while [ -h "$PRG" ]; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '.*/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`/"$link"
+ fi
+done
+
+# Get standard environment variables
+PRGDIR=`dirname "$PRG"`
+
+# Only set CARBON_HOME if not already set
+[ -z "$CARBON_HOME" ] && CARBON_HOME=`cd "$PRGDIR/.." ; pwd`
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin; then
+ [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+ [ -n "$CARBON_HOME" ] && CARBON_HOME=`cygpath --unix "$CARBON_HOME"`
+ [ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+fi
+
+# For OS400
+if $os400; then
+ # Set job priority to standard for interactive (interactive - 6) by using
+ # the interactive priority - 6, the helper threads that respond to requests
+ # will be running at the same priority as interactive jobs.
+ COMMAND='chgjob job('$JOBNAME') runpty(6)'
+ system $COMMAND
+
+ # Enable multi threading
+ QIBM_MULTI_THREADED=Y
+ export QIBM_MULTI_THREADED
+fi
+
+# For Migwn, ensure paths are in UNIX format before anything is touched
+if $mingw ; then
+ [ -n "$CARBON_HOME" ] &&
+ CARBON_HOME="`(cd "$CARBON_HOME"; pwd)`"
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
+ [ -n "$AXIS2_HOME" ] &&
+ CARBON_HOME="`(cd "$CARBON_HOME"; pwd)`"
+ # TODO classpath?
+fi
+
+# update classpath
+CARBON_CLASSPATH=""
+for f in "$CARBON_HOME"/../lib/org.wso2.ciphertool*.jar
+do
+ CARBON_CLASSPATH=$CARBON_CLASSPATH:$f
+done
+for h in "$CARBON_HOME"/../components/plugins/*.jar
+do
+ CARBON_CLASSPATH=$CARBON_CLASSPATH:$h
+done
+CARBON_CLASSPATH=$CARBON_CLASSPATH:$CLASSPATH
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+ JAVA_HOME=`cygpath --absolute --windows "$JAVA_HOME"`
+ CARBON_HOME=`cygpath --absolute --windows "$CARBON_HOME"`
+ CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+ JAVA_ENDORSED_DIRS=`cygpath --path --windows "$JAVA_ENDORSED_DIRS"`
+fi
+
+# ----- Execute The Requested Command -----------------------------------------
+
+$JAVA_HOME/bin/java -Dcarbon.home="$CARBON_HOME" -classpath "$CARBON_CLASSPATH" org.wso2.ciphertool.CipherTool $*
diff --git a/modules/distribution/src/broker/bin/wso2server.bat b/modules/distribution/src/broker/bin/wso2server.bat
index 6ad6ca23..2434cf13 100644
--- a/modules/distribution/src/broker/bin/wso2server.bat
+++ b/modules/distribution/src/broker/bin/wso2server.bat
@@ -1,7 +1,7 @@
@echo off
REM ---------------------------------------------------------------------------
-REM Copyright 2005-2009 WSO2, Inc. http://www.wso2.org
+REM Copyright 2017 WSO2, Inc. http://www.wso2.org
REM
REM Licensed under the Apache License, Version 2.0 (the "License");
REM you may not use this file except in compliance with the License.
diff --git a/modules/distribution/src/broker/conf/cipher-standalone-config.properties b/modules/distribution/src/broker/conf/cipher-standalone-config.properties
new file mode 100644
index 00000000..274d8dcf
--- /dev/null
+++ b/modules/distribution/src/broker/conf/cipher-standalone-config.properties
@@ -0,0 +1,7 @@
+# this file contains the optional Ciphertool configuration parameters for it to work in non-Carbon environments
+primary.key.location=repository/resources/security/wso2carbon.jks
+primary.key.type=JKS
+primary.key.alias=wso2carbon
+cipher.text.properties.file=conf/security/cipher-text.properties
+cipher.tool.properties.file=conf/security/cipher-tool.properties
+secret.conf.properties.file=conf/security/secret-conf.properties
diff --git a/modules/distribution/src/core/bin/analytics.bat b/modules/distribution/src/core/bin/analytics.bat
index b7fad708..d67cebe6 100644
--- a/modules/distribution/src/core/bin/analytics.bat
+++ b/modules/distribution/src/core/bin/analytics.bat
@@ -1,6 +1,6 @@
@echo off
REM ---------------------------------------------------------------------------
-REM Copyright 2005-2009 WSO2, Inc. http://www.wso2.org
+REM Copyright 2017 WSO2, Inc. http://www.wso2.org
REM
REM Licensed under the Apache License, Version 2.0 (the "License");
REM you may not use this file except in compliance with the License.
diff --git a/modules/distribution/src/core/bin/broker.bat b/modules/distribution/src/core/bin/broker.bat
index f7b7969b..17c4c568 100644
--- a/modules/distribution/src/core/bin/broker.bat
+++ b/modules/distribution/src/core/bin/broker.bat
@@ -1,6 +1,6 @@
@echo off
REM ---------------------------------------------------------------------------
-REM Copyright 2005-2009 WSO2, Inc. http://www.wso2.org
+REM Copyright 2017 WSO2, Inc. http://www.wso2.org
REM
REM Licensed under the Apache License, Version 2.0 (the "License");
REM you may not use this file except in compliance with the License.
diff --git a/modules/distribution/src/core/bin/carbondump.bat b/modules/distribution/src/core/bin/carbondump.bat
index 691c2ef3..a8634b4b 100644
--- a/modules/distribution/src/core/bin/carbondump.bat
+++ b/modules/distribution/src/core/bin/carbondump.bat
@@ -1,7 +1,7 @@
@echo off
REM ---------------------------------------------------------------------------
-REM Copyright 2005-2009 WSO2, Inc. http://www.wso2.org
+REM Copyright 2017 WSO2, Inc. http://www.wso2.org
REM
REM Licensed under the Apache License, Version 2.0 (the "License");
REM you may not use this file except in compliance with the License.
diff --git a/modules/distribution/src/core/bin/carbondump.sh b/modules/distribution/src/core/bin/carbondump.sh
index 252ea49e..54d476aa 100755
--- a/modules/distribution/src/core/bin/carbondump.sh
+++ b/modules/distribution/src/core/bin/carbondump.sh
@@ -1,6 +1,6 @@
#!/bin/bash
# ----------------------------------------------------------------------------
-# Copyright 2005-2009 WSO2, Inc. http://www.wso2.org
+# Copyright 2017 WSO2, Inc. http://www.wso2.org
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
diff --git a/modules/distribution/src/core/bin/ciphertool.bat b/modules/distribution/src/core/bin/ciphertool.bat
index 99d55fc8..dbe44aa1 100644
--- a/modules/distribution/src/core/bin/ciphertool.bat
+++ b/modules/distribution/src/core/bin/ciphertool.bat
@@ -1,5 +1,5 @@
@echo off
-REM Copyright 2005-2009 WSO2, Inc. (http://wso2.com)
+REM Copyright 2017 WSO2, Inc. (http://wso2.com)
REM Licensed to the Apache Software Foundation (ASF) under one
REM or more contributor license agreements. See the NOTICE file
REM distributed with this work for additional information
diff --git a/modules/distribution/src/core/bin/ciphertool.sh b/modules/distribution/src/core/bin/ciphertool.sh
index 97bca840..9eba250a 100755
--- a/modules/distribution/src/core/bin/ciphertool.sh
+++ b/modules/distribution/src/core/bin/ciphertool.sh
@@ -1,6 +1,6 @@
#!/bin/sh
# ----------------------------------------------------------------------------
-# Copyright 2005-2009 WSO2, Inc. (http://wso2.com)
+# Copyright 2017 WSO2, Inc. (http://wso2.com)
# Licensed 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
diff --git a/modules/distribution/src/core/bin/iot-server.bat b/modules/distribution/src/core/bin/iot-server.bat
index a68790c6..5489845a 100644
--- a/modules/distribution/src/core/bin/iot-server.bat
+++ b/modules/distribution/src/core/bin/iot-server.bat
@@ -1,7 +1,7 @@
@echo off
REM ---------------------------------------------------------------------------
-REM Copyright 2005-2009 WSO2, Inc. http://www.wso2.org
+REM Copyright 2017 WSO2, Inc. http://www.wso2.org
REM
REM Licensed under the Apache License, Version 2.0 (the "License");
REM you may not use this file except in compliance with the License.
diff --git a/modules/distribution/src/core/bin/start-all.bat b/modules/distribution/src/core/bin/start-all.bat
index f2827a91..2bf84b06 100644
--- a/modules/distribution/src/core/bin/start-all.bat
+++ b/modules/distribution/src/core/bin/start-all.bat
@@ -1,7 +1,7 @@
@echo off
REM ---------------------------------------------------------------------------
-REM Copyright 2005-2009 WSO2, Inc. http://www.wso2.org
+REM Copyright 2017 WSO2, Inc. http://www.wso2.org
REM
REM Licensed under the Apache License, Version 2.0 (the "License");
REM you may not use this file except in compliance with the License.
diff --git a/modules/distribution/src/core/conf/cipher-standalone-config.properties b/modules/distribution/src/core/conf/cipher-standalone-config.properties
new file mode 100644
index 00000000..274d8dcf
--- /dev/null
+++ b/modules/distribution/src/core/conf/cipher-standalone-config.properties
@@ -0,0 +1,7 @@
+# this file contains the optional Ciphertool configuration parameters for it to work in non-Carbon environments
+primary.key.location=repository/resources/security/wso2carbon.jks
+primary.key.type=JKS
+primary.key.alias=wso2carbon
+cipher.text.properties.file=conf/security/cipher-text.properties
+cipher.tool.properties.file=conf/security/cipher-tool.properties
+secret.conf.properties.file=conf/security/secret-conf.properties
diff --git a/modules/distribution/src/core/conf/security/cipher-tool.properties b/modules/distribution/src/core/conf/security/cipher-tool.properties
new file mode 100644
index 00000000..9ca78f68
--- /dev/null
+++ b/modules/distribution/src/core/conf/security/cipher-tool.properties
@@ -0,0 +1,12 @@
+# Important: This properties file contains all the aliases to be used in carbon components. If any property need to be secured, you need to add alias name, file name and the xpath as follows:.
+# The value goes as, the //,
+# where - is the file (along with the file path) to be secured,
+# - is the xpath to the property value to be secured
+# - This is true if the last parameter in the xpath is parameter (starts with [ and ends with ]) and you want its value to be replaced with "password"
+
+Carbon.Security.KeyStore.Password=conf/carbon.xml//Server/Security/KeyStore/Password,false
+Carbon.Security.KeyStore.KeyPassword=conf/carbon.xml//Server/Security/KeyStore/KeyPassword,false
+Carbon.Security.TrustStore.Password=conf/carbon.xml//Server/Security/TrustStore/Password,false
+UserManager.AdminUser.Password=conf/user-mgt.xml//UserManager/Realm/Configuration/AdminUser/Password,false
+Datasources.WSO2_CARBON_DB.Configuration.Password=conf/datasources/master-datasources.xml//datasources-configuration/datasources/datasource[name='WSO2_CARBON_DB']/definition[@type='RDBMS']/configuration/password,false
+Server.Service.Connector.keystorePass=conf/tomcat/catalina-server.xml//Server/Service/Connector[@keystorePass],true
diff --git a/modules/distribution/src/core/resources/profiles/backend/iot-server.bat b/modules/distribution/src/core/resources/profiles/backend/iot-server.bat
index 1e5c7704..aa69a55c 100644
--- a/modules/distribution/src/core/resources/profiles/backend/iot-server.bat
+++ b/modules/distribution/src/core/resources/profiles/backend/iot-server.bat
@@ -1,7 +1,7 @@
@echo off
REM ---------------------------------------------------------------------------
-REM Copyright 2005-2009 WSO2, Inc. http://www.wso2.org
+REM Copyright 2017 WSO2, Inc. http://www.wso2.org
REM
REM Licensed under the Apache License, Version 2.0 (the "License");
REM you may not use this file except in compliance with the License.
diff --git a/modules/distribution/src/core/resources/profiles/keymanager/iot-server.bat b/modules/distribution/src/core/resources/profiles/keymanager/iot-server.bat
index daedc1b2..f3d31b35 100644
--- a/modules/distribution/src/core/resources/profiles/keymanager/iot-server.bat
+++ b/modules/distribution/src/core/resources/profiles/keymanager/iot-server.bat
@@ -1,7 +1,7 @@
@echo off
REM ---------------------------------------------------------------------------
-REM Copyright 2005-2009 WSO2, Inc. http://www.wso2.org
+REM Copyright 2017 WSO2, Inc. http://www.wso2.org
REM
REM Licensed under the Apache License, Version 2.0 (the "License");
REM you may not use this file except in compliance with the License.
diff --git a/modules/distribution/src/core/resources/profiles/manager/iot-server.bat b/modules/distribution/src/core/resources/profiles/manager/iot-server.bat
index a3b01ab5..3fcfc3fa 100644
--- a/modules/distribution/src/core/resources/profiles/manager/iot-server.bat
+++ b/modules/distribution/src/core/resources/profiles/manager/iot-server.bat
@@ -1,7 +1,7 @@
@echo off
REM ---------------------------------------------------------------------------
-REM Copyright 2005-2009 WSO2, Inc. http://www.wso2.org
+REM Copyright 2017 WSO2, Inc. http://www.wso2.org
REM
REM Licensed under the Apache License, Version 2.0 (the "License");
REM you may not use this file except in compliance with the License.
diff --git a/pom.xml b/pom.xml
index d9db96ff..69c833a0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1511,14 +1511,14 @@
4.7.0
- 3.0.0-SNAPSHOT
- [2.0.0, 3.0.0)
+ 3.0.4-SNAPSHOT
+ [3.0.0, 4.0.0)3.1.0-SNAPSHOT
- 3.0.43-SNAPSHOT
+ 4.0.2-SNAPSHOT6.1.80