diff --git a/modules/distribution/src/analytics/conf/tomcat/carbon/WEB-INF/web.xml b/modules/distribution/src/analytics/conf/tomcat/carbon/WEB-INF/web.xml new file mode 100644 index 00000000..ea3db45a --- /dev/null +++ b/modules/distribution/src/analytics/conf/tomcat/carbon/WEB-INF/web.xml @@ -0,0 +1,177 @@ + + + + + + + Restrict access to carbon console + + Restricted Console UI + /carbon/* + + + + + + + Owasp.CsrfGuard.Config + conf/security/Owasp.CsrfGuard.Carbon.properties + + + + bridgeservlet + Carbon Bridge Servlet + Carbon Bridge Servlet + org.wso2.carbon.tomcat.ext.servlet.DelegationServlet + + 1 + + + + + JavaScriptServlet + org.owasp.csrfguard.servlet.JavaScriptServlet + + + + bridgeservlet + /* + + + + bridgeservlet + *.jsp + + + + JavaScriptServlet + /carbon/admin/js/csrfPrevention.js + + + + + CharsetFilter + org.wso2.carbon.tomcat.ext.filter.CharacterSetFilter + + requestEncoding + UTF-8 + + + + + + CSRFGuard + org.owasp.csrfguard.CsrfGuardFilter + + + + + HttpHeaderSecurityFilter + org.apache.catalina.filters.HttpHeaderSecurityFilter + + hstsEnabled + false + + + + + HttpHeaderSecurityFilter + * + + + + CharsetFilter + /* + + + + CSRFGuard + /* + + + + + org.owasp.csrfguard.CsrfGuardServletContextListener + + + + + org.owasp.csrfguard.CsrfGuardHttpSessionListener + + + + 15 + + true + + + + + + 400 + /carbon/errors/error_400.html + + + 401 + /carbon/errors/error_401.html + + + 403 + /carbon/errors/error_403.html + + + 404 + /carbon/errors/error_404.html + + + 405 + /carbon/errors/error_405.html + + + 408 + /carbon/errors/error_408.html + + + 410 + /carbon/errors/error_410.html + + + 500 + /carbon/errors/error_500.html + + + 502 + /carbon/errors/error_502.html + + + 503 + /carbon/errors/error_503.html + + + 504 + /carbon/errors/error_504.html + + + + /carbon/errors/error.html + + diff --git a/modules/distribution/src/analytics/conf/tomcat/webapp-classloading-environments.xml b/modules/distribution/src/analytics/conf/tomcat/webapp-classloading-environments.xml new file mode 100644 index 00000000..a1f5db56 --- /dev/null +++ b/modules/distribution/src/analytics/conf/tomcat/webapp-classloading-environments.xml @@ -0,0 +1,77 @@ + + + + + + + + + + + + Tomcat + javax.annotation.*,javax.ejb,javax.el,javax.persistence,javax.servlet.*,javax.xml,javax.xml.ws,org.apache.catalina.*,org.apache.coyote.*,org.apache.el.*,org.apache.jasper.*,org.apache.naming.*,org.apache.tomcat.*,com.sun.el.*,org.wso2.carbon.tomcat.jndi.* + *,!META-INF/services/org.apache.webbeans.spi.plugins.OpenWebBeansPlugin,!META-INF/openwebbeans/openwebbeans.properties,!META-INF/standard-faces-config.xml,!META-INF/faces-config.xml + + + + Carbon + *,!org.springframework.*,!org.apache.solr.* + *,!META-INF/services/org.apache.webbeans.spi.plugins.OpenWebBeansPlugin,!META-INF/openwebbeans/openwebbeans.properties,!META-INF/standard-faces-config.xml,!META-INF/faces-config.xml + + + + Javaee + *,!org.springframework.* + * + + + + + + + + + + + + + + CXF + ${carbon.home}/../lib/runtimes/cxf/*.jar;${carbon.home}/../lib/runtimes/cxf/ + + + + diff --git a/modules/distribution/src/assembly/bin.xml b/modules/distribution/src/assembly/bin.xml index acb36603..c3259819 100755 --- a/modules/distribution/src/assembly/bin.xml +++ b/modules/distribution/src/assembly/bin.xml @@ -648,6 +648,9 @@ **/log4j.properties **/jndi.properties **/registry.xml + **/webapp-classloading-environments.xml + **/tomcat/carbon/WEB-INF/web.xml + **/spark-udf-config.xml @@ -749,7 +752,7 @@ ../p2-profile/analytics-profile/target/wso2carbon-core-${carbon.kernel.version}/wso2/deployment/server/webapps - ${pom.artifactId}-${pom.version}/repository/deployment/server/webapps + ${pom.artifactId}-${pom.version}/wso2/analytics/repository/deployment/server/webapps @@ -821,6 +824,136 @@ + + + + target/wso2carbon-core-${carbon.kernel.version} + ${pom.artifactId}-${pom.version}/wso2/broker + + **/*.sh + **/repository/conf/** + **/repository/components/** + **/repository/database/** + **/wso2/components/** + **/wso2 + **/lib/** + **/bin/** + **/services/sample01.aar + **/repository/services/version/** + **/version.txt + **/wso2carbon-version.txt + **/wso2server.bat + **/README.txt + **/LICENSE.txt + **/release-notes.html + + + + + + ../p2-profile/broker-profile/target/wso2carbon-core-${carbon.kernel.version}/wso2/conf + + ${pom.artifactId}-${pom.version}/wso2/broker/conf + + **/axis2.xml + **/broker.xml + **/carbon.xml + **/cipher-text.properties + **/cipher-tool.properties + **/hazelcast.properties + **/master-datasources.xml + **/messaging-event-broker.xml + **/metrics.xml + **/web.xml + **/launch.ini + **/log4j.properties + **/webapp-mode/WEB-INF/web.xml + **/webapp-classloading-environments.xml + + + + + + src/broker/conf/security + + ${pom.artifactId}-${pom.version}/wso2/broker/conf/security + + + + + ../p2-profile/broker-profile/target/wso2carbon-core-${carbon.kernel.version}/wso2/database + + ${pom.artifactId}-${pom.version}/wso2/broker/repository/database + + + + ../p2-profile/broker-profile/target/wso2carbon-core-${carbon.kernel.version}/lib + ${pom.artifactId}-${pom.version}/wso2/lib + + + + + ../p2-profile/broker-profile/target/wso2carbon-core-${carbon.kernel.version}/bin + + ${pom.artifactId}-${pom.version}/wso2/broker/bin + + **/wso2server.sh + **/wso2server.bat + + + + + + ../p2-profile/broker-profile/target/wso2carbon-core-${carbon.kernel.version}/wso2/deployment/server/webapps + + ${pom.artifactId}-${pom.version}/wso2/borker/repository/deployment/server/webapps + + + + + + ../p2-profile/broker-profile/target/wso2carbon-core-${carbon.kernel.version}/modules + + ${pom.artifactId}-${pom.version}/wso2/broker/modules + + **/* + + + + + + ../p2-profile/broker-profile/target/wso2carbon-core-${carbon.kernel.version}/wso2/resources + + ${pom.artifactId}-${pom.version}/wso2/broker/resources + + + + + src/broker/resources/STRATOS_ROOT + + ${pom.artifactId}-${pom.version}/wso2/broker/repository/deployment/server/webapps/STRATOS_ROOT + + 644 + 775 + + + + ../p2-profile/broker-profile/target/wso2carbon-core-${carbon.kernel.version}/wso2/components + + ${pom.artifactId}-${pom.version}/wso2/components + + **/eclipse.ini + **/*.lock + **/.data + **/.settings + features/** + **/org.wso2.carbon.feature.mgt.ui* + **/lib + **/json_2.0.0.wso2v1.jar + **/nimbus-jose-jwt_2.26.1.wso2v2.jar + + + @@ -838,6 +971,32 @@ org.apache.rampart:rampart:mar + + ${pom.artifactId}-${pom.version}/wso2/broker/repository/deployment/client/modules + + + org.apache.rampart:rampart:mar + + + + ${pom.artifactId}-${pom.version}/wso2/broker/client-lib + + org.wso2.andes.wso2:andes-client:jar + org.apache.geronimo.specs.wso2:geronimo-jms_1.1_spec:jar + org.wso2.carbon:org.wso2.carbon.event.client.stub:jar + org.wso2.carbon:org.wso2.carbon.event.client:jar + slf4j.wso2:slf4j:jar + log4j:log4j:jar + org.wso2.securevault:org.wso2.securevault:jar + org.wso2.carbon:org.wso2.carbon.logging:jar + + + + wso2iot-broker-${pom.version}/repository/lib + + jline:jline:jar + + @@ -1402,6 +1561,16 @@ 644 + + src/analytics/conf/tomcat/webapp-classloading-environments.xml + ${pom.artifactId}-${pom.version}/wso2/analytics/conf/tomcat + + + + src/analytics/conf/tomcat/carbon/WEB-INF/web.xml + ${pom.artifactId}-${pom.version}/wso2/analytics/conf/tomcat/carbon/WEB-INF + + @@ -1500,5 +1669,138 @@ 644 + + + + target/wso2carbon-core-${carbon.kernel.version}/bin/README.txt + ${pom.artifactId}-${pom.version}/wso2/broker/bin/ + true + 644 + + + target/wso2carbon-core-${carbon.kernel.version}/bin/version.txt + ${pom.artifactId}-${pom.version}/wso2/broker/bin/ + true + 644 + + + src/broker/conf/carbon.xml + ${pom.artifactId}-${pom.version}/wso2/broker/conf/ + true + + + target/wso2carbon-core-${carbon.kernel.version}/repository/conf/README + ${pom.artifactId}-${pom.version}/wso2/broker/conf/ + true + 644 + + + target/wso2carbon-core-${carbon.kernel.version}/repository/README.txt + ${pom.artifactId}-${pom.version}/wso2/broker/repository/ + true + 644 + + + target/wso2carbon-core-${carbon.kernel.version}/repository/database/README.txt + ${pom.artifactId}-${pom.version}/wso2/broker/repository/database/ + true + 644 + + + target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/README.txt + ${pom.artifactId}-${pom.version}/wso2/broker/repository/deployment/ + true + 644 + + + target/wso2carbon-core-${carbon.kernel.version}/repository/logs/README.txt + ${pom.artifactId}-${pom.version}/wso2/broker/repository/logs/ + true + 644 + + + target/wso2carbon-core-${carbon.kernel.version}/repository/resources/README.txt + ${pom.artifactId}-${pom.version}/wso2/broker/repository/resources/ + true + 644 + + + + src/broker/conf/log4j.properties + ${pom.artifactId}-${pom.version}/wso2/broker/conf/ + 644 + + + + src/broker/conf/etc/launch.ini + ${pom.artifactId}-${pom.version}/wso2/broker/conf/etc + 644 + + + + src/broker/conf/axis2/axis2.xml + ${pom.artifactId}-${pom.version}/wso2/broker/conf/axis2 + 644 + + + + src/broker/conf/tomcat/carbon/WEB-INF/web.xml + ${pom.artifactId}-${pom.version}/wso2/broker/conf/tomcat/carbon/WEB-INF + + 644 + + + + src/broker/conf/tomcat/webapp-classloading-environments.xml + ${pom.artifactId}-${pom.version}/wso2/broker/conf/tomcat/webapp-classloading-environments.xml + + 644 + + + + src/broker/conf/broker.xml + ${pom.artifactId}-${pom.version}/wso2/broker/conf + 644 + + + + src/broker/conf/hazelcast.properties + ${pom.artifactId}-${pom.version}/wso2/broker/conf + 644 + + + + src/broker/conf/datasources/master-datasources.xml + ${pom.artifactId}-${pom.version}/wso2/broker/conf/datasources + 644 + + + + src/broker/conf/messaging-event-broker.xml + ${pom.artifactId}-${pom.version}/wso2/broker/conf + 644 + + + + src/broker/conf/metrics.xml + ${pom.artifactId}-${pom.version}/wso2/broker/conf + 644 + + + + src/broker/bin/wso2server.sh + ${pom.artifactId}-${pom.version}/wso2/broker/bin/ + true + 755 + + + + src/broker/bin/wso2server.bat + ${pom.artifactId}-${pom.version}/wso2/broker/bin/ + + true + 644 + + diff --git a/modules/distribution/src/broker/bin/wso2server.bat b/modules/distribution/src/broker/bin/wso2server.bat new file mode 100644 index 00000000..31490504 --- /dev/null +++ b/modules/distribution/src/broker/bin/wso2server.bat @@ -0,0 +1,194 @@ +@echo off + +REM --------------------------------------------------------------------------- +REM Copyright 2005-2009 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. +REM 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, software +REM distributed under the License is distributed on an "AS IS" BASIS, +REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +REM See the License for the specific language governing permissions and +REM limitations under the License. + +rem --------------------------------------------------------------------------- +rem Main Script for WSO2 Carbon +rem +rem Environment Variable Prequisites +rem +rem CARBON_HOME Home of CARBON installation. If not set I will try +rem to figure it out. +rem +rem JAVA_HOME Must point at your Java Development Kit installation. +rem +rem JAVA_OPTS (Optional) Java runtime options used when the commands +rem is executed. +rem --------------------------------------------------------------------------- + +rem ----- if JAVA_HOME is not set we're not happy ------------------------------ +:checkJava + +if "%JAVA_HOME%" == "" goto noJavaHome +if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome +goto checkServer + +:noJavaHome +echo "You must set the JAVA_HOME variable before running CARBON." +goto end + +rem ----- Only set CARBON_HOME if not already set ---------------------------- +:checkServer +rem %~sdp0 is expanded pathname of the current script under NT with spaces in the path removed +set CARBON_HOME=%~sdp0.. +SET curDrive=%cd:~0,1% +SET wsasDrive=%CARBON_HOME:~0,1% +if not "%curDrive%" == "%wsasDrive%" %wsasDrive%: + +rem find CARBON_HOME if it does not exist due to either an invalid value passed +rem by the user or the %0 problem on Windows 9x +if not exist "%CARBON_HOME%\bin\version.txt" goto noServerHome + +set AXIS2_HOME=%CARBON_HOME% +goto updateClasspath + +:noServerHome +echo CARBON_HOME is set incorrectly or CARBON could not be located. Please set CARBON_HOME. +goto end + +rem ----- update classpath ----------------------------------------------------- +:updateClasspath + +setlocal EnableDelayedExpansion +cd %CARBON_HOME% +set CARBON_CLASSPATH= +FOR %%C in ("%CARBON_HOME%\bin\*.jar") DO set CARBON_CLASSPATH=!CARBON_CLASSPATH!;".\bin\%%~nC%%~xC" + +set CARBON_CLASSPATH="%JAVA_HOME%\lib\tools.jar";%CARBON_CLASSPATH%; + +FOR %%D in ("%CARBON_HOME%\..\lib\commons-lang*.jar") DO set CARBON_CLASSPATH=!CARBON_CLASSPATH!;".\..\lib\%%~nD%%~xD" + +rem ----- Process the input command ------------------------------------------- + +rem Slurp the command line arguments. This loop allows for an unlimited number +rem of arguments (up to the command line limit, anyway). + + +:setupArgs +if ""%1""=="""" goto doneStart + +if ""%1""==""-run"" goto commandLifecycle +if ""%1""==""--run"" goto commandLifecycle +if ""%1""==""run"" goto commandLifecycle + +if ""%1""==""-restart"" goto commandLifecycle +if ""%1""==""--restart"" goto commandLifecycle +if ""%1""==""restart"" goto commandLifecycle + +if ""%1""==""debug"" goto commandDebug +if ""%1""==""-debug"" goto commandDebug +if ""%1""==""--debug"" goto commandDebug + +if ""%1""==""version"" goto commandVersion +if ""%1""==""-version"" goto commandVersion +if ""%1""==""--version"" goto commandVersion + +shift +goto setupArgs + +rem ----- commandVersion ------------------------------------------------------- +:commandVersion +shift +type "%CARBON_HOME%\bin\version.txt" +type "%CARBON_HOME%\bin\wso2carbon-version.txt" +goto end + +rem ----- commandDebug --------------------------------------------------------- +:commandDebug +shift +set DEBUG_PORT=%1 +if "%DEBUG_PORT%"=="" goto noDebugPort +if not "%JAVA_OPTS%"=="" echo Warning !!!. User specified JAVA_OPTS will be ignored, once you give the --debug option. +set JAVA_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=%DEBUG_PORT% +echo Please start the remote debugging client to continue... +goto findJdk + +:noDebugPort +echo Please specify the debug port after the --debug option +goto end + +rem ----- commandLifecycle ----------------------------------------------------- +:commandLifecycle +goto findJdk + +:doneStart +if "%OS%"=="Windows_NT" @setlocal +if "%OS%"=="WINNT" @setlocal + +rem ---------- Handle the SSL Issue with proper JDK version -------------------- +rem find the version of the jdk +:findJdk + +set CMD=RUN %* + +:checkJdk17 +"%JAVA_HOME%\bin\java" -version 2>&1 | findstr /r "1.[7|8]" >NUL +IF ERRORLEVEL 1 goto unknownJdk +goto jdk17 + +:unknownJdk +echo Starting WSO2 Carbon (in unsupported JDK) +echo [ERROR] CARBON is supported only on JDK 1.7 and 1.8 +goto jdk17 + +:jdk17 +goto runServer + +rem ----------------- Execute The Requested Command ---------------------------- + +:runServer +cd %CARBON_HOME% + +rem ------------------ Remove tmp folder on startup ----------------------------- +set TMP_DIR=%CARBON_HOME%\tmp +cd "%TMP_DIR%" +del *.* /s /q > nul +FOR /d %%G in ("*.*") DO rmdir %%G /s /q +cd .. + +rem ---------- Add jars to classpath ---------------- + +set CARBON_CLASSPATH=.\..\lib;%CARBON_CLASSPATH% + +set JAVA_ENDORSED=".\..\lib\endorsed";"%JAVA_HOME%\jre\lib\endorsed";"%JAVA_HOME%\lib\endorsed" + +rem ---------------- Setting default profile for Runtime if not parsed -------------- + +set profileSet=false + +for %%x in (%*) do ( + if "%%x" == "%x:-Dprofile%" ( + set profileSet=true + ) +) + +if "%profileSet%" == "false" ( + set profile=-Dprofile=broker-default +) + +set CMD_LINE_ARGS=-Xbootclasspath/a:%CARBON_XBOOTCLASSPATH% -Xms1024m -Xmx2048m -XX:MaxPermSize=256m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath="%CARBON_HOME%\repository\logs\heap-dump.hprof" -Dcom.sun.management.jmxremote -classpath %CARBON_CLASSPATH% %JAVA_OPTS% -Djava.endorsed.dirs=%JAVA_ENDORSED% -DandesConfig=broker.xml -Dcarbon.registry.root=/ -Dcarbon.home="%CARBON_HOME%" -Dwso2.server.standalone=true -Djava.command="%JAVA_HOME%\bin\java" -Djava.opts="%JAVA_OPTS%" -Djava.io.tmpdir="%CARBON_HOME%\tmp" -Dcatalina.base="%CARBON_HOME%\..\lib\tomcat" -Dwso2.carbon.xml=%CARBON_HOME%\conf\carbon.xml -Dwso2.registry.xml="%CARBON_HOME%\conf\registry.xml" -Dwso2.user.mgt.xml="%CARBON_HOME%\conf\user-mgt.xml" -Dwso2.transports.xml="%CARBON_HOME%\conf\mgt-transports.xml" -Djava.util.logging.config.file="%CARBON_HOME%\conf\log4j.properties" -Dcarbon.config.dir.path="%CARBON_HOME%\conf" -Dcarbon.logs.path="%CARBON_HOME%\repository\logs" -Dcomponents.repo="%CARBON_HOME%\..\components\plugins" -Dcarbon.config.dir.path="%CARBON_HOME%\conf" -Dcarbon.components.dir.path="%CARBON_HOME%\..\components" -Dcarbon.extensions.dir.path="%CARBON_HOME%\..\..\extensions" -Dcarbon.dropins.dir.path="%CARBON_HOME%\..\..\dropins" -Dcarbon.external.lib.dir.path="%CARBON_HOME%\..\..\lib" -Dcarbon.patches.dir.path="%CARBON_HOME%\..\..\patches" -Dcarbon.servicepacks.dir.path="%CARBON_HOME%\..\..\servicepacks" -Dcarbon.internal.lib.dir.path="%CARBON_HOME%\..\lib" -Dconf.location="%CARBON_HOME%\conf" -Dcom.atomikos.icatch.file="%CARBON_HOME%\..\lib\transactions.properties" -Dcom.atomikos.icatch.hide_init_file_path="true" -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -Dcom.sun.jndi.ldap.connect.pool.authentication=simple -Dcom.sun.jndi.ldap.connect.pool.timeout=3000 -Dorg.terracotta.quartz.skipUpdateCheck=true -Dcarbon.classpath=%CARBON_CLASSPATH% -Dfile.encoding=UTF8 -Dlogger.server.name="EI-Broker" -Dqpid.conf="\conf\advanced" %profile% + +:runJava +echo JAVA_HOME environment variable is set to %JAVA_HOME% +echo CARBON_HOME environment variable is set to %CARBON_HOME% +"%JAVA_HOME%\bin\java" %CMD_LINE_ARGS% org.wso2.carbon.bootstrap.Bootstrap %CMD% +if "%ERRORLEVEL%"=="121" goto runJava +:end +goto endlocal + +:endlocal + +:END diff --git a/modules/distribution/src/broker/bin/wso2server.sh b/modules/distribution/src/broker/bin/wso2server.sh new file mode 100644 index 00000000..729bc04f --- /dev/null +++ b/modules/distribution/src/broker/bin/wso2server.sh @@ -0,0 +1,343 @@ +#!/bin/sh +# ---------------------------------------------------------------------------- +# Copyright 2005-2012 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. +# 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. + +# ---------------------------------------------------------------------------- +# Main Script for the WSO2 Carbon Server +# +# Environment Variable Prequisites +# +# CARBON_HOME Home of WSO2 Carbon installation. If not set I will try +# to figure it out. +# +# JAVA_HOME Must point at your Java Development Kit installation. +# +# JAVA_OPTS (Optional) Java runtime options used when the commands +# is executed. +# +# NOTE: Borrowed generously from Apache Tomcat startup scripts. +# ----------------------------------------------------------------------------- + +# OS specific support. $var _must_ be set to either true or false. +#ulimit -n 100000 + +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` + +# Set AXIS2_HOME. Needed for One Click JAR Download +AXIS2_HOME="$CARBON_HOME" + +# 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 "$AXIS2_HOME" ] && CARBON_HOME=`cygpath --unix "$CARBON_HOME"` +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 + +if [ -z "$JAVACMD" ] ; then + if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + else + JAVACMD=java + fi +fi + +if [ ! -x "$JAVACMD" ] ; then + echo "Error: JAVA_HOME is not defined correctly." + echo " CARBON cannot execute $JAVACMD" + exit 1 +fi + +# 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 + +if [ -e "$CARBON_HOME/wso2carbon.pid" ]; then + PID=`cat "$CARBON_HOME"/wso2carbon.pid` +fi + +# ----- Process the input command ---------------------------------------------- +args="" +for c in $* +do + if [ "$c" = "--debug" ] || [ "$c" = "-debug" ] || [ "$c" = "debug" ]; then + CMD="--debug" + continue + elif [ "$CMD" = "--debug" ]; then + if [ -z "$PORT" ]; then + PORT=$c + fi + elif [ "$c" = "--stop" ] || [ "$c" = "-stop" ] || [ "$c" = "stop" ]; then + CMD="stop" + elif [ "$c" = "--start" ] || [ "$c" = "-start" ] || [ "$c" = "start" ]; then + CMD="start" + elif [ "$c" = "--version" ] || [ "$c" = "-version" ] || [ "$c" = "version" ]; then + CMD="version" + elif [ "$c" = "--restart" ] || [ "$c" = "-restart" ] || [ "$c" = "restart" ]; then + CMD="restart" + elif [ "$c" = "--test" ] || [ "$c" = "-test" ] || [ "$c" = "test" ]; then + CMD="test" + else + args="$args $c" + fi +done + +if [ "$CMD" = "--debug" ]; then + if [ "$PORT" = "" ]; then + echo " Please specify the debug port after the --debug option" + exit 1 + fi + if [ -n "$JAVA_OPTS" ]; then + echo "Warning !!!. User specified JAVA_OPTS will be ignored, once you give the --debug option." + fi + CMD="RUN" + JAVA_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=$PORT" + echo "Please start the remote debugging client to continue..." +elif [ "$CMD" = "start" ]; then + if [ -e "$CARBON_HOME/wso2carbon.pid" ]; then + if ps -p $PID > /dev/null ; then + echo "Process is already running" + exit 0 + fi + fi + export CARBON_HOME="$CARBON_HOME" +# using nohup sh to avoid erros in solaris OS.TODO + nohup sh "$CARBON_HOME"/bin/wso2server.sh $args > /dev/null 2>&1 & + exit 0 +elif [ "$CMD" = "stop" ]; then + export CARBON_HOME="$CARBON_HOME" + kill -term `cat "$CARBON_HOME"/wso2carbon.pid` + exit 0 +elif [ "$CMD" = "restart" ]; then + export CARBON_HOME="$CARBON_HOME" + kill -term `cat "$CARBON_HOME"/wso2carbon.pid` + process_status=0 + pid=`cat "$CARBON_HOME"/wso2carbon.pid` + while [ "$process_status" -eq "0" ] + do + sleep 1; + ps -p$pid 2>&1 > /dev/null + process_status=$? + done + +# using nohup sh to avoid erros in solaris OS.TODO + nohup sh "$CARBON_HOME"/bin/wso2server.sh $args > /dev/null 2>&1 & + exit 0 +elif [ "$CMD" = "test" ]; then + JAVACMD="exec "$JAVACMD"" +elif [ "$CMD" = "version" ]; then + cat "$CARBON_HOME"/bin/version.txt + cat "$CARBON_HOME"/bin/wso2carbon-version.txt + exit 0 +fi + +# ---------- Handle the SSL Issue with proper JDK version -------------------- +jdk_17=`$JAVA_HOME/bin/java -version 2>&1 | grep "1.[7|8]"` +if [ "$jdk_17" = "" ]; then + echo " Starting WSO2 Carbon (in unsupported JDK)" + echo " [ERROR] CARBON is supported only on JDK 1.7 and 1.8" +fi + +CARBON_XBOOTCLASSPATH="" +for f in "$CARBON_HOME"/../lib/xboot/*.jar +do + if [ "$f" != "$CARBON_HOME/wso2/lib/xboot/*.jar" ];then + CARBON_XBOOTCLASSPATH="$CARBON_XBOOTCLASSPATH":$f + fi +done + +JAVA_ENDORSED_DIRS="$CARBON_HOME/../lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" + +CARBON_CLASSPATH="" +if [ -e "$JAVA_HOME/lib/tools.jar" ]; then + CARBON_CLASSPATH="$JAVA_HOME/../lib/tools.jar" +fi +for f in "$CARBON_HOME"/bin/*.jar +do + if [ "$f" != "$CARBON_HOME/bin/*.jar" ];then + CARBON_CLASSPATH="$CARBON_CLASSPATH":$f + fi +done +for t in "$CARBON_HOME"/../lib/commons-lang*.jar +do + CARBON_CLASSPATH="$CARBON_CLASSPATH":$t +done +# 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"` + AXIS2_HOME=`cygpath --absolute --windows "$CARBON_HOME"` + CLASSPATH=`cygpath --path --windows "$CLASSPATH"` + JAVA_ENDORSED_DIRS=`cygpath --path --windows "$JAVA_ENDORSED_DIRS"` + CARBON_CLASSPATH=`cygpath --path --windows "$CARBON_CLASSPATH"` + CARBON_XBOOTCLASSPATH=`cygpath --path --windows "$CARBON_XBOOTCLASSPATH"` +fi + +# ----- Execute The Requested Command ----------------------------------------- + +echo JAVA_HOME environment variable is set to $JAVA_HOME +echo CARBON_HOME environment variable is set to "$CARBON_HOME" + +cd "$CARBON_HOME" + +TMP_DIR="$CARBON_HOME"/tmp +if [ -d "$TMP_DIR" ]; then +rm -rf "$TMP_DIR"/* +fi + +START_EXIT_STATUS=121 +status=$START_EXIT_STATUS + +if [ -z "$JVM_MEM_OPTS" ]; then + java_version=$("$JAVACMD" -version 2>&1 | awk -F '"' '/version/ {print $2}') + JVM_MEM_OPTS="-Xms256m -Xmx1024m" + if [ "$java_version" \< "1.8" ]; then + JVM_MEM_OPTS="$JVM_MEM_OPTS -XX:MaxPermSize=256m" + fi +fi +echo "Using Java memory options: $JVM_MEM_OPTS" + +#setting up profile parameter for runtime in MB +PROFILE_SELECTED="false" +for i in "$@"; do + if echo "$i" | grep -q "Dprofile"; then + PROFILE_SELECTED="true" + fi +done + +if [ "$PROFILE_SELECTED" = false ] ; then + NODE_PARAMS="$NODE_PARAMS -Dprofile=broker-default" +fi + +#To monitor a Carbon server in remote JMX mode on linux host machines, set the below system property. +# -Djava.rmi.server.hostname="your.IP.goes.here" + +while [ "$status" = "$START_EXIT_STATUS" ] +do + $JAVACMD \ + -Xbootclasspath/a:"$CARBON_XBOOTCLASSPATH" \ + $JVM_MEM_OPTS \ + -XX:+HeapDumpOnOutOfMemoryError \ + -XX:HeapDumpPath="$CARBON_HOME/repository/logs/heap-dump.hprof" \ + $JAVA_OPTS \ + -Dcom.sun.management.jmxremote \ + -classpath "$CARBON_CLASSPATH" \ + -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" \ + -Djava.io.tmpdir="$CARBON_HOME/tmp" \ + -Dcatalina.base="$CARBON_HOME/../lib/tomcat" \ + -Dwso2.server.standalone=true \ + -Dcarbon.registry.root=/ \ + -Djava.command="$JAVACMD" \ + -DandesConfig=broker.xml \ + -Dqpid.conf="/conf/advanced/" \ + -Dcarbon.home="$CARBON_HOME" \ + -Dlogger.server.name="IoT-Broker" \ + -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \ + -Dcarbon.config.dir.path="$CARBON_HOME/conf" \ + -Dcarbon.repository.dir.path="$CARBON_HOME/repository" \ + -Dcarbon.components.dir.path="$CARBON_HOME/../components" \ + -Dcarbon.extensions.dir.path="$CARBON_HOME/../../extensions" \ + -Dcarbon.dropins.dir.path="$CARBON_HOME/../../dropins" \ + -Dcarbon.external.lib.dir.path="$CARBON_HOME/../../lib" \ + -Dcarbon.patches.dir.path="$CARBON_HOME/../../patches" \ + -Dcarbon.servicepacks.dir.path="$CARBON_HOME/../../servicepacks" \ + -Dcarbon.internal.lib.dir.path="$CARBON_HOME/../lib" \ + -Djava.util.logging.config.file="$CARBON_HOME/conf/etc/logging-bridge.properties" \ + -Dcomponents.repo="$CARBON_HOME/../components/plugins" \ + -Dconf.location="$CARBON_HOME/../broker/conf" \ + -Dcom.atomikos.icatch.file="$CARBON_HOME/../lib/transactions.properties" \ + -Dcom.atomikos.icatch.hide_init_file_path=true \ + -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false \ + -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true \ + -Dcom.sun.jndi.ldap.connect.pool.authentication=simple \ + -Dcom.sun.jndi.ldap.connect.pool.timeout=3000 \ + -Dorg.terracotta.quartz.skipUpdateCheck=true \ + -Djava.security.egd=file:/dev/./urandom \ + -Dfile.encoding=UTF8 \ + -Djava.net.preferIPv4Stack=true \ + -Dcom.ibm.cacheLocalHost=true \ + -DworkerNode=false \ + -Dorg.apache.cxf.io.CachedOutputStream.Threshold=104857600 \ + $NODE_PARAMS \ + org.wso2.carbon.bootstrap.Bootstrap $* + status=$? +done diff --git a/modules/distribution/src/broker/conf/axis2/axis2.xml b/modules/distribution/src/broker/conf/axis2/axis2.xml new file mode 100644 index 00000000..6d7d1067 --- /dev/null +++ b/modules/distribution/src/broker/conf/axis2/axis2.xml @@ -0,0 +1,725 @@ + + + + + + + + + + + + + ${hotdeployment} + ${hotupdate} + optional + true + work/mtom + 4000 + + ${childfirstCL} + + + true + + + true + + + + false + + inmemory + + + + + + + services + + + axis2services + + + axis2modules + + + WSO2 Message Broker-3.0.0 + + + WSO2 Message Broker-3.0.0 + + + + + + + false + + + + + + false + + + true + + + + ./repository/deployment/server/synapse-configs + + + + . + + + . + + + WSO2 Carbon Server + + + + + + + ${jaxwsparam} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 9763 + + + + + + + + + + + + 9443 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + HTTP/1.1 + chunked + + true + + + HTTP/1.1 + chunked + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + multicast + + + + + wso2.carbon.domain + + + + + + 45564 + + 100 + + 60 + + + + + + 127.0.0.1 + + + + + + 4000 + + + + + + + + + + + + + + org.wso2.andes.server.cluster.coordination.hazelcast.custom.serializer.TreeSetLongWrapperSerializer + org.wso2.andes.server.cluster.coordination.hazelcast.custom.serializer.TreeSetSlotWrapperSerializer + org.wso2.andes.server.cluster.coordination.hazelcast.custom.serializer.HashMapStringTreeSetWrapperSerializer + + + + + + 127.0.0.1 + 4000 + + + + + + + + + diff --git a/modules/distribution/src/broker/conf/broker.xml b/modules/distribution/src/broker/conf/broker.xml new file mode 100755 index 00000000..9e525b7b --- /dev/null +++ b/modules/distribution/src/broker/conf/broker.xml @@ -0,0 +1,586 @@ + + + + + + + + + default + + localhost + 7611 + 0 + + 5 + + 10 + + + + + 5000 + + + 3000 + + + 4000 + + + + + + + 1000 + + + + + + + + 0.0.0.0 + + + + + + repository/resources/security/wso2carbon.jks + wso2carbon + SunX509 + + + repository/resources/security/client-truststore.jks + wso2carbon + SunX509 + + + + 10 + false + true + + + + + 0.0.0.0 + + + + + + repository/resources/security/wso2carbon.jks + wso2carbon + SunX509 + + + repository/resources/security/client-truststore.jks + wso2carbon + SunX509 + + + + + 32768 + + + 32768 + + + + + REQUIRED + + + + https://localhost:9443/services/OAuth2TokenValidationService + admin + admin + 10 + 150 + + + + REQUIRED + + + + + + + /permission/device-mgt/user/groups/device_events + + /permission/device-mgt/user/groups/device_operation + + admin + admin + https://localhost:8243 + + 100 + https://localhost:8243 + + + + + + + + + + + + + + + WSO2MBStoreDB + 08 + 23,27,44 + 21,22 + 40 + + + + WSO2MBStoreDB + 08 + 23,27,44 + 21,22 + 40 + + + + + 256 + + 4 + + 2 + + + strong + + + false + + + + org.wso2.andes.server.cluster.coordination.TimeStampBasedMessageIdGenerator + + + 10 + + + + + + + 10000000 + + + + + + + + 2000 + + + 1000 + + + 1000 + + + 5 + + + + + + 1000 + + + 4096 + + + 5 + + + 5 + + + 5 + + + 65000 + + + + 100 + + 120 + + + + + DISCARD_NONE + + 60 + + + + + + 1 + + + 100 + + + 1000 + + + + + + 3 + + + 65500 + + + false + + + 1000 + + + + + + 1 + + + 65536 + + + 70 + + + 180 + + + 1 + + + + + + 10 + + + 900 + + + 3 + + + + + + + + 100 + + + 100000 + + + false + + + + + + + + 800 + 8000 + + + + + 100 + 1000 + + + + + + RDBMS + + + + + + 5 + + + 900 + + + + + + 1 + + + + + + + default + + + diff --git a/modules/distribution/src/broker/conf/carbon.xml b/modules/distribution/src/broker/conf/carbon.xml new file mode 100755 index 00000000..ef7a7bfb --- /dev/null +++ b/modules/distribution/src/broker/conf/carbon.xml @@ -0,0 +1,677 @@ + + + + + + + + WSO2 Message Broker + + + MB + + + 3.2.0 + + + + + + + + + local:/${carbon.context}/services/ + + + + + + + MessageBroker + + + + + + + org.wso2.carbon + + + / + + + + + + + + + 15 + + + + + + + + + 3 + + + + + 9999 + + 11111 + + + + + + 10389 + + 8000 + + + + + + 10500 + + + + + + + + + org.wso2.carbon.tomcat.jndi.CarbonJavaURLContextFactory + + + + + + + + + java + + + + + + + + + + false + + + false + + + 600 + + + + false + + + + + + + + 30 + + + + + + + + + 15 + + + + + + ${carbon.home}/repository/deployment/server/ + + + 15 + + + ${carbon.home}/conf/axis2/axis2.xml + + + 30000 + + + ${carbon.home}/repository/deployment/client/ + + ${carbon.home}/conf/axis2/axis2_client.xml + + true + + + + + + + + + + admin + Default Administrator Role + + + user + Default User Role + + + + + + + + + + + + ${carbon.home}/repository/resources/security/wso2carbon.jks + + JKS + + wso2carbon + + wso2carbon + + wso2carbon + + + + + + ${carbon.home}/repository/resources/security/client-truststore.jks + + JKS + + wso2carbon + + + + + + + + + + + + + + + + + + + UserManager + + + false + + + + + + true + allow + + + + + + + + ${carbon.home}/tmp/work + + + + + + true + + + 10 + + + 30 + + + + + + 100 + + + + keystore + certificate + * + + org.wso2.carbon.ui.transports.fileupload.AnyFileUploadExecutor + + + + + jarZip + + org.wso2.carbon.ui.transports.fileupload.JarZipUploadExecutor + + + + dbs + + org.wso2.carbon.ui.transports.fileupload.DBSFileUploadExecutor + + + + tools + + org.wso2.carbon.ui.transports.fileupload.ToolsFileUploadExecutor + + + + toolsAny + + org.wso2.carbon.ui.transports.fileupload.ToolsAnyFileUploadExecutor + + + + + + + + + + info + org.wso2.carbon.core.transports.util.InfoProcessor + + + wsdl + org.wso2.carbon.core.transports.util.Wsdl11Processor + + + wsdl2 + org.wso2.carbon.core.transports.util.Wsdl20Processor + + + xsd + org.wso2.carbon.core.transports.util.XsdProcessor + + + + + + false + false + true + svn + http://svnrepo.example.com/repos/ + username + password + true + + + + + + + + + + + + + + + ${require.carbon.servlet} + + + + + true + + + + + + + default repository + http://product-dist.wso2.com/p2/carbon/releases/wilkes/ + + + + + + + + true + + + + + + true + + diff --git a/modules/distribution/src/broker/conf/datasources/master-datasources.xml b/modules/distribution/src/broker/conf/datasources/master-datasources.xml new file mode 100644 index 00000000..c36b7eb4 --- /dev/null +++ b/modules/distribution/src/broker/conf/datasources/master-datasources.xml @@ -0,0 +1,209 @@ + + + + org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader + + + + + + + + + WSO2_CARBON_DB + The datasource used for registry and user manager + + jdbc/WSO2CarbonDB + + + + jdbc:h2:../../repository/database/WSO2CARBON_DB;DB_CLOSE_ON_EXIT=FALSE;AUTO_SERVER=TRUE;AUTO_SERVER_PORT=9095 + wso2carbon + wso2carbon + org.h2.Driver + 50 + 60000 + true + SELECT 1 + 30000 + + + + + + + + WSO2_MB_STORE_DB + The datasource used for message broker database + + WSO2MBStoreDB + + + + jdbc:h2:repository/database/WSO2MB_DB;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=60000 + wso2carbon + wso2carbon + org.h2.Driver + 50 + 60000 + true + SELECT 1 + 30000 + false + + + + + + + + + + + + + + + + + + + + + + + diff --git a/modules/distribution/src/broker/conf/etc/launch.ini b/modules/distribution/src/broker/conf/etc/launch.ini new file mode 100644 index 00000000..5b98245b --- /dev/null +++ b/modules/distribution/src/broker/conf/etc/launch.ini @@ -0,0 +1,249 @@ +# Eclipse Runtime Configuration Overrides +# These properties are loaded prior to starting the framework and can also be used to override System Properties +# @null is a special value used to override and clear the framework's copy of a System Property prior to starting the framework +# "*" can be used together with @null to clear System Properties that match a prefix name. + +osgi.*=@null +org.osgi.*=@null +eclipse.*=@null + +osgi.parentClassloader=app +osgi.contextClassLoaderParent=app + +# When osgi.clean is set to "true", any cached data used by the OSGi framework +# will be wiped clean. This will clean the caches used to store bundle +# dependency resolution and eclipse extension registry data. Using this +# option will force OSGi framework to reinitialize these caches. +# The following setting is put in place to get rid of the problems +# faced when re-starting the system. Please note that, when this setting is +# true, if you manually start a bundle, it would not be available when +# you re-start the system. To avid this, copy the bundle jar to the plugins +# folder, before you re-start the system. +osgi.clean=true + +# Uncomment the following line to turn on Eclipse Equinox debugging. +# You may also edit the osgi-debug.options file and fine tune the debugging +# options to suite your needs. +#osgi.debug=./conf/osgi-debug.options + +# Following system property allows us to control the public JDK packages exported through the system bundle. +org.osgi.framework.system.packages=javax.accessibility,\ +javax.activity,\ +javax.crypto,\ +javax.crypto.interfaces,\ +javax.crypto.spec,\ +javax.imageio,\ +javax.imageio.event,\ +javax.imageio.metadata,\ +javax.imageio.plugins.bmp,\ +javax.imageio.plugins.jpeg,\ +javax.imageio.spi,\ +javax.imageio.stream,\ +javax.jms,\ +javax.management,\ +javax.management.loading,\ +javax.management.modelmbean,\ +javax.management.monitor,\ +javax.management.openmbean,\ +javax.management.relation,\ +javax.management.remote,\ +javax.management.remote.rmi,\ +javax.management.timer,\ +javax.naming,\ +javax.naming.directory,\ +javax.naming.event,\ +javax.naming.ldap,\ +javax.naming.spi,\ +javax.net,\ +javax.net.ssl,\ +javax.print,\ +javax.print.attribute,\ +javax.print.attribute.standard,\ +javax.print.event,\ +javax.rmi,\ +javax.rmi.CORBA,\ +javax.rmi.ssl,\ +javax.script,\ +javax.security.auth,\ +javax.security.auth.callback,\ +javax.security.auth.kerberos,\ +javax.security.auth.login,\ +javax.security.auth.spi,\ +javax.security.auth.x500,\ +javax.security.cert,\ +javax.security.sasl,\ +javax.sound.midi,\ +javax.sound.midi.spi,\ +javax.sound.sampled,\ +javax.sound.sampled.spi,\ +javax.sql,\ +javax.sql.rowset,\ +javax.sql.rowset.serial,\ +javax.sql.rowset.spi,\ +javax.swing,\ +javax.swing.border,\ +javax.swing.colorchooser,\ +javax.swing.event,\ +javax.swing.filechooser,\ +javax.swing.plaf,\ +javax.swing.plaf.basic,\ +javax.swing.plaf.metal,\ +javax.swing.plaf.multi,\ +javax.swing.plaf.synth,\ +javax.swing.table,\ +javax.swing.text,\ +javax.swing.text.html,\ +javax.swing.text.html.parser,\ +javax.swing.text.rtf,\ +javax.swing.tree,\ +javax.swing.undo,\ +javax.transaction,\ +javax.transaction.xa,\ +javax.xml.namespace,\ +javax.xml.parsers,\ +javax.xml.transform,\ +javax.xml.transform.stream,\ +javax.xml.transform.dom,\ +javax.xml.transform.sax,\ +javax.xml,\ +javax.xml.validation,\ +javax.xml.datatype,\ +javax.xml.xpath,\ +javax.activation,\ +com.sun.activation.registries,\ +com.sun.activation.viewers,\ +org.ietf.jgss,\ +org.omg.CORBA,\ +org.omg.CORBA_2_3,\ +org.omg.CORBA_2_3.portable,\ +org.omg.CORBA.DynAnyPackage,\ +org.omg.CORBA.ORBPackage,\ +org.omg.CORBA.portable,\ +org.omg.CORBA.TypeCodePackage,\ +org.omg.CosNaming,\ +org.omg.CosNaming.NamingContextExtPackage,\ +org.omg.CosNaming.NamingContextPackage,\ +org.omg.Dynamic,\ +org.omg.DynamicAny,\ +org.omg.DynamicAny.DynAnyFactoryPackage,\ +org.omg.DynamicAny.DynAnyPackage,\ +org.omg.IOP,\ +org.omg.IOP.CodecFactoryPackage,\ +org.omg.IOP.CodecPackage,\ +org.omg.Messaging,\ +org.omg.PortableInterceptor,\ +org.omg.PortableInterceptor.ORBInitInfoPackage,\ +org.omg.PortableServer,\ +org.omg.PortableServer.CurrentPackage,\ +org.omg.PortableServer.POAManagerPackage,\ +org.omg.PortableServer.POAPackage,\ +org.omg.PortableServer.portable,\ +org.omg.PortableServer.ServantLocatorPackage,\ +org.omg.SendingContext,\ +org.omg.stub.java.rmi,\ +org.w3c.dom,\ +org.w3c.dom.bootstrap,\ +org.w3c.dom.css,\ +org.w3c.dom.events,\ +org.w3c.dom.html,\ +org.w3c.dom.ls,\ +org.w3c.dom.ranges,\ +org.w3c.dom.stylesheets,\ +org.w3c.dom.traversal,\ +org.w3c.dom.views ,\ +org.xml.sax,\ +org.xml.sax.ext,\ +org.xml.sax.helpers,\ +org.apache.xerces.xpointer,\ +org.apache.xerces.xni.grammars,\ +org.apache.xerces.impl.xs.util,\ +org.apache.xerces.jaxp.validation,\ +org.apache.xerces.impl.dtd.models,\ +org.apache.xerces.impl.xpath,\ +org.apache.xerces.dom3.as,\ +org.apache.xerces.impl.dv.xs,\ +org.apache.xerces.util,\ +org.apache.xerces.impl.xs.identity,\ +org.apache.xerces.impl.xs.opti,\ +org.apache.xerces.jaxp,\ +org.apache.xerces.impl.dv,\ +org.apache.xerces.xs.datatypes,\ +org.apache.xerces.dom.events,\ +org.apache.xerces.impl.msg,\ +org.apache.xerces.xni,\ +org.apache.xerces.impl.xs,\ +org.apache.xerces.impl,\ +org.apache.xerces.impl.io,\ +org.apache.xerces.xinclude,\ +org.apache.xerces.jaxp.datatype,\ +org.apache.xerces.parsers,\ +org.apache.xerces.impl.dv.util,\ +org.apache.xerces.xni.parser,\ +org.apache.xerces.impl.xs.traversers,\ +org.apache.xerces.impl.dv.dtd,\ +org.apache.xerces.xs,\ +org.apache.xerces.impl.dtd,\ +org.apache.xerces.impl.validation,\ +org.apache.xerces.impl.xs.models,\ +org.apache.xerces.impl.xpath.regex,\ +org.apache.xml.serialize,\ +org.apache.xerces.dom,\ +org.apache.xalan,\ +org.apache.xalan.xslt,\ +org.apache.xalan.templates,\ +org.apache.xalan.xsltc,\ +org.apache.xalan.xsltc.cmdline,\ +org.apache.xalan.xsltc.cmdline.getopt,\ +org.apache.xalan.xsltc.trax,\ +org.apache.xalan.xsltc.dom,\ +org.apache.xalan.xsltc.runtime,\ +org.apache.xalan.xsltc.runtime.output,\ +org.apache.xalan.xsltc.util,\ +org.apache.xalan.xsltc.compiler,\ +org.apache.xalan.xsltc.compiler.util,\ +org.apache.xalan.serialize,\ +org.apache.xalan.client,\ +org.apache.xalan.res,\ +org.apache.xalan.transformer,\ +org.apache.xalan.extensions,\ +org.apache.xalan.lib,\ +org.apache.xalan.lib.sql,\ +org.apache.xalan.processor,\ +org.apache.xalan.trace,\ +org.apache.xml.dtm,\ +org.apache.xml.dtm.ref,\ +org.apache.xml.dtm.ref.sax2dtm,\ +org.apache.xml.dtm.ref.dom2dtm,\ +org.apache.xml.utils,\ +org.apache.xml.utils.res,\ +org.apache.xml.res,\ +org.apache.xml.serializer,\ +org.apache.xml.serializer.utils,\ +org.apache.xpath,\ +org.apache.xpath.domapi,\ +org.apache.xpath.objects,\ +org.apache.xpath.patterns,\ +org.apache.xpath.jaxp,\ +org.apache.xpath.res,\ +org.apache.xpath.operations,\ +org.apache.xpath.functions,\ +org.apache.xpath.axes,\ +org.apache.xpath.compiler,\ +org.apache.xml.resolver,\ +org.apache.xml.resolver.tools,\ +org.apache.xml.resolver.helpers,\ +org.apache.xml.resolver.readers,\ +org.apache.xml.resolver.etc,\ +org.apache.xml.resolver.apps,\ +javax.xml.ws,\ +javax.xml.bind,\ +javax.xml.bind.annotation,\ +javax.annotation,\ +javax.jws,\ +javax.jws.soap,\ +javax.xml.soap,\ +com.sun.xml.internal.messaging.saaj.soap.ver1_1,\ +com.sun.xml.internal.messaging.saaj.soap,\ +com.sun.tools.internal.ws.spi,\ +org.github.jamm,\ +org.wso2.carbon.bootstrap diff --git a/modules/distribution/src/broker/conf/hazelcast.properties b/modules/distribution/src/broker/conf/hazelcast.properties new file mode 100644 index 00000000..e0dbc500 --- /dev/null +++ b/modules/distribution/src/broker/conf/hazelcast.properties @@ -0,0 +1,2 @@ +hazelcast.max.no.heartbeat.seconds=600 +hazelcast.shutdownhook.enabled=false \ No newline at end of file diff --git a/modules/distribution/src/broker/conf/log4j.properties b/modules/distribution/src/broker/conf/log4j.properties new file mode 100644 index 00000000..f078312c --- /dev/null +++ b/modules/distribution/src/broker/conf/log4j.properties @@ -0,0 +1,239 @@ +# +# Copyright 2009-2015 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. +# + +# +# This is the log4j configuration file used by WSO2 Carbon +# +# IMPORTANT : Please do not remove or change the names of any +# of the Appenders defined here. The layout pattern & log file +# can be changed using the WSO2 Carbon Management Console, and those +# settings will override the settings in this file. +# + +log4j.rootLogger=INFO, CARBON_CONSOLE, CARBON_LOGFILE, CARBON_MEMORY, CARBON_SYS_LOG + +log4j.logger.AUDIT_LOG=INFO, AUDIT_LOGFILE +log4j.logger.org.apache.axis2.wsdl.codegen.writer.PrettyPrinter=ERROR, CARBON_LOGFILE, CARBON_MEMORY +log4j.logger.org.apache.axis2.clustering=INFO, CARBON_CONSOLE, CARBON_LOGFILE +log4j.logger.org.apache=INFO, CARBON_LOGFILE, CARBON_MEMORY +log4j.logger.org.apache.catalina=WARN +log4j.logger.org.apache.tomcat=WARN +log4j.logger.org.wso2.carbon.apacheds=WARN +log4j.logger.org.apache.directory.server.ldap=WARN +log4j.logger.org.apache.directory.server.core.event=WARN +log4j.logger.com.atomikos=INFO,ATOMIKOS +log4j.logger.org.quartz=WARN +log4j.logger.org.apache.jackrabbit.webdav=WARN +log4j.logger.org.apache.juddi=ERROR +log4j.logger.org.apache.commons.digester.Digester=WARN +log4j.logger.org.apache.jasper.compiler.TldLocationsCache=WARN +log4j.logger.org.apache.qpid=WARN +log4j.logger.org.apache.qpid.server.Main=INFO +log4j.logger.qpid.message=WARN +log4j.logger.qpid.message.broker.listening=INFO +log4j.logger.org.apache.tiles=WARN +log4j.logger.org.apache.commons.httpclient=ERROR +log4j.logger.org.apache.coyote=WARN +log4j.logger.org.apache.solr=ERROR +log4j.logger.org.infinispan=WARN +log4j.logger.org.jgroups=ERROR +log4j.logger.org.wso2=INFO +log4j.logger.org.apache.axis2.enterprise=FATAL, CARBON_LOGFILE, CARBON_MEMORY +log4j.logger.org.opensaml.xml=WARN, CARBON_LOGFILE, CARBON_MEMORY +log4j.logger.org.apache.directory.shared.ldap=WARN, CARBON_LOGFILE, CARBON_MEMORY +log4j.logger.org.apache.directory.server.ldap.handlers=WARN, CARBON_LOGFILE, CARBON_MEMORY +#Following are to remove false error messages from startup (IS) +log4j.logger.org.apache.directory.shared.ldap.entry.DefaultServerAttribute=FATAL, CARBON_LOGFILE, CARBON_MEMORY +log4j.logger.org.apache.directory.server.core.DefaultDirectoryService=ERROR, CARBON_LOGFILE, CARBON_MEMORY +log4j.logger.org.apache.directory.shared.ldap.ldif.LdifReader=ERROR, CARBON_LOGFILE, CARBON_MEMORY +log4j.logger.org.apache.directory.server.ldap.LdapProtocolHandler=ERROR, CARBON_LOGFILE, CARBON_MEMORY +log4j.logger.org.apache.directory.server.core=ERROR, CARBON_LOGFILE, CARBON_MEMORY +#Hive Related Log configurations +log4j.logger.DataNucleus=ERROR +log4j.logger.Datastore=ERROR +log4j.logger.Datastore.Schema=ERROR +log4j.logger.JPOX.Datastore=ERROR +log4j.logger.JPOX.Plugin=ERROR +log4j.logger.JPOX.MetaData=ERROR +log4j.logger.JPOX.Query=ERROR +log4j.logger.JPOX.General=ERROR +log4j.logger.JPOX.Enhancer=ERROR +log4j.logger.org.apache.hadoop.hive=WARN +log4j.logger.hive=WARN +log4j.logger.ExecMapper=WARN +log4j.logger.ExecReducer=WARN + +#andes specific +log4j.logger.org.wso2.andes.server.handler.ConnectionStartOkMethodHandler=WARN +log4j.logger.org.wso2.andes.server.handler.ChannelOpenHandler=WARN +log4j.logger.org.wso2.andes.server.handler.ChannelCloseHandler=WARN +log4j.logger.org.wso2.andes.server.AMQChannel=WARN +log4j.logger.org.wso2.andes.server.handler.ConnectionCloseMethodHandler=WARN +log4j.logger.org.wso2.andes.server.handler.QueueDeclareHandler=WARN +log4j.logger.org.wso2.andes.server.handler.QueueBindHandler=WARN +log4j.logger.org.wso2.andes.server.virtualhost.VirtualHostConfigRecoveryHandler=WARN +log4j.logger.org.wso2.andes.amqp.QpidAndesBridge=WARN +log4j.logger.trace.messages=TRACE,CARBON_TRACE_LOGFILE + +#trace level logs for WSO2 Message Broker +#log4j.logger.org.wso2.andes.server.trace=TRACE,CARBON_TRACE_LOGFILE + +# Uncomment to enable MessageTracer +log4j.logger.org.wso2.andes.tools.utils.MessageTracer=INFO,CARBON_TRACE_LOGFILE + +#Andes logs for troubleshooting +#log4j.logger.org.wso2.andes.kernel.MessageFlusher=DEBUG +#log4j.logger.org.wso2.andes.kernel.slot.SlotDeliveryWorker=DEBUG +#log4j.logger.org.wso2.andes.amqp.QpidAndesBridge=DEBUG +#log4j.logger.org.wso2.andes.server.AMQChannel=DEBUG +#log4j.logger.org.wso2.andes.kernel.slot.SlotDeliveryWorkerManager=DEBUG +#log4j.logger.org.wso2.andes.kernel.distruptor.inbound.MessageWriter=DEBUG +#log4j.logger.org.wso2.andes.kernel.distruptor.inbound.AckHandler=DEBUG +#log4j.logger.org.wso2.andes.kernel.distruptor.inbound.StateEventHandler=DEBUG +#log4j.logger.org.wso2.andes.kernel.slot.SlotManagerClusterMode=DEBUG +#log4j.logger.org.wso2.andes.subscription.LocalSubscription=DEBUG +#log4j.logger.org.wso2.andes.subscription.SubscriptionStore=DEBUG + +#MQTT specific +#log4j.logger.org.dna.mqtt.wso2.AndesMQTTBridge=DEBUG +#log4j.logger.org.dna.mqtt.moquette.messaging.spi.impl.ProtocolProcessor=DEBUG + +# DAS_AGENT is set to be a Custom Log Appender. +#log4j.appender.DAS_AGENT=org.wso2.carbon.analytics.shared.data.agents.log4j.appender.LogEventAppender +# DAS_AGENT uses PatternLayout. +#log4j.appender.DAS_AGENT.layout=org.wso2.carbon.analytics.shared.data.agents.log4j.util.TenantAwarePatternLayout +#log4j.appender.DAS_AGENT.columnList=%D,%S,%A,%d,%c,%p,%m,%H,%I,%Stacktrace +#log4j.appender.DAS_AGENT.userName=admin +#log4j.appender.DAS_AGENT.password=admin +#log4j.appender.DAS_AGENT.url=tcp://localhost:7612 +#log4j.appender.DAS_AGENT.maxTolerableConsecutiveFailure=5 +#log4j.appender.DAS_AGENT.streamDef=loganalyzer:1.0.0 + +log4j.additivity.org.apache.axis2.clustering=false +log4j.additivity.com.atomikos=false + +# CARBON_CONSOLE is set to be a ConsoleAppender using a PatternLayout. +log4j.appender.CARBON_CONSOLE=org.apache.log4j.ConsoleAppender +log4j.appender.CARBON_CONSOLE.layout=org.wso2.carbon.utils.logging.TenantAwarePatternLayout +# ConversionPattern will be overridden by the configuration setting in the DB +log4j.appender.CARBON_CONSOLE.layout.ConversionPattern=[%d] [${logger.server.name}] %P%5p {%c} - %x %m%n +log4j.appender.CARBON_CONSOLE.layout.TenantPattern=%U%@%D[%T] +log4j.appender.CARBON_CONSOLE.threshold=DEBUG + + +# The memory appender for logging +log4j.appender.CARBON_MEMORY=org.wso2.carbon.logging.service.appender.CarbonMemoryAppender +log4j.appender.CARBON_MEMORY.bufferSize=2000 +log4j.appender.CARBON_MEMORY.layout=org.wso2.carbon.utils.logging.TenantAwarePatternLayout +# ConversionPattern will be overridden by the configuration setting in the DB +log4j.appender.CARBON_MEMORY.layout.ConversionPattern=TID: [%T] [%S] [%d] %P%5p {%c} - %x %m {%c}%n +log4j.appender.CARBON_MEMORY.layout.TenantPattern=%U%@%D [%T] [%S] +log4j.appender.CARBON_MEMORY.columnList=%T,%S,%A,%d,%c,%p,%m,%H,%I,%Stacktrace +log4j.appender.CARBON_MEMORY.threshold=DEBUG + +# CARBON_LOGFILE is set to be a DailyRollingFileAppender using a PatternLayout. +log4j.appender.CARBON_LOGFILE=org.apache.log4j.DailyRollingFileAppender +# Log file will be overridden by the configuration setting in the DB +# This path should be relative to WSO2 Carbon Home +log4j.appender.CARBON_LOGFILE.File=${carbon.home}/repository/logs/${instance.log}/wso2carbon${instance.log}.log +log4j.appender.CARBON_LOGFILE.Append=true +log4j.appender.CARBON_LOGFILE.layout=org.wso2.carbon.utils.logging.TenantAwarePatternLayout +# ConversionPattern will be overridden by the configuration setting in the DB +log4j.appender.CARBON_LOGFILE.layout.ConversionPattern=TID: [%T] [%S] [%d] %P%5p {%c} - %x %m {%c}%n +log4j.appender.CARBON_LOGFILE.layout.TenantPattern=%U%@%D [%T] [%S] +log4j.appender.CARBON_LOGFILE.threshold=DEBUG + +log4j.appender.CARBON_SYS_LOG = org.apache.log4j.net.SyslogAppender +log4j.appender.CARBON_SYS_LOG.layout=org.apache.log4j.PatternLayout +log4j.appender.CARBON_SYS_LOG.layout.ConversionPattern=[%d] %5p {%c} - %x %m {%c}%n +log4j.appender.CARBON_SYS_LOG.SyslogHost=localhost +log4j.appender.CARBON_SYS_LOG.Facility=USER +log4j.appender.CARBON_SYS_LOG.threshold=DEBUG + +# LOGEVENT is set to be a LogEventAppender using a PatternLayout to send logs to LOGEVENT +log4j.appender.LOGEVENT=org.wso2.carbon.logging.appender.LogEventAppender +log4j.appender.LOGEVENT.url=tcp://10.100.3.103:7611 +log4j.appender.LOGEVENT.layout=org.wso2.carbon.utils.logging.TenantAwarePatternLayout +log4j.appender.LOGEVENT.columnList=%T,%S,%A,%d,%c,%p,%m,%H,%I,%Stacktrace +log4j.appender.LOGEVENT.userName=admin +log4j.appender.LOGEVENT.password=admin + +# Appender config to CARBON_TRACE_LOGFILE +log4j.appender.CARBON_TRACE_LOGFILE=org.apache.log4j.DailyRollingFileAppender +log4j.appender.CARBON_TRACE_LOGFILE.File=${carbon.home}/repository/logs/${instance.log}/wso2carbon-trace-messages${instance.log}.log +log4j.appender.CARBON_TRACE_LOGFILE.Append=true +log4j.appender.CARBON_TRACE_LOGFILE.layout=org.wso2.carbon.utils.logging.TenantAwarePatternLayout +log4j.appender.CARBON_TRACE_LOGFILE.layout.ConversionPattern=[%d] %P%5p {%c} - %x %m {%c}%n +log4j.appender.CARBON_TRACE_LOGFILE.layout.TenantPattern=%U%@%D [%T] [%S] +log4j.appender.CARBON_TRACE_LOGFILE.threshold=TRACE +log4j.additivity.trace.messages=false + +# Appender config to AUDIT_LOGFILE +log4j.appender.AUDIT_LOGFILE=org.apache.log4j.DailyRollingFileAppender +log4j.appender.AUDIT_LOGFILE.File=${carbon.home}/repository/logs/audit.log +log4j.appender.AUDIT_LOGFILE.Append=true +log4j.appender.AUDIT_LOGFILE.layout=org.wso2.carbon.utils.logging.TenantAwarePatternLayout +log4j.appender.AUDIT_LOGFILE.layout.ConversionPattern=[%d] %P%5p - %x %m %n +log4j.appender.AUDIT_LOGFILE.layout.TenantPattern=%U%@%D [%T] [%S] +log4j.appender.AUDIT_LOGFILE.threshold=INFO +log4j.additivity.AUDIT_LOG=false + +# Appender config to send Atomikos transaction logs to new log file tm.out. +log4j.appender.ATOMIKOS = org.apache.log4j.RollingFileAppender +log4j.appender.ATOMIKOS.File = repository/logs/tm.out +log4j.appender.ATOMIKOS.Append = true +log4j.appender.ATOMIKOS.layout = org.apache.log4j.PatternLayout +log4j.appender.ATOMIKOS.layout.ConversionPattern=%p %t %c - %m%n + +# This file is used to override the default logger settings, and is used to remove unwanted logs from Shindig appearing on the console. + +# Specification of Handler used by Console Logger +handlers=java.util.logging.ConsoleHandler + +# Replacing default INFO level with SEVERE +java.util.logging.ConsoleHandler.level=SEVERE + +# moquette-log properties + +log4j.logger.org.dna.mqtt=INFO +log4j.logger.org.dna.mqtt.moquette.messaging.spi.impl.ProtocolProcessor=INFO +log4j.logger.org.dna.mqtt.moquette.messaging.spi.impl.SimpleMessaging=WARN + +#Protocol parsing +log4j.logger.org.dna.mqtt.moquette.server.netty.NettyMQTTHandler=WARN +#log4j.logger.org.dna.mqtt.moquette.server.netty.NettyMQTTHandler=DEBUG +log4j.logger.org.dna.mqtt.moquette.parser.netty=WARN +#Storage server +#log4j.logger.org.dna.mqtt.moquette.messaging.spi.impl.subscriptions.SubscriptionsStore=DEBUG +#log4j.logger.org.dna.mqtt.moquette.messaging.spi.impl.HawtDBStorageService=DEBUG + +# stdout appender is set to be a ConsoleAppender. +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +#log4j.appender.stdout.Threshold=WARN +#log4j.appender.stdout.Threshold=INFO +#log4j.appender.stdout.Threshold=DEBUG +#log4j.appender.stdout.Threshold=TRACE +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.stdout.layout.ConversionPattern=%-4r [%t] %-5p %c{1} %x - %m%n + +#file appender +log4j.appender.file=org.apache.log4j.RollingFileAppender +log4j.appender.file.Threshold=INFO +log4j.appender.file.File=wso2carbon.log +log4j.appender.file.MaxFileSize=1MB +log4j.appender.file.MaxBackupIndex=1 +log4j.appender.file.layout=org.apache.log4j.PatternLayout +log4j.appender.file.layout.ConversionPattern=%-4r [%t] %-5p %c{1} %x - %m%n diff --git a/modules/distribution/src/broker/conf/messaging-event-broker.xml b/modules/distribution/src/broker/conf/messaging-event-broker.xml new file mode 100644 index 00000000..6bc2cc3c --- /dev/null +++ b/modules/distribution/src/broker/conf/messaging-event-broker.xml @@ -0,0 +1,44 @@ + + + + + + + event/topics + + + + event/topics + event/topicIndex + + + + + + + + + 5 + 50 + 1000 + 1000 + + + diff --git a/modules/distribution/src/broker/conf/metrics.xml b/modules/distribution/src/broker/conf/metrics.xml new file mode 100644 index 00000000..68cbaaf3 --- /dev/null +++ b/modules/distribution/src/broker/conf/metrics.xml @@ -0,0 +1,103 @@ + + + + + + + true + + + + + true + + + false + + 60 + + + false + ${carbon.home}/repository/logs/metrics/ + + 60 + + + true + + + + jdbc/WSO2MetricsDB + + 60 + + + true + + 86400 + + 7 + + + + false + + + + 60 + + thrift + + tcp://localhost:7612 + + + admin + admin + + conf/data-bridge/data-agent-config.xml + + + diff --git a/modules/distribution/src/broker/conf/security/cipher-text.properties b/modules/distribution/src/broker/conf/security/cipher-text.properties new file mode 100644 index 00000000..6c2023d2 --- /dev/null +++ b/modules/distribution/src/broker/conf/security/cipher-text.properties @@ -0,0 +1,18 @@ +# By default, This file contains the secret alias names and the plain text passwords enclosed with '[]' brackets +# In Production environments, It is recommend to replace these plain text password by the encrypted values. CipherTool can be used for it. + +Carbon.Security.KeyStore.Password=[wso2carbon] +Carbon.Security.KeyStore.KeyPassword=[wso2carbon] +Carbon.Security.TrustStore.Password=[wso2carbon] +UserManager.AdminUser.Password=[admin] +Datasources.WSO2_CARBON_DB.Configuration.Password=[wso2carbon] +Server.Service.Connector.keystorePass=[wso2carbon] + +# MB-Specific +Datasources.WSO2_MB_STORE_DB.Configuration.Password=[wso2carbon] + +#AMQP / MQTT JKS store passwords +transports.amqp.sslConnection.keyStore.password=[wso2carbon] +transports.amqp.sslConnection.trustStore.password=[wso2carbon] +transports.mqtt.sslConnection.keyStore.password=[wso2carbon] +transports.mqtt.sslConnection.trustStore.password=[wso2carbon] \ No newline at end of file diff --git a/modules/distribution/src/broker/conf/security/cipher-tool.properties b/modules/distribution/src/broker/conf/security/cipher-tool.properties new file mode 100644 index 00000000..ee054cea --- /dev/null +++ b/modules/distribution/src/broker/conf/security/cipher-tool.properties @@ -0,0 +1,21 @@ +# 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 + +# MB-Specific +Datasources.WSO2_MB_STORE_DB.Configuration.Password=conf/datasources/master-datasources.xml//datasources-configuration/datasources/datasource[name='WSO2_MB_STORE_DB']/definition/configuration/password,false + +#AMQP / MQTT JKS store passwords +transports.amqp.sslConnection.keyStore.password=conf/broker.xml//broker/transports/amqp/sslConnection/keyStore/password,true +transports.amqp.sslConnection.trustStore.password=conf/broker.xml//broker/transports/amqp/sslConnection/trustStore/password,true +transports.mqtt.sslConnection.keyStore.password=conf/broker.xml//broker/transports/mqtt/sslConnection/keyStore/password,true +transports.mqtt.sslConnection.trustStore.password=conf/broker.xml//broker/transports/mqtt/sslConnection/trustStore/password,true \ No newline at end of file diff --git a/modules/distribution/src/broker/conf/tomcat/carbon/WEB-INF/web.xml b/modules/distribution/src/broker/conf/tomcat/carbon/WEB-INF/web.xml new file mode 100644 index 00000000..ea3db45a --- /dev/null +++ b/modules/distribution/src/broker/conf/tomcat/carbon/WEB-INF/web.xml @@ -0,0 +1,177 @@ + + + + + + + Restrict access to carbon console + + Restricted Console UI + /carbon/* + + + + + + + Owasp.CsrfGuard.Config + conf/security/Owasp.CsrfGuard.Carbon.properties + + + + bridgeservlet + Carbon Bridge Servlet + Carbon Bridge Servlet + org.wso2.carbon.tomcat.ext.servlet.DelegationServlet + + 1 + + + + + JavaScriptServlet + org.owasp.csrfguard.servlet.JavaScriptServlet + + + + bridgeservlet + /* + + + + bridgeservlet + *.jsp + + + + JavaScriptServlet + /carbon/admin/js/csrfPrevention.js + + + + + CharsetFilter + org.wso2.carbon.tomcat.ext.filter.CharacterSetFilter + + requestEncoding + UTF-8 + + + + + + CSRFGuard + org.owasp.csrfguard.CsrfGuardFilter + + + + + HttpHeaderSecurityFilter + org.apache.catalina.filters.HttpHeaderSecurityFilter + + hstsEnabled + false + + + + + HttpHeaderSecurityFilter + * + + + + CharsetFilter + /* + + + + CSRFGuard + /* + + + + + org.owasp.csrfguard.CsrfGuardServletContextListener + + + + + org.owasp.csrfguard.CsrfGuardHttpSessionListener + + + + 15 + + true + + + + + + 400 + /carbon/errors/error_400.html + + + 401 + /carbon/errors/error_401.html + + + 403 + /carbon/errors/error_403.html + + + 404 + /carbon/errors/error_404.html + + + 405 + /carbon/errors/error_405.html + + + 408 + /carbon/errors/error_408.html + + + 410 + /carbon/errors/error_410.html + + + 500 + /carbon/errors/error_500.html + + + 502 + /carbon/errors/error_502.html + + + 503 + /carbon/errors/error_503.html + + + 504 + /carbon/errors/error_504.html + + + + /carbon/errors/error.html + + diff --git a/modules/distribution/src/broker/conf/tomcat/webapp-classloading-environments.xml b/modules/distribution/src/broker/conf/tomcat/webapp-classloading-environments.xml new file mode 100644 index 00000000..02e2e057 --- /dev/null +++ b/modules/distribution/src/broker/conf/tomcat/webapp-classloading-environments.xml @@ -0,0 +1,77 @@ + + + + + + + + + + + + Tomcat + javax.annotation.*,javax.ejb,javax.el,javax.persistence,javax.servlet.*,javax.xml,javax.xml.ws,org.apache.catalina.*,org.apache.coyote.*,org.apache.el.*,org.apache.jasper.*,org.apache.naming.*,org.apache.tomcat.*,com.sun.el.*,org.wso2.carbon.tomcat.jndi.* + *,!META-INF/services/org.apache.webbeans.spi.plugins.OpenWebBeansPlugin,!META-INF/openwebbeans/openwebbeans.properties,!META-INF/standard-faces-config.xml,!META-INF/faces-config.xml + + + + Carbon + *,!org.springframework.*,!org.apache.solr.* + *,!META-INF/services/org.apache.webbeans.spi.plugins.OpenWebBeansPlugin,!META-INF/openwebbeans/openwebbeans.properties,!META-INF/standard-faces-config.xml,!META-INF/faces-config.xml + + + + Javaee + *,!org.springframework.* + * + + + + + + + + + + + + + + CXF + ${carbon.home}/../wso2/lib/runtimes/cxf/*.jar;${carbon.home}/../wso2/lib/runtimes/cxf/ + + + + diff --git a/modules/distribution/src/broker/resources/STRATOS_ROOT/images/bottom.gif b/modules/distribution/src/broker/resources/STRATOS_ROOT/images/bottom.gif new file mode 100644 index 00000000..56792668 Binary files /dev/null and b/modules/distribution/src/broker/resources/STRATOS_ROOT/images/bottom.gif differ diff --git a/modules/distribution/src/broker/resources/STRATOS_ROOT/images/content-bg.gif b/modules/distribution/src/broker/resources/STRATOS_ROOT/images/content-bg.gif new file mode 100644 index 00000000..6d0a5795 Binary files /dev/null and b/modules/distribution/src/broker/resources/STRATOS_ROOT/images/content-bg.gif differ diff --git a/modules/distribution/src/broker/resources/STRATOS_ROOT/images/favicon.ico b/modules/distribution/src/broker/resources/STRATOS_ROOT/images/favicon.ico new file mode 100644 index 00000000..f7b2bbfb Binary files /dev/null and b/modules/distribution/src/broker/resources/STRATOS_ROOT/images/favicon.ico differ diff --git a/modules/distribution/src/broker/resources/STRATOS_ROOT/images/feature-01-icon.gif b/modules/distribution/src/broker/resources/STRATOS_ROOT/images/feature-01-icon.gif new file mode 100644 index 00000000..b4ea8cda Binary files /dev/null and b/modules/distribution/src/broker/resources/STRATOS_ROOT/images/feature-01-icon.gif differ diff --git a/modules/distribution/src/broker/resources/STRATOS_ROOT/images/feature-02-icon.gif b/modules/distribution/src/broker/resources/STRATOS_ROOT/images/feature-02-icon.gif new file mode 100644 index 00000000..8754de14 Binary files /dev/null and b/modules/distribution/src/broker/resources/STRATOS_ROOT/images/feature-02-icon.gif differ diff --git a/modules/distribution/src/broker/resources/STRATOS_ROOT/images/feature-03-icon.gif b/modules/distribution/src/broker/resources/STRATOS_ROOT/images/feature-03-icon.gif new file mode 100644 index 00000000..d81f1fec Binary files /dev/null and b/modules/distribution/src/broker/resources/STRATOS_ROOT/images/feature-03-icon.gif differ diff --git a/modules/distribution/src/broker/resources/STRATOS_ROOT/images/intro-bg.gif b/modules/distribution/src/broker/resources/STRATOS_ROOT/images/intro-bg.gif new file mode 100644 index 00000000..a38a0dfa Binary files /dev/null and b/modules/distribution/src/broker/resources/STRATOS_ROOT/images/intro-bg.gif differ diff --git a/modules/distribution/src/broker/resources/STRATOS_ROOT/images/logo.gif b/modules/distribution/src/broker/resources/STRATOS_ROOT/images/logo.gif new file mode 100644 index 00000000..ee9beef1 Binary files /dev/null and b/modules/distribution/src/broker/resources/STRATOS_ROOT/images/logo.gif differ diff --git a/modules/distribution/src/broker/resources/STRATOS_ROOT/images/powered-logo.gif b/modules/distribution/src/broker/resources/STRATOS_ROOT/images/powered-logo.gif new file mode 100644 index 00000000..fb478bf9 Binary files /dev/null and b/modules/distribution/src/broker/resources/STRATOS_ROOT/images/powered-logo.gif differ diff --git a/modules/distribution/src/broker/resources/STRATOS_ROOT/images/register.gif b/modules/distribution/src/broker/resources/STRATOS_ROOT/images/register.gif new file mode 100644 index 00000000..98c53620 Binary files /dev/null and b/modules/distribution/src/broker/resources/STRATOS_ROOT/images/register.gif differ diff --git a/modules/distribution/src/broker/resources/STRATOS_ROOT/images/sign-in.gif b/modules/distribution/src/broker/resources/STRATOS_ROOT/images/sign-in.gif new file mode 100644 index 00000000..9e992cc2 Binary files /dev/null and b/modules/distribution/src/broker/resources/STRATOS_ROOT/images/sign-in.gif differ diff --git a/modules/distribution/src/broker/resources/STRATOS_ROOT/images/title-bg.gif b/modules/distribution/src/broker/resources/STRATOS_ROOT/images/title-bg.gif new file mode 100644 index 00000000..2d539a7e Binary files /dev/null and b/modules/distribution/src/broker/resources/STRATOS_ROOT/images/title-bg.gif differ diff --git a/modules/distribution/src/broker/resources/STRATOS_ROOT/images/top.gif b/modules/distribution/src/broker/resources/STRATOS_ROOT/images/top.gif new file mode 100644 index 00000000..9ed482c2 Binary files /dev/null and b/modules/distribution/src/broker/resources/STRATOS_ROOT/images/top.gif differ diff --git a/modules/distribution/src/broker/resources/STRATOS_ROOT/index.html b/modules/distribution/src/broker/resources/STRATOS_ROOT/index.html new file mode 100644 index 00000000..cc82a56b --- /dev/null +++ b/modules/distribution/src/broker/resources/STRATOS_ROOT/index.html @@ -0,0 +1,69 @@ + + + + + + + + StratosLive + + + + + + + +
+ +
+
+
+ + +
+

WSO2 MB brings Event Driven Architecture capabilities to WSO2 Carbon platform. It provides WS-Eventing, JMS and SQS interfaces to client. It uses Apache Qpid as the underling broker which supports AMQP.

+
+
+
+

Features

+
+ +

Bring CEP to SOA

+

+ Bring CEP to SOA by processing XML events and produce results as XML events. +

+
+
+ +

Registry Storage

+

+ Ability to define different event streams, queries and out put streams and store them in the registry as a bucket. +

+
+
+ +

Esper and Fusion

+

+ Support Esper and fusion back end runtimes. +

+
+
+
+
+
+ +
+ + + + diff --git a/modules/distribution/src/broker/resources/STRATOS_ROOT/style.css b/modules/distribution/src/broker/resources/STRATOS_ROOT/style.css new file mode 100644 index 00000000..f91a662a --- /dev/null +++ b/modules/distribution/src/broker/resources/STRATOS_ROOT/style.css @@ -0,0 +1,46 @@ +body { font-family: "Calibri","Lucida Grande","Lucida Sans","Microsoft Sans Serif","Lucida Sans Unicode","Verdana","Sans-serif","trebuchet ms"; font-size: .85em; line-height: 135%; color: #434343; margin: 0px; padding: 0px; background-color: #94C8EC;} + +p { } + +td { } + +a:link { text-decoration: none; } + +a:visited { text-decoration: none; } + +a:hover { text-decoration: none; } + +a:active { text-decoration: none; } + +a img { border: 0px; } +div +.clear { clear: both; } + +div#main-content { width: 960px; margin: auto; background-image: url(images/top.gif); background-repeat: no-repeat; background-position: left top; } + +div#header { height: 125px; } +div.logo { float: left; margin-top: 35px; } +div.sign-in { float: right; margin-top: 35px; } + +div#content { background-color: #ffffff; background-image: url(images/content-bg.gif); background-repeat: repeat-y; background-position: left top; } + +div.intro { padding: 35px; padding-top: 10px; padding-bottom: 20px; font-size: 125%; line-height: 130%; float: left; background-image: url(images/intro-bg.gif); background-position: left bottom; background-repeat: no-repeat; } +div.intro p { margin-top: 0px; margin-bottom: 0px; } + +div.register { float: right; margin-left: 40px; margin-top: 0px; margin-right: 0px; width: 400px; text-align: center;} +div.register a img { margin-bottom: 7px; } +div.register a:hover img { opacity:0.7;filter:alpha(opacity=70) } + +div.features { margin-top: 20px; } +div.features h2 { margin-top: 0px; margin-bottom: 0px; font-size: 24px; color: #003A63; margin-left: 35px; margin-right: 35px; border-bottom: solid 0px #79BDE8; padding-bottom: 10px; background-image: url(images/title-bg.gif); background-repeat: no-repeat; background-position: left bottom; } +div.feature { float: left; width: 230px; margin-left: 30px; margin-top: 7px; padding: 20px; text-align: left; } +div.feature img { float: left; margin-right: 10px; width: 64px; } +div.feature h2 { margin-top: 0px; margin-bottom: 7px; color: #0499CC; font-size: 140%; line-height: 110%; font-weight: normal; border-bottom: 0px; margin-left: 0px; margin-right: 0px; padding-bottom: 0px; background-image: none; } +div.feature p { margin-top: 0px; padding-top: 0px; } +div.feature-left { margin-left: 41px; } + +div#footer { height: 80px; background-image: url(images/bottom.gif); background-position: left top; background-repeat: no-repeat; padding-top: 25px; } +div#footer div.powered { color: #333333; float: right; font-size: 85%; margin-right: 10px; } +div#footer div.powered span { float: left; line-height: 23px; margin-right: 5px; } +div.footer-links { padding-bottom: 5px; padding-left: 10px; border-bottom: solid 1px #4E84C4; margin-bottom: 10px; color: #4E84C4; } +div#footer span.copyright { font-size: 90%; padding-left: 10px; } \ No newline at end of file diff --git a/pom.xml b/pom.xml index 692d9acb..3d01a982 100644 --- a/pom.xml +++ b/pom.xml @@ -1537,7 +1537,7 @@ - 2.0.20-SNAPSHOT + 2.0.23-SNAPSHOT [2.0.0, 3.0.0) @@ -1545,7 +1545,7 @@ - 3.0.12-SNAPSHOT + 3.0.13-SNAPSHOT 6.1.73-SNAPSHOT @@ -1577,7 +1577,7 @@ ${product.iot.version} 3.1.3 - 3.1.3 + 3.1.16 1.51.0.0