From 597c864affdeed23d19f790c30e377e3ad06506b Mon Sep 17 00:00:00 2001 From: Amalka Subasinghe Date: Mon, 31 May 2021 14:54:14 +0530 Subject: [PATCH 01/12] add README --- README.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ + From 3bbd7b8b2ebac92db44a58c9aee88b9b30f02aad Mon Sep 17 00:00:00 2001 From: Amalka Subasinghe Date: Mon, 31 May 2021 15:16:11 +0530 Subject: [PATCH 02/12] added iot-core distcribution creation part --- modules/distribution/pom.xml | 71 ++ modules/distribution/src/assembly/bin.xml | 87 ++ .../src/assembly/filter.propeties | 0 .../distribution/src/core/bin/iot-server.bat | 232 +++++ .../distribution/src/core/bin/iot-server.sh | 366 ++++++++ .../src/core/conf/deployment.toml | 319 +++++++ .../src/core/conf/tomcat/context.xml | 75 ++ .../extensions/cookie-policy-content.jsp | 155 ++++ .../extensions/customAssets/logo.svg | 798 ++++++++++++++++++ .../src/core/resources/extensions/header.jsp | 194 +++++ .../extensions/privacy-policy-content.jsp | 292 +++++++ .../resources/extensions/product-title.jsp | 46 + .../src/core/resources/extensions/title.jsp | 23 + .../default/api/_TokenAPI_.xml | 44 + modules/p2-profile/pom.xml | 39 + pom.xml | 352 ++++++++ 16 files changed, 3093 insertions(+) create mode 100644 modules/distribution/pom.xml create mode 100644 modules/distribution/src/assembly/bin.xml create mode 100644 modules/distribution/src/assembly/filter.propeties create mode 100755 modules/distribution/src/core/bin/iot-server.bat create mode 100755 modules/distribution/src/core/bin/iot-server.sh create mode 100644 modules/distribution/src/core/conf/deployment.toml create mode 100644 modules/distribution/src/core/conf/tomcat/context.xml create mode 100644 modules/distribution/src/core/resources/extensions/cookie-policy-content.jsp create mode 100644 modules/distribution/src/core/resources/extensions/customAssets/logo.svg create mode 100644 modules/distribution/src/core/resources/extensions/header.jsp create mode 100644 modules/distribution/src/core/resources/extensions/privacy-policy-content.jsp create mode 100644 modules/distribution/src/core/resources/extensions/product-title.jsp create mode 100644 modules/distribution/src/core/resources/extensions/title.jsp create mode 100644 modules/distribution/src/core/synapse-configs/default/api/_TokenAPI_.xml create mode 100644 modules/p2-profile/pom.xml create mode 100644 pom.xml diff --git a/modules/distribution/pom.xml b/modules/distribution/pom.xml new file mode 100644 index 0000000..21be5b7 --- /dev/null +++ b/modules/distribution/pom.xml @@ -0,0 +1,71 @@ + + + + + + + io.entgra.iot + entgra-iot-server-parent + 4.1.1-SNAPSHOT + ../../pom.xml + + + 4.0.0 + entgra-iot + pom + Entgra IoT - Distribution + Entgra IoT Distribution + + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + 2-dist + package + + single + + + false + UTF-8 + + ${basedir}/src/assembly/filter.properties + + \ + + ${basedir}/src/assembly/bin.xml + + + 0775 + 0775 + 0644 + 0644 + + + + + + + + + diff --git a/modules/distribution/src/assembly/bin.xml b/modules/distribution/src/assembly/bin.xml new file mode 100644 index 0000000..44c436c --- /dev/null +++ b/modules/distribution/src/assembly/bin.xml @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + ]> + + bin + + zip + + false + + + + ../p2-profile/iot-core-profile/target/${wso2am} + ${entgra-iot} + + **/repository/conf/tomcat/context.xml + **/repository/conf/deployment.toml + + + + src/core/synapse-configs/default/api + ${entgra-iot}/repository/deployment/server/synapse-configs/default/api + + + src/core/conf/tomcat + ${entgra-iot}/repository/conf/tomcat + + + src/core/bin + ${entgra-iot}/bin + + + src/core/resources + ${entgra-iot}/repository/deployment/server/webapps/authenticationendpoint + + + src/core/resources + ${entgra-iot}/repository/deployment/server/webapps/accountrecoveryendpoint + + + + + + src/core/conf/deployment.toml + ${entgra-iot}/repository/conf/ + + + + diff --git a/modules/distribution/src/assembly/filter.propeties b/modules/distribution/src/assembly/filter.propeties new file mode 100644 index 0000000..e69de29 diff --git a/modules/distribution/src/core/bin/iot-server.bat b/modules/distribution/src/core/bin/iot-server.bat new file mode 100755 index 0000000..413fc6a --- /dev/null +++ b/modules/distribution/src/core/bin/iot-server.bat @@ -0,0 +1,232 @@ +@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 +setlocal enabledelayedexpansion +rem %~sdp0 is expanded pathname of the current script under NT with spaces in the path removed +if "%CARBON_HOME%"=="" 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 +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). +set originalArgs=%* + +: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 + +if ""%1""==""optimize"" goto profileOptimizer +if ""%1""==""-optimize"" goto profileOptimizer +if ""%1""==""--optimize"" goto profileOptimizer + +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 + +rem ----- profile optimization then start the server--------------------------------- +:profileOptimizer +setlocal enableDelayedExpansion +set found=false +for %%a in (!originalArgs!) do ( + if !found!==true ( + set profile=-Dprofile=%%a + set found=false + ) + if %%a==-Dprofile ( set found=true + ) +) + +for %%a in (!originalArgs!) do ( + if %%a==--skipConfigOptimization ( + set skipConfigOptimizationOption=%%a + goto runProfileSetup + ) + if %%a==-skipConfigOptimization ( + set skipConfigOptimizationOption=%%a + goto runProfileSetup + ) + if %%a==skipConfigOptimization ( + set skipConfigOptimizationOption=%%a + goto runProfileSetup + ) +) + +:runProfileSetup +call bin\profileSetup.bat %profile% %skipConfigOptimizationOption% +endlocal +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 +PATH %PATH%;%JAVA_HOME%\bin\ +for /f tokens^=2-5^ delims^=.-_^" %%j in ('java -fullversion 2^>^&1') do set "JAVA_VERSION=%%j%%k" +if %JAVA_VERSION% LSS 17 goto unknownJdk +if %JAVA_VERSION% GTR 110 goto unknownJdk +goto jdk17 + +:unknownJdk +echo Starting WSO2 Carbon (in unsupported JDK) +echo [ERROR] CARBON is supported only on JDK 1.7, 1.8, 9, 10 and 11 +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% + +if %JAVA_VERSION% GEQ 110 set CARBON_CLASSPATH=".\lib\endorsed\*";%CARBON_CLASSPATH% + +if %JAVA_VERSION% LEQ 18 set JAVA_VER_BASED_OPTS=-Djava.endorsed.dirs=".\lib\endorsed";"%JAVA_HOME%\jre\lib\endorsed";"%JAVA_HOME%\lib\endorsed" +if %JAVA_VERSION% GEQ 110 set JAVA_VER_BASED_OPTS=--add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens java.rmi/sun.rmi.transport=ALL-UNNAMED + +set CMD_LINE_ARGS=-Xbootclasspath/a:%CARBON_XBOOTCLASSPATH% -Xms256m -Xmx1024m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath="%CARBON_HOME%\repository\logs\heap-dump.hprof" +set CMD_LINE_ARGS=%CMD_LINE_ARGS% -Dcom.sun.management.jmxremote -classpath %CARBON_CLASSPATH% %JAVA_OPTS% %JAVA_VER_BASED_OPTS% +set CMD_LINE_ARGS=%CMD_LINE_ARGS% -Dcarbon.registry.root=/ -Dcarbon.home="%CARBON_HOME%" -Dinstance.log="" -Dwso2.server.standalone=true -Djava.command="%JAVA_HOME%\bin\java" +set CMD_LINE_ARGS=%CMD_LINE_ARGS% -Djava.opts="%JAVA_OPTS%" -Djava.io.tmpdir="%CARBON_HOME%\tmp" -Dcatalina.base="%CARBON_HOME%\lib\tomcat" -Dwso2.carbon.xml=%CARBON_HOME%\repository\conf\carbon.xml +set CMD_LINE_ARGS=%CMD_LINE_ARGS% -Dwso2.registry.xml="%CARBON_HOME%\repository\conf\registry.xml" -Dwso2.user.mgt.xml="%CARBON_HOME%\repository\conf\user-mgt.xml" +set CMD_LINE_ARGS=%CMD_LINE_ARGS% -Dwso2.transports.xml="%CARBON_HOME%\repository\conf\mgt-transports.xml" -Djava.util.logging.config.file="%CARBON_HOME%\repository\conf\etc\logging-bridge.properties" +set CMD_LINE_ARGS=%CMD_LINE_ARGS% -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Dcarbon.config.dir.path="%CARBON_HOME%\repository\conf" +set CMD_LINE_ARGS=%CMD_LINE_ARGS% -Dcomponents.repo="%CARBON_HOME%\repository\components" -Dconf.location="%CARBON_HOME%\repository\conf" -Dcom.atomikos.icatch.file="%CARBON_HOME%\lib\transactions.properties" +set CMD_LINE_ARGS=%CMD_LINE_ARGS% -Dcom.atomikos.icatch.hide_init_file_path="true" -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false +set CMD_LINE_ARGS=%CMD_LINE_ARGS% -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -Dcom.sun.jndi.ldap.connect.pool.authentication=simple -Dcom.sun.jndi.ldap.connect.pool.timeout=3000 +set CMD_LINE_ARGS=%CMD_LINE_ARGS% -Dorg.terracotta.quartz.skipUpdateCheck=true -Dcarbon.classpath=%CARBON_CLASSPATH% -Dfile.encoding=UTF8 -DworkerNode=false -Dcarbon.new.config.dir.path="%CARBON_HOME%\repository\resources\conf" +set CMD_LINE_ARGS=%CMD_LINE_ARGS% -Djava.endorsed.dirs=%JAVA_ENDORSED% -Dorg.opensaml.httpclient.https.disableHostnameVerification=true -Dhttpclient.hostnameVerifier="DefaultAndLocalhost" +set CMD_LINE_ARGS=%CMD_LINE_ARGS% -Diot.core.host="localhost" -Diot.core.https.port="9443" -Diot.core.http.port="9763" -Diot.gateway.host="localhost" -Diot.gateway.https.port="8243" -Diot.gateway.http.port="8280" -Diot.gateway.carbon.https.port="9443" -Diot.gateway.carbon.http.port="9763" + +: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/core/bin/iot-server.sh b/modules/distribution/src/core/bin/iot-server.sh new file mode 100755 index 0000000..c569b12 --- /dev/null +++ b/modules/distribution/src/core/bin/iot-server.sh @@ -0,0 +1,366 @@ +#!/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" + elif [ "$c" = "--optimize" ] || [ "$c" = "-optimize" ] || [ "$c" = "optimize" ]; then + for option in $*; do + if [ "$option" = "--skipConfigOptimization" ] || [ "$option" = "-skipConfigOptimization" ] || + [ "$option" = "skipConfigOptimization" ]; then + passedSkipConfigOptimizationOption=true + echo "Passed skipConfigOptimization Option: $passedSkipConfigOptimizationOption" + fi + done + + for profile in $*; do + case "$profile" in + *Dprofile=*) + cd $(dirname "$0") + if [ "$passedSkipConfigOptimizationOption" = true ]; then + sh profileSetup.sh $profile --skipConfigOptimization + else + sh profileSetup.sh $profile + fi + echo "Starting the server..." + ;; + esac + done + 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/iot-server.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/iot-server.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 -------------------- +java_version=$("$JAVACMD" -version 2>&1 | awk -F '"' '/version/ {print $2}') +java_version_formatted=$(echo "$java_version" | awk -F. '{printf("%02d%02d",$1,$2);}') +if [ $java_version_formatted -lt 0107 ] || [ $java_version_formatted -gt 1100 ]; then + echo " Starting WSO2 Carbon (in unsupported JDK)" + echo " [ERROR] CARBON is supported only on JDK 1.7, 1.8, 9, 10 and 11" +fi + +CARBON_XBOOTCLASSPATH="" +for f in "$CARBON_HOME"/lib/xboot/*.jar +do + if [ "$f" != "$CARBON_HOME/lib/xboot/*.jar" ];then + CARBON_XBOOTCLASSPATH="$CARBON_XBOOTCLASSPATH":$f + fi +done + + +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/*.jar +do + CARBON_CLASSPATH="$CARBON_CLASSPATH":$t +done +for t in "$CARBON_HOME"/lib/endorsed/*.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"` + 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" + +#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" + +JAVA_VER_BASED_OPTS="" + + +if [ $java_version_formatted -ge 1100 ]; then + JAVA_VER_BASED_OPTS="--add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens java.rmi/sun.rmi.transport=ALL-UNNAMED" +fi + +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" \ + $JAVA_VER_BASED_OPTS \ + -Djava.io.tmpdir="$CARBON_HOME/tmp" \ + -Dcatalina.base="$CARBON_HOME/lib/tomcat" \ + -Dwso2.server.standalone=true \ + -Dcarbon.registry.root=/ \ + -Djava.command="$JAVACMD" \ + -Dcarbon.home="$CARBON_HOME" \ + -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \ + -Dcarbon.config.dir.path="$CARBON_HOME/repository/conf" \ + -Djava.util.logging.config.file="$CARBON_HOME/repository/conf/etc/logging-bridge.properties" \ + -Dcomponents.repo="$CARBON_HOME/repository/components/plugins" \ + -Dconf.location="$CARBON_HOME/repository/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 \ + -Dorg.opensaml.httpclient.https.disableHostnameVerification=true \ + -Dhttpclient.hostnameVerifier=AllowAll \ + -DworkerNode=false \ + -DenableCorrelationLogs=false \ + -Dcarbon.new.config.dir.path="$CARBON_HOME/repository/resources/conf" \ + -Djavax.xml.xpath.XPathFactory:http://java.sun.com/jaxp/xpath/dom=net.sf.saxon.xpath.XPathFactoryImpl \ + -Diot.core.host="localhost" \ + -Diot.core.https.port="9443" \ + -Diot.core.http.port="9763" \ + -Diot.gateway.host="localhost" \ + -Diot.gateway.https.port="8243" \ + -Diot.gateway.http.port="8280" \ + -Diot.gateway.carbon.https.port="9443" \ + -Diot.gateway.carbon.http.port="9763" \ + org.wso2.carbon.bootstrap.Bootstrap $* + status=$? +done diff --git a/modules/distribution/src/core/conf/deployment.toml b/modules/distribution/src/core/conf/deployment.toml new file mode 100644 index 0000000..49e0ba4 --- /dev/null +++ b/modules/distribution/src/core/conf/deployment.toml @@ -0,0 +1,319 @@ +[server] +hostname = "localhost" +#offset=0 +base_path = "${carbon.protocol}://${carbon.host}:${carbon.management.port}" +#discard_empty_caches = false +server_role = "default" + +[database_configuration] +enable_h2_console = "true" + +[super_admin] +username = "admin" +password = "admin" +create_admin_account = true + +[user_store] +type = "database_unique_id" + +[database.apim_db] +type = "h2" +url = "jdbc:h2:./repository/database/WSO2AM_DB;AUTO_SERVER=TRUE;DB_CLOSE_ON_EXIT=FALSE" +username = "wso2carbon" +password = "wso2carbon" + +[database.shared_db] +type = "h2" +url = "jdbc:h2:./repository/database/WSO2SHARED_DB;DB_CLOSE_ON_EXIT=FALSE" +username = "wso2carbon" +password = "wso2carbon" + +[keystore.tls] +file_name = "wso2carbon.jks" +type = "JKS" +password = "wso2carbon" +alias = "wso2carbon" +key_password = "wso2carbon" + +#[keystore.primary] +#file_name = "wso2carbon.jks" +#type = "JKS" +#password = "wso2carbon" +#alias = "wso2carbon" +#key_password = "wso2carbon" + +#[keystore.internal] +#file_name = "wso2carbon.jks" +#type = "JKS" +#password = "wso2carbon" +#alias = "wso2carbon" +#key_password = "wso2carbon" + +[[apim.gateway.environment]] +name = "Default" +type = "hybrid" +display_in_api_console = true +description = "This is a hybrid gateway that handles both production and sandbox token traffic." +show_as_token_endpoint_url = true +service_url = "https://localhost:${mgt.transport.https.port}/services/" +username= "${admin.username}" +password= "${admin.password}" +ws_endpoint = "ws://localhost:9099" +wss_endpoint = "wss://localhost:8099" +http_endpoint = "http://localhost:${http.nio.port}" +https_endpoint = "https://localhost:${https.nio.port}" +websub_event_receiver_http_endpoint = "http://localhost:9021" +websub_event_receiver_https_endpoint = "https://localhost:8021" + +[apim.sync_runtime_artifacts.gateway] +gateway_labels =["Default"] + +#[apim.cache.gateway_token] +#enable = true +#expiry_time = "900s" + +#[apim.cache.resource] +#enable = true +#expiry_time = "900s" + +#[apim.cache.km_token] +#enable = false +#expiry_time = "15m" + +#[apim.cache.recent_apis] +#enable = false + +#[apim.cache.scopes] +#enable = true + +#[apim.cache.publisher_roles] +#enable = true + +#[apim.cache.jwt_claim] +#enable = true +#expiry_time = "15m" + +#[apim.cache.tags] +#expiry_time = "2m" + +[apim.analytics] +enable = false +config_endpoint = "https://localhost:8080/auth/v1" +auth_token = "" + +#[apim.key_manager] +#service_url = "https://localhost:${mgt.transport.https.port}/services/" +#username = "$ref{super_admin.username}" +#password = "$ref{super_admin.password}" +#pool.init_idle_capacity = 50 +#pool.max_idle = 100 +#key_validation_handler_type = "default" +#key_validation_handler_type = "custom" +#key_validation_handler_impl = "org.wso2.carbon.apimgt.keymgt.handlers.DefaultKeyValidationHandler" + +#[apim.idp] +#server_url = "https://localhost:${mgt.transport.https.port}" +#authorize_endpoint = "https://localhost:${mgt.transport.https.port}/oauth2/authorize" +#oidc_logout_endpoint = "https://localhost:${mgt.transport.https.port}/oidc/logout" +#oidc_check_session_endpoint = "https://localhost:${mgt.transport.https.port}/oidc/checksession" + +#[apim.jwt] +#enable = true +#encoding = "base64" # base64,base64url +#generator_impl = "org.wso2.carbon.apimgt.keymgt.token.JWTGenerator" +#claim_dialect = "http://wso2.org/claims" +#convert_dialect = false +#header = "X-JWT-Assertion" +#signing_algorithm = "SHA256withRSA" +#enable_user_claims = true +#claims_extractor_impl = "org.wso2.carbon.apimgt.impl.token.ExtendedDefaultClaimsRetriever" + +[apim.oauth_config] +# ------------------Enabled for IOT --------------------------- +enable_outbound_auth_header = true +#auth_header = "Authorization" +#revoke_endpoint = "https://localhost:${https.nio.port}/revoke" +#enable_token_encryption = false +#enable_token_hashing = false + +#[apim.devportal] +#url = "https://localhost:${mgt.transport.https.port}/devportal" +#enable_application_sharing = false +#if application_sharing_type, application_sharing_impl both defined priority goes to application_sharing_impl +#application_sharing_type = "default" #changed type, saml, default #todo: check the new config for rest api +#application_sharing_impl = "org.wso2.carbon.apimgt.impl.SAMLGroupIDExtractorImpl" +#display_multiple_versions = false +#display_deprecated_apis = false +#enable_comments = true +#enable_ratings = true +#enable_forum = true +#enable_anonymous_mode=true +#enable_cross_tenant_subscriptions = true +#default_reserved_username = "apim_reserved_user" + +[apim.cors] +allow_origins = "*" +allow_methods = ["GET","PUT","POST","DELETE","PATCH","OPTIONS"] +allow_headers = ["authorization","Access-Control-Allow-Origin","Content-Type","SOAPAction","apikey","Internal-Key"] +allow_credentials = false + +#[apim.throttling] +#enable_data_publishing = true +#enable_policy_deploy = true +#enable_blacklist_condition = true +#enable_persistence = true +#throttle_decision_endpoints = ["tcp://localhost:5672","tcp://localhost:5672"] + +#[apim.throttling.blacklist_condition] +#start_delay = "5m" +#period = "1h" + +#[apim.throttling.jms] +#start_delay = "5m" + +#[apim.throttling.event_sync] +#hostName = "0.0.0.0" +#port = 11224 + +#[apim.throttling.event_management] +#hostName = "0.0.0.0" +#port = 10005 + +#[[apim.throttling.url_group]] +#traffic_manager_urls = ["tcp://localhost:9611","tcp://localhost:9611"] +#traffic_manager_auth_urls = ["ssl://localhost:9711","ssl://localhost:9711"] +#type = "loadbalance" + +#[[apim.throttling.url_group]] +#traffic_manager_urls = ["tcp://localhost:9611","tcp://localhost:9611"] +#traffic_manager_auth_urls = ["ssl://localhost:9711","ssl://localhost:9711"] +#type = "failover" + +#[apim.workflow] +#enable = false +#service_url = "https://localhost:9445/bpmn" +#username = "$ref{super_admin.username}" +#password = "$ref{super_admin.password}" +#callback_endpoint = "https://localhost:${mgt.transport.https.port}/api/am/admin/v0.17/workflows/update-workflow-status" +#token_endpoint = "https://localhost:${https.nio.port}/token" +#client_registration_endpoint = "https://localhost:${mgt.transport.https.port}/client-registration/v0.17/register" +#client_registration_username = "$ref{super_admin.username}" +#client_registration_password = "$ref{super_admin.password}" + +#data bridge config +#[transport.receiver] +#type = "binary" +#worker_threads = 10 +#session_timeout = "30m" +#keystore.file_name = "$ref{keystore.tls.file_name}" +#keystore.password = "$ref{keystore.tls.password}" +#tcp_port = 9611 +#ssl_port = 9711 +#ssl_receiver_thread_pool_size = 100 +#tcp_receiver_thread_pool_size = 100 +#ssl_enabled_protocols = ["TLSv1","TLSv1.1","TLSv1.2"] +#ciphers = ["SSL_RSA_WITH_RC4_128_MD5","SSL_RSA_WITH_RC4_128_SHA"] + +#[apim.notification] +#from_address = "APIM.com" +#username = "APIM" +#password = "APIM+123" +#hostname = "localhost" +#port = 3025 +#enable_start_tls = false +#enable_authentication = true + +#[apim.token.revocation] +#notifier_impl = "org.wso2.carbon.apimgt.keymgt.events.TokenRevocationNotifierImpl" +#enable_realtime_notifier = true +#realtime_notifier.ttl = 5000 +#enable_persistent_notifier = true +#persistent_notifier.hostname = "https://localhost:2379/v2/keys/jti/" +#persistent_notifier.ttl = 5000 +#persistent_notifier.username = "root" +#persistent_notifier.password = "root" + +[[event_handler]] +name="userPostSelfRegistration" +subscriptions=["POST_ADD_USER"] + +[service_provider] +sp_name_regex = "^[\\sa-zA-Z0-9._-]*$" + +[database.local] +url = "jdbc:h2:./repository/database/WSO2CARBON_DB;DB_CLOSE_ON_EXIT=FALSE" + +[[event_listener]] +id = "token_revocation" +type = "org.wso2.carbon.identity.core.handler.AbstractIdentityHandler" +name = "org.wso2.is.notification.ApimOauthEventInterceptor" +order = 1 +[event_listener.properties] +notification_endpoint = "https://localhost:${mgt.transport.https.port}/internal/data/v1/notify" +username = "${admin.username}" +password = "${admin.password}" +'header.X-WSO2-KEY-MANAGER' = "default" + +# ----------------Additionally added IOT----------------------- +[[resource.access_control]] +context="(.*)/api/device-mgt/v1.0/(.*)" +secure="true" +http_method="all" + +[[resource.access_control]] +context="(.*)/api-application-registration/(.*)" +secure="true" +http_method="all" + +[[resource.access_control]] +context="(.*)/api/device-mgt/android/v1.0/(.*)" +secure="true" +http_method="all" + +[[resource.access_control]] +context="(.*)/api/device-mgt/windows/v1.0/(.*)" +secure="true" +http_method="all" + +[[resource.access_control]] +context="(.*)/api/device-mgt/ios/v1.0/(.*)" +secure="true" +http_method="all" + +[[resource.access_control]] +context="(.*)//api/application-mgt-publisher/v1.0/(.*)" +secure="true" +http_method="all" + +#---- below configurations coming from APIM---- +[[resource.access_control]] +context="(.*)/keymanager-operations/user-info/claims(.*)" +secure="true" +http_method="GET" +permissions="/permission/admin/manage/identity/usermgt/list" +scopes="internal_user_mgt_list" + +[[resource.access_control]] +context="(.*)/keymanager-operations/user-info/claims/generate" +secure="true" +http_method="POST" +permissions="/permission/admin/manage/identity/usermgt/list" +scopes="internal_user_mgt_list" + +[[resource.access_control]] +context="(.*)/keymanager-operations/dcr/register" +secure="true" +http_method="POST" +permissions="/permission/admin/manage/identity/applicationmgt/create" +scopes="internal_application_mgt_create" + +[apim.sync_runtime_artifacts.gateway.skip_list] +apis = ["_TokenAPI_.xml", "_API_Application_Registration_.xml", "health-check.xml", "admin--Android-Mutual-SSL-Configuration-Management.xml", "admin--Android-Mutual-SSL-Device-Management.xml", "admin--Android-Mutual-SSL-Event-Receiver.xml", "admin--IOS-Enrollment.xml", "admin--IOS-Enrollment-Authenticate-Agent.xml", "admin--IOS-Enrollment-Profile.xml", "admin--IOS-Enrollment-Profile-DEP.xml", "admin--IOS-Enrollment-Scep.xml", "admin--Windows_8.1_Device_Management_Service.xml", "admin--Windows_8.1_Device_Management_Service_v1.0.0.xml", "admin--Windows_8.1_Enrollment_Service.xml", "admin--Windows_8.1_Enrollment_Service_v1.0.0.xml", "admin--Windows_10_Device_management.xml", "admin--Windows_10_Device_management_v1.0.0.xml", "admin--Windows_10_Enrollment_Service.xml", "admin--Windows_10_Enrollment_Service_v1.0.0.xml", "admin--Windows_Discovery_Service.xml", "admin--Windows_Discovery_Service_v1.0.0.xml", "admin--Windows_Enrollment_policy_Service.xml", "admin--Windows_Enrollment_policy_Service_v1.0.0.xml"] +sequences = ["_api_registration_fault_.xml"] + +[transport.https.properties] +maxHttpHeaderSize="16384" + +[transport.http.properties] +maxHttpHeaderSize="16384" + diff --git a/modules/distribution/src/core/conf/tomcat/context.xml b/modules/distribution/src/core/conf/tomcat/context.xml new file mode 100644 index 0000000..dcca984 --- /dev/null +++ b/modules/distribution/src/core/conf/tomcat/context.xml @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/modules/distribution/src/core/resources/extensions/cookie-policy-content.jsp b/modules/distribution/src/core/resources/extensions/cookie-policy-content.jsp new file mode 100644 index 0000000..a4f3d05 --- /dev/null +++ b/modules/distribution/src/core/resources/extensions/cookie-policy-content.jsp @@ -0,0 +1,155 @@ +<%-- + ~ Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + ~ + ~ WSO2 Inc. licenses this file to you under the Apache License, + ~ Version 2.0 (the "License"); you may not use this file except + ~ in compliance with the License. + ~ You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. +--%> + + +
+
+
+
+
+
+ +
+
+

+ Entgra IoT Server - Cookie Policy +

+
+
+ <%-- Customizable content. Due to this nature, i18n is not implemented for this section --%> +
+

About Entgra IoT Server

+

Entgra 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. + +

It also offers a complete and secure enterprise mobility management (EMM/MDM) solution that aims to address mobile computing challenges faced by enterprises today. Supporting iOS, Android, and Windows devices, it helps organizations deal with both corporate owned, personally enabled (COPE) and employee-owned devices with the bring your own device (BYOD) concept.

+ +

Entgra IoT Server comes with advanced analytics, enabling users to analyze speed, proximity, and geo-fencing information of devices including details of those in motion and stationary state.

+
+ +

IoT Server uses cookies to provide you with the best user experience, and to securely identify you. You might not be able to access some of the services if you disable cookies.

+
+ +

A browser cookie is a small piece of data that is stored on your device to help websites and mobile apps remember things about you. Other technologies, including Web storage and identifiers associated with your device, may be used for similar purposes. In this policy, we use the term “cookies” to discuss all of these technologies.

+
+

How does IoT Sever process cookies ?

+

IoT Server uses cookies to store and retrieve information on your browser. This information is used to provide a better user experience. Some cookies have the primary purpose of allowing logging in to the system, maintaining sessions, and keeping track of activities you do within the login session.

+

Some cookies used in IoT Server are used to identify you personally. However, the cookie lifetime will end when you log-out ending your session or when your session expires.

+

Some cookies are simply used to give you a more personalised web experience, and these cannot be used to identify you or your activities personally.

+

This Cookie Policy is part of the IoT Server Privacy Policy.

+
+

What does IoT use cookies for ?

+

Cookies are used for two purposes in IoT server

+
    +
  1. Security.
  2. +
  3. Providing a better user experience.
  4. +
+
+

IoT Server uses cookies for the following purposes

+

Preferences

+

IoT Server uses cookies to remember your settings and preferences and to auto-fill the fields to make your interactions with the site easier.

+
    +
  • These cannot be used to identify you personally.
  • +
+

Security

+

IoT Server uses selected cookies to identify and prevent security risks.

+

For example, IoT Server may use cookies to store your session information to prevent others from changing your password without your username and password.

+

IoT Server uses session cookie to maintain your active session.

+

IoT Server may use a temporary cookie when performing multi-factor authentication and federated authentication.

+

IoT Server may use permanent cookies to detect the devices you have logged in previously. This is to to calculate the risk level associated with your current login attempt. Using these cookies protects you and your account from possible attacks.

+

Performance

+

IoT Server may use cookies to allow “Remember Me” functionalities.

+
+

Analytics

+

IoT Server as a product does not use cookies for analytical purposes.

+
+

Third party cookies

+

Using IoT Server may cause some third-party cookie being set to your browser. IoT Server has no control over the operation of these cookies. The third-party cookies which maybe set include,

+
    +
  • Any of the social login sites, when IoT Server is configured to use “Social” or “Federated” login, and you opt to do login with your “Social Account”
  • +
  • Any third party federated login
  • +
+

We strongly advise you to refer the respective cookie policies of such sites carefully as IoT Server has no knowledge or use on these cookies.

+
+

What type of cookies does IoT Server use ?

+

IoT Server uses persistent cookies and session cookies. A persistent cookie helps IoT Server to recognize you as an existing user, so you can easily return to WSO2 or interact with IoT Server without signing in again. After you sign in, a persistent cookie stays in your browser and will be read by IoT Server when you return.

+

A session cookie is erased when the user closes the Web browser. It is stored in temporarily and is not retained after the browser is closed. Session cookies do not collect information from the user’s computer.

+
+

How do I control my cookies ?

+

Most browsers allow you to control cookies through settings. However, if you limit the ability of websites to set cookies, you may worsen your overall user experience, since it will no longer be personalized to you. It may also stop you from saving customized settings like login information. Disabling cookies might make you unable to use Authentication and Authorization functionalities offered by IoT Server.

+

If you have any questions or concerns regarding the use of cookies, please contact the Data Protection Officer of the organization running this IoT Server instance.

+
+

What are the cookies used ?

+ + + + + + + + + + + + + + + + + + + + + + + +
+

Cookie Name

+
+

Purpose

+
+

Retention

+
+

JSESSIONID

+
+

Keeps track of the user session data when you are logged in for providing a better user experience.

+
+

Session

+
+

commonAuthId

+
+

Used for authentication the logged in session.

+
+

Session

+
+

samlssoTokenId

+
+

Used for mapping the logged in users with the SAML token.

+
+

Request

+
+
+

Disclaimer

+

This cookie policy is only for illustrative purposes of the IoT Server product. The content in this policy is technically correct at the time of product shipment. The organization which runs this IoT Server instance has the full authority and responsibility of the effective Cookie Policy.

+
+ <%-- /Customizable content --%> +
+
+ +
+
+ diff --git a/modules/distribution/src/core/resources/extensions/customAssets/logo.svg b/modules/distribution/src/core/resources/extensions/customAssets/logo.svg new file mode 100644 index 0000000..7986a8d --- /dev/null +++ b/modules/distribution/src/core/resources/extensions/customAssets/logo.svg @@ -0,0 +1,798 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/modules/distribution/src/core/resources/extensions/header.jsp b/modules/distribution/src/core/resources/extensions/header.jsp new file mode 100644 index 0000000..1aebcff --- /dev/null +++ b/modules/distribution/src/core/resources/extensions/header.jsp @@ -0,0 +1,194 @@ + +<%-- +~ Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. +~ +~ WSO2 Inc. licenses this file to you under the Apache License, +~ Version 2.0 (the "License"); you may not use this file except +~ in compliance with the License. +~ You may obtain a copy of the License at +~ +~ http://www.apache.org/licenses/LICENSE-2.0 +~ +~ Unless required by applicable law or agreed to in writing, +~ software distributed under the License is distributed on an +~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +~ KIND, either express or implied. See the License for the +~ specific language governing permissions and limitations +~ under the License. +--%> + + + +<%@ page import="java.io.File" %> +<%@ page import="java.io.FileReader" %> +<%@ page import="org.json.simple.parser.JSONParser"%> +<%@ page import="org.json.simple.JSONObject"%> +<%@ page import="java.net.URI"%> +<%@ page import="org.apache.commons.lang.StringUtils"%> + +<%@ page import="org.wso2.carbon.identity.application.authentication.endpoint.util.AuthenticationEndpointUtil" %> +<%@ page import="org.wso2.carbon.identity.mgt.endpoint.util.IdentityManagementEndpointUtil" %> + +<% + String tenant = request.getParameter("tenantDomain"); + if (tenant == null) { + String cb = request.getParameter("callback"); + cb = StringUtils.replace(cb, " ", ""); + if (cb != null) { + URI uri = new URI(cb); + String decodedValue = uri.getQuery(); + String[] params = decodedValue.split("&"); + for (String param : params) { + if (param.startsWith("tenantDomain=")) { + String[] keyVal = param.split("="); + tenant = keyVal[1]; + } + } + } + } + + String headerTitle = "IOT Server"; + String pageTitle = "Entgra IOT Server"; + String footerText = "Entgra IOT Server"; + String faviconSrc = "libs/theme/assets/images/favicon.ico"; + String logoSrc = null; + String logoHeight = "50"; + String logoWidth = "50"; + String logoAltText = ""; + File customCSSFile = null; + String customCSS = ""; + String tenantThemeDirectoryName = ""; + boolean showCookiePolicy = true; + boolean showPrivacyPolicy = true; + String cookiePolicyText = null; + String privacyPolicyText = null; + + if (tenant != null) { + String current = new File(".").getCanonicalPath(); + String tenantConfLocation = "/repository/deployment/server/jaggeryapps/devportal/site/public/tenant_themes/"; + tenantThemeDirectoryName = tenant; + String tenantThemeFile = current + tenantConfLocation + tenantThemeDirectoryName + "/login/" + "loginTheme.json"; + customCSS = current + tenantConfLocation + tenantThemeDirectoryName + "/login/css/" + "loginTheme.css"; + File directory = new File(current + tenantConfLocation + tenantThemeDirectoryName); + if (directory != null && directory.exists() && directory.isDirectory()) { + File themeFile = new File(tenantThemeFile); + customCSSFile = new File(customCSS); + if (themeFile != null && themeFile.exists() && themeFile.isFile()) { + FileReader fr = new FileReader(themeFile); + JSONParser parser = new JSONParser(); + Object obj = parser.parse(fr); + JSONObject jsonObject = (JSONObject) obj; + + pageTitle = (String)jsonObject.get("title") != null ? (String)jsonObject.get("title") : "Entgra IOT Server"; + + JSONObject headerThemeObj = (JSONObject)jsonObject.get("header"); + if (headerThemeObj != null) { + headerTitle = (String)(headerThemeObj.get("title")) != null ? (String)(headerThemeObj.get("title")) : "IOT Server"; + } + + JSONObject footerThemeObj = (JSONObject)jsonObject.get("footer"); + if (footerThemeObj != null) { + footerText = (String)(footerThemeObj.get("name")); + } + + JSONObject faviconThemeObj = (JSONObject)jsonObject.get("favicon"); + if (faviconThemeObj != null) { + String fileName = (String)(faviconThemeObj.get("src")); + if (!StringUtils.isEmpty(fileName)) { + faviconSrc = "/devportal/site/public/tenant_themes/" + tenantThemeDirectoryName + "/login/images/" + + fileName; + } + } + + JSONObject logoThemeObj = (JSONObject)jsonObject.get("logo"); + if (logoThemeObj != null) { + String fileName = (String)(logoThemeObj.get("src")); + if (!StringUtils.isEmpty(fileName)) { + logoSrc = "/devportal/site/public/tenant_themes/" + tenantThemeDirectoryName + "/login/images/" + + fileName; + } + logoHeight = (String)(logoThemeObj.get("height")) != null ? (String)(logoThemeObj.get("height")) : logoHeight; + logoWidth = (String)(logoThemeObj.get("width")) != null ? (String)(logoThemeObj.get("width")) : logoWidth; + logoAltText = (String)(logoThemeObj.get("alt")); + } + + JSONObject cookiePolicyThemeObj = (JSONObject)jsonObject.get("cookie-policy"); + if (cookiePolicyThemeObj != null) { + showCookiePolicy = (Boolean)(cookiePolicyThemeObj.get("visible")); + cookiePolicyText = (String)cookiePolicyThemeObj.get("text"); + } + + JSONObject privacyPolicyThemeObj = (JSONObject)jsonObject.get("privacy-policy"); + if (privacyPolicyThemeObj != null) { + showPrivacyPolicy = (Boolean)(privacyPolicyThemeObj.get("visible")); + privacyPolicyText = (String)privacyPolicyThemeObj.get("text"); + } + } + } + } + request.setAttribute("headerTitle", headerTitle); + request.setAttribute("pageTitle", pageTitle); + request.setAttribute("footerText", footerText); + request.setAttribute("faviconSrc", faviconSrc); + request.setAttribute("showCookiePolicy", showCookiePolicy); + request.setAttribute("showPrivacyPolicy", showPrivacyPolicy); + request.setAttribute("cookiePolicyText", cookiePolicyText); + request.setAttribute("privacyPolicyText", privacyPolicyText); + request.setAttribute("logoSrc", logoSrc); + request.setAttribute("logoHeight", logoHeight); + request.setAttribute("logoWidth", logoWidth); + request.setAttribute("logoAltText", logoAltText); + + if (customCSSFile != null && customCSSFile.exists() && customCSSFile.isFile()) { + String cssRelativePath = "/devportal/site/public/tenant_themes/" + tenantThemeDirectoryName + "/login/css/" + "loginTheme.css"; + request.setAttribute("customCSS", cssRelativePath); + } else { + request.setAttribute("customCSS", ""); + } + +%> + + + + + + + + + +<%=request.getAttribute("pageTitle")%> + +<% + String cssPath = request.getAttribute("customCSS") + ""; + if (!StringUtils.isEmpty(cssPath)) { +%> + rel="stylesheet" type="text/css"> +<% } +%> + + diff --git a/modules/distribution/src/core/resources/extensions/privacy-policy-content.jsp b/modules/distribution/src/core/resources/extensions/privacy-policy-content.jsp new file mode 100644 index 0000000..762228c --- /dev/null +++ b/modules/distribution/src/core/resources/extensions/privacy-policy-content.jsp @@ -0,0 +1,292 @@ +<%-- + ~ Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + ~ + ~ WSO2 Inc. licenses this file to you under the Apache License, + ~ Version 2.0 (the "License"); you may not use this file except + ~ in compliance with the License. + ~ You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. +--%> + + +
+
+
+
+
+
+ +
+
+

+ Entgra IOT Server - Privacy Policy +

+
+
+ <%-- Customizable content. Due to this nature, i18n is not implemented for this section --%> +
+

About Entgra IOT Server

+

Entgra 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.

+

It also offers a complete and secure Enterprise Mobility Management + (EMM/MDM) solution that aims to address mobile computing challenges + faced by enterprises today. Supporting iOS, Android, and Windows + devices, it helps organizations deal with both Corporate Owned, + Personally Enabled (COPE) and employee-owned devices with the Bring + Your Own Device (BYOD) concept.

+

Entgra IoT Server comes with advanced analytics, enabling users to + analyze speed, proximity, and geo-fencing information of devices + including details of those in motion and stationary state.

+
+

Privacy Policy

+

This policy describes how Entgra IoT Server 4.0.0 captures your + personal information, the purposes of collection, and information + about the retention of your personal information.

+

Please note that this policy is for reference only, and is applicable + for the software as a product. Entgra and its developers have no + access to the information held within Entgra IoT Server 4.0.0.Please + see the Disclaimer section for more information. Entities, + organisations or individuals controlling the use and administration of + Entgra IoT Server 4.0.0 should create their own privacy policies + setting out the manner in which data is controlled or processed by the + respective entity, organisation or individual.

+
+

What are the personal information ?

+

Entgra IoT Server 4.0.0 considers anything related to you and by which + you may be identified as your personal information.

+ Signing in to Entgra IoT Server +
    +
  1. + Your user name (except in cases where the user name created by your + employer is under contract) +
  2. +
  3. IP address used to log in
  4. +
  5. Email address
  6. +
+ Enrolling a device with Entgra IoT Server +
    +
  • + Your device ID (e.g., phone or tablet), mobile number, IMEI number, + and IMSI number +
  • +
  • Your device's location
  • +
  • Your device's application list, and memory usage
  • +
  • + Your device's usage statistics, such as RAM, battery level, + connected hotspot details, and memory usage +
  • +
+

However, Entgra IoT Server 4.0.0 also collects the following + information that is not considered personal information, but is used + only for statistical purposes. The reason for this + is that this information can not be used to track you.

+ +
    +
  • City/Country from which you originated the TCP/IP connection
  • +
  • + Time of the day that you logged in (year, month, week, hour or + minute) +
  • +
  • + Type of device that you used to log in (e.g., phone or tablet) +
  • +
  • Operating system and generic browser information
  • +
+ +
+

Collection of your information

+

Entgra IoT Server collects your information only to serve your + access requirements.

+

For example,

+
    +
  • + Entgra IoT Server uses your IP address to detect any + suspicious login attempts to your account. +
  • +
  • + Entgra IoT Server uses attributes like your first name, last + name, etc., to provide a rich and personalized user experience. +
  • +
  • + Entgra IoT Server uses your security questions and answers + only to allow account recovery. +
  • +
+
+

Tracking Technologies

+

Entgra IoT Server collects your information by:

+
    +
  • + Collecting information from the user profile page where you enter + your personal data. +
  • +
  • + Tracking your IP address with HTTP request, HTTP headers, and + TCP/IP. +
  • +
  • Tracking your geographic information with the IP address.
  • +
  • + Tracking your login history with browser cookies. Please see our + cookie policy for more information. +
  • +
+ +
+

Use of your personal information

+

Entgra IoT Server 4.0.0 will only use your personal information for + the purposes for which it was collected (or for a use identified as + consistent with that purpose).

+

Entgra IoT Server 4.0.0 uses your personal information only for the + following purposes.

+
    +
  • + To provide you with a personalized user experience. Entgra IoT + Server 4.0.0 uses your name and uploaded profile pictures for this + purpose. +
  • +
  • + To protect your account from unauthorized access or potential + hacking attempts. Entgra IoT Server 4.0.0 uses HTTP or TCP/IP + Headers for this purpose. +
  • +
  • + This includes: +
      +
    1. IP address
    2. +
    3. Browser fingerprinting
    4. +
    5. Cookies
    6. +
    +
  • +
  • + Derive statistical data for analytical purposes on system + performance improvements. Entgra IoT Server 4.0.0 will not keep any + personal information after statistical calculations. Therefore, the + statistical report has no means of identifying an individual person. +
  • +
  • + Entgra IoT Server 4.0.0 may use: +
      +
    1. IP Address to derive geographic information
    2. +
    3. + Browser fingerprinting to determine the browser technology + or/and version +
    4. +
    +
  • +
+
+

Disclosure of your personal information

+

Entgra IoT Server 4.0.0 only discloses personal information to the + relevant applications (also known as “Service Providers”) that are + registered with Entgra IoT Server 4.0.0. These applications are + registered by the identity administrator of your entity or + organization. Personal information is disclosed only for the purposes + for which it was collected (or for a use identified as consistent with + that purpose) as controlled by such Service Providers, unless you have + consented otherwise or where it is required by law.

+
+ +

Please note that the organisation, entity or individual running Entgra + IoT Server 4.0.0 may be compelled to disclose your personal + information with or without your consent when it is required by law + following due and lawful process.

+
+

Storage of personal information

+
+

Where your personal information is stored

+

Entgra IoT Server 4.0.0 stores your personal information in secured + databases. Entgra IoT Server 4.0.0 exercises proper industry accepted + security measures to protect the database where your personal + information is held.Entgra IoT Server 4.0.0 as a product does not + transfer or share your data with any third parties or locations.

+

Entgra IoT Server 4.0.0 may use encryption to keep your personal data + with an added level of security.

+
+

How long your personal information is retaineds ?

+

Entgra IoT Server 4.0.0 retains your personal data as long as you are + an active user of our system. You can update your personal data at any + time using the given self-care user portals.

+

Entgra IoT Server 4.0.0 may keep hashed secrets to provide you with an + added level of security. This includes:

+
    +
  • Current password
  • +
  • Previously used passwords
  • +
+
+

How can you request a removal of your personal information ?

+

You can request the administrator to delete your account. The + administrator is the administrator of the tenant you are registered + under, or the super-administrator if you do not use the tenant + feature.

+

Additionally, you can request to anonymize all traces of your + activities that Entgra IoT Server 4.0.0 may have retained in logs, + databases or analytical storage.

+
+

More Information

+
+

Changes to this policy

+

Upgraded versions of Entgra IoT Server 4.0.0 may contain changes to + this policy. Revisions to this policy will be packaged within such + upgrades and would only apply to users who choose to use upgraded + versions.

+ +
+

Your choices

+

+ If you are already have an user account within Entgra IoT Server 4.0.0 + ; you have the right to deactivate your account if you find that this + privacy policy is unacceptable to you. +

+

+ If you do not have an account and you do not agree with our privacy + policy, you can chose not to create one. +

+
+

Contact us

+

Please contact Entgra if you have any question or concerns regarding + this privacy policy.

+

contact

+
+

Disclaimer

+

+ Entgra, its employees, partners, and affiliates do not have access to + and do not require, store, process or control any of the data, + including personal data contained in Entgra IoT Server 4.0.0. All + data, including personal data is controlled and processed by the + entity or individual running Entgra IoT Server 4.0.0. Entgra, its + employees partners and affiliates are not a data processor or a data + controller within the meaning of any data privacy regulations. Entgra + does not provide any warranties or undertake any responsibility or + liability in connection with the lawfulness or the manner and purposes + for which Entgra IoT Server 4.0.0 is used by such entities or persons. +

+

+ This privacy policy is for the informational purposes of the entity or + persons running Entgra IoT Server 4.0.0 and sets out the processes and + functionality contained within Entgra IoT Server 4.0.0 regarding + personal data protection. It is the responsibility of entities and + persons running Entgra IoT Server 4.0.0 to create and administer its + own rules and processes governing users’ personal data, Please note + that the creation of such rules and processes may change the use, + storage and disclosure policies contained herein. Therefore users + should consult the entity or persons running Entgra IoT Server 4.0.0 + for its own privacy policy for details governing users’ personal data. +

+
+ <%-- /Customizable content --%> +
+
+ +
+
+ diff --git a/modules/distribution/src/core/resources/extensions/product-title.jsp b/modules/distribution/src/core/resources/extensions/product-title.jsp new file mode 100644 index 0000000..5a14a40 --- /dev/null +++ b/modules/distribution/src/core/resources/extensions/product-title.jsp @@ -0,0 +1,46 @@ +<%-- + ~ Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + ~ + ~ WSO2 Inc. licenses this file to you under the Apache License, + ~ Version 2.0 (the "License"); you may not use this file except + ~ in compliance with the License. + ~ You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. +--%> + + + +<%@ page import="org.apache.commons.lang.StringUtils"%> + +<% if ("IOT Server".equals(request.getAttribute("headerTitle"))) { %> +
+ +

IOT Server

+
+<% } else { + + String logoSrc = (String)request.getAttribute("logoSrc"); + String logoHeight = (String)request.getAttribute("logoHeight"); + String logoWidth = (String)request.getAttribute("logoWidth"); + String logoAltText = (String)request.getAttribute("logoAltText"); + if (!StringUtils.isEmpty(logoSrc)) { +%> +
+ alt=<%=logoAltText%> height=<%=logoHeight%> width=<%=logoWidth%>> +
+<% } else { %> +
+

<%=request.getAttribute("headerTitle")%>

+
+<% } %> +<% } %> diff --git a/modules/distribution/src/core/resources/extensions/title.jsp b/modules/distribution/src/core/resources/extensions/title.jsp new file mode 100644 index 0000000..574086b --- /dev/null +++ b/modules/distribution/src/core/resources/extensions/title.jsp @@ -0,0 +1,23 @@ + +<%-- + ~ Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + ~ + ~ WSO2 Inc. licenses this file to you under the Apache License, + ~ Version 2.0 (the "License"); you may not use this file except + ~ in compliance with the License. + ~ You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. +--%> + + + + +WSO2 IOT Server diff --git a/modules/distribution/src/core/synapse-configs/default/api/_TokenAPI_.xml b/modules/distribution/src/core/synapse-configs/default/api/_TokenAPI_.xml new file mode 100644 index 0000000..d4dd08a --- /dev/null +++ b/modules/distribution/src/core/synapse-configs/default/api/_TokenAPI_.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + $1 + refresh_token + + + + + + +
+ + + + + + + + + + 60000 + fault + + + + + + + + + + + + + + diff --git a/modules/p2-profile/pom.xml b/modules/p2-profile/pom.xml new file mode 100644 index 0000000..9ddcb1b --- /dev/null +++ b/modules/p2-profile/pom.xml @@ -0,0 +1,39 @@ + + + + + + + io.entgra.iot + entgra-iot-server-parent + 4.1.1-SNAPSHOT + ../../pom.xml + + + 4.0.0 + entgra-iot-p2-profile + pom + Entgra IoT - P2 Profile Module + http://entgra.io + + + iot-core-profile + + + diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..d764b74 --- /dev/null +++ b/pom.xml @@ -0,0 +1,352 @@ + + + + + + 4.0.0 + io.entgra.iot + entgra-iot-server-parent + pom + 4.1.1-SNAPSHOT + Entgra IoT - Parent + http://entgra.io + Entgra IoT Server + + + org.wso2 + wso2 + 2 + + + + modules/p2-profile + modules/distribution + + + + + + + org.wso2.carbon.devicemgt + org.wso2.carbon.device.mgt.core + ${carbon.device.mgt.version} + + + org.wso2.carbon.devicemgt + org.wso2.carbon.device.mgt.common + ${carbon.device.mgt.version} + + + org.wso2.carbon.devicemgt + org.wso2.carbon.device.mgt.group.core + ${carbon.device.mgt.version} + + + org.wso2.carbon.devicemgt + org.wso2.carbon.device.mgt.group.common + ${carbon.device.mgt.version} + + + org.wso2.carbon.devicemgt + org.wso2.carbon.policy.mgt.common + ${carbon.device.mgt.version} + + + org.wso2.carbon.devicemgt + org.wso2.carbon.policy.mgt.core + ${carbon.device.mgt.version} + + + org.wso2.carbon.devicemgt + org.wso2.carbon.certificate.mgt.core + ${carbon.device.mgt.version} + + + org.wso2.carbon.devicemgt + org.wso2.carbon.identity.jwt.client.extension + ${carbon.device.mgt.version} + + + + + com.h2database.wso2 + h2-database-engine + ${orbit.h2.engine.version} + + + + + + + + wso2am-4.0.0 + entgra-iot-${project.version} + + + 4.1.16-SNAPSHOT + + 5.1.2 + + + 1.2.140.wso2v3 + + + + + https://gitlab.com/entgra/product-iots.git + scm:git:https://gitlab.com/entgra/product-iots.git + scm:git:https://gitlab.com/entgra/product-iots.git + HEAD + + + + + + org.apache.maven.wagon + wagon-ssh + 2.1 + + + + + + org.jvnet.maven.incrementalbuild + incremental-build-plugin + 1.3 + + + + incremental-build + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.3.1 + + UTF-8 + 1.8 + 1.8 + + + + org.apache.maven.plugins + maven-release-plugin + + clean install + true + + + + org.apache.maven.plugins + maven-deploy-plugin + + + + + + org.apache.felix + maven-scr-plugin + 1.7.2 + + + generate-scr-scrdescriptor + + scr + + + + + + org.apache.felix + maven-bundle-plugin + 2.3.5 + true + + NONE + + + + + org.apache.maven.plugins + maven-source-plugin + 2.1.2 + + + attach-sources + verify + + jar-no-fork + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.0.0 + + + org.apache.maven.plugins + maven-project-info-reports-plugin + 2.4 + + + org.codehaus.mojo + build-helper-maven-plugin + 1.8 + + + org.apache.maven.plugins + maven-surefire-plugin + 2.18.1 + + + true + + + + + + + + + wso2.releases + WSO2 internal Repository + http://maven.wso2.org/nexus/content/repositories/releases/ + + true + daily + ignore + + + + wso2.snapshots + Apache Snapshot Repository + http://maven.wso2.org/nexus/content/repositories/snapshots/ + + true + daily + + + false + + + + wso2-nexus + WSO2 internal Repository + http://maven.wso2.org/nexus/content/groups/wso2-public/ + + true + daily + ignore + + + + + + + + + wso2-nexus + WSO2 internal Repository + http://maven.wso2.org/nexus/content/groups/wso2-public/ + + true + daily + ignore + + + + wso2.releases + WSO2 internal Repository + http://maven.wso2.org/nexus/content/repositories/releases/ + + true + daily + ignore + + + + wso2.snapshots + WSO2 Snapshot Repository + http://maven.wso2.org/nexus/content/repositories/snapshots/ + + true + daily + + + false + + + + entgra-nexus + Entgra internal Repository + http://nexus.entgra.io/repository/maven-public/ + + true + daily + ignore + + + + entgra.snapshots + Entgra Snapshot Repository + http://nexus.entgra.io/repository/maven-snapshots/ + + true + daily + + + false + + + + entgra.releases + Entgra internal Repository + http://nexus.entgra.io/repository/maven-releases/ + + true + daily + ignore + + + false + + + + + + maven-snapshots + http://nexus.entgra.io/repository/maven-snapshots/ + + + maven-release + http://nexus.entgra.io/repository/maven-releases/ + + + From 7bc32f05445c9dfca5f02254e814c26ecc8b27c2 Mon Sep 17 00:00:00 2001 From: Amalka Subasinghe Date: Mon, 7 Jun 2021 16:00:57 +0530 Subject: [PATCH 03/12] iot-core and iot-community product artifacts --- modules/distribution/iot-community/pom.xml | 171 ++++++++ .../iot-community/src/assembly/bin.xml | 63 +++ .../src/assembly/filter.properties} | 0 .../distribution/iot-community/src/temp.txt | 0 modules/distribution/iot-core/pom.xml | 71 ++++ .../{ => iot-core}/src/assembly/bin.xml | 2 +- .../iot-core/src/assembly/filter.propeties | 0 .../src/core/bin/iot-server.bat | 0 .../{ => iot-core}/src/core/bin/iot-server.sh | 0 .../src/core/conf/deployment.toml | 0 .../src/core/conf/tomcat/context.xml | 0 .../extensions/cookie-policy-content.jsp | 0 .../extensions/customAssets/logo.svg | 0 .../src/core/resources/extensions/header.jsp | 0 .../extensions/privacy-policy-content.jsp | 0 .../resources/extensions/product-title.jsp | 0 .../src/core/resources/extensions/title.jsp | 0 .../default/api/_TokenAPI_.xml | 0 modules/distribution/pom.xml | 52 +-- modules/p2-profile/iot-core-profile/pom.xml | 378 ++++++++++++++++++ modules/p2-profile/pom.xml | 8 +- pom.xml | 19 +- 22 files changed, 712 insertions(+), 52 deletions(-) create mode 100644 modules/distribution/iot-community/pom.xml create mode 100644 modules/distribution/iot-community/src/assembly/bin.xml rename modules/distribution/{src/assembly/filter.propeties => iot-community/src/assembly/filter.properties} (100%) create mode 100644 modules/distribution/iot-community/src/temp.txt create mode 100644 modules/distribution/iot-core/pom.xml rename modules/distribution/{ => iot-core}/src/assembly/bin.xml (97%) create mode 100644 modules/distribution/iot-core/src/assembly/filter.propeties rename modules/distribution/{ => iot-core}/src/core/bin/iot-server.bat (100%) rename modules/distribution/{ => iot-core}/src/core/bin/iot-server.sh (100%) rename modules/distribution/{ => iot-core}/src/core/conf/deployment.toml (100%) rename modules/distribution/{ => iot-core}/src/core/conf/tomcat/context.xml (100%) rename modules/distribution/{ => iot-core}/src/core/resources/extensions/cookie-policy-content.jsp (100%) rename modules/distribution/{ => iot-core}/src/core/resources/extensions/customAssets/logo.svg (100%) rename modules/distribution/{ => iot-core}/src/core/resources/extensions/header.jsp (100%) rename modules/distribution/{ => iot-core}/src/core/resources/extensions/privacy-policy-content.jsp (100%) rename modules/distribution/{ => iot-core}/src/core/resources/extensions/product-title.jsp (100%) rename modules/distribution/{ => iot-core}/src/core/resources/extensions/title.jsp (100%) rename modules/distribution/{ => iot-core}/src/core/synapse-configs/default/api/_TokenAPI_.xml (100%) create mode 100644 modules/p2-profile/iot-core-profile/pom.xml diff --git a/modules/distribution/iot-community/pom.xml b/modules/distribution/iot-community/pom.xml new file mode 100644 index 0000000..83905df --- /dev/null +++ b/modules/distribution/iot-community/pom.xml @@ -0,0 +1,171 @@ + + + + + + + io.entgra.community + entgra-iot-distribution + 5.0.0-SNAPSHOT + ../pom.xml + + + 4.0.0 + entgra-iot-community + pom + Entgra IoT - Community Distribution + Entgra IoT Community Distribution + + + + + org.apache.maven.plugins + maven-dependency-plugin + false + + + 1-unpack-entgra-iots + test + + unpack + + + + + io.entgra.community + entgra-iot + zip + true + target + + + + + + + + org.wso2.maven + carbon-p2-plugin + ${carbon.p2.plugin.version} + + + 2-p2-repo-generation + package + + p2-repo-gen + + + file:${basedir}/target/p2-repo + file:${basedir}/target/p2-repo + true + true + + + org.wso2.carbon.devicemgt-plugins:org.wso2.carbon.device.mgt.adapter.feature:${carbon.device.mgt.plugin.version} + + + org.wso2.carbon.devicemgt-plugins:org.wso2.carbon.device.mgt.notification.listener.feature:${carbon.device.mgt.plugin.version} + + + + + + feature-install + package + + p2-profile-gen + + + default + file:${basedir}/target/p2-repo + file:${basedir}/target/p2-repo + ${basedir}/target/${entgra-iot}/repository/components + true + + + org.wso2.carbon.device.mgt.adapter.feature.group + ${carbon.device.mgt.plugin.version} + + + org.wso2.carbon.device.mgt.notification.listener.feature.group + ${carbon.device.mgt.plugin.version} + + + + + + + + com.google.code.maven-replacer-plugin + replacer + 1.5.3 + + + package + + replace + + + + + + ${basedir}/target/${entgra-iot}/repository/components/default/configuration/org.eclipse.equinox.simpleconfigurator/bundles.info + + + + false + true + + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + 2-dist + package + + single + + + false + UTF-8 + + ${basedir}/src/assembly/filter.properties + + \ + + ${basedir}/src/assembly/bin.xml + + + 0775 + 0775 + 0644 + 0644 + + + + + + + + + diff --git a/modules/distribution/iot-community/src/assembly/bin.xml b/modules/distribution/iot-community/src/assembly/bin.xml new file mode 100644 index 0000000..73cf925 --- /dev/null +++ b/modules/distribution/iot-community/src/assembly/bin.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + ]> + + bin + + zip + + false + + + + ${basedir}/target/${entgra-iot} + ${entgra-iot-community} + + + + + + src/temp.txt + ${entgra-iot-community}/ + + + + diff --git a/modules/distribution/src/assembly/filter.propeties b/modules/distribution/iot-community/src/assembly/filter.properties similarity index 100% rename from modules/distribution/src/assembly/filter.propeties rename to modules/distribution/iot-community/src/assembly/filter.properties diff --git a/modules/distribution/iot-community/src/temp.txt b/modules/distribution/iot-community/src/temp.txt new file mode 100644 index 0000000..e69de29 diff --git a/modules/distribution/iot-core/pom.xml b/modules/distribution/iot-core/pom.xml new file mode 100644 index 0000000..1a5fce8 --- /dev/null +++ b/modules/distribution/iot-core/pom.xml @@ -0,0 +1,71 @@ + + + + + + + io.entgra.community + entgra-iot-distribution + 5.0.0-SNAPSHOT + ../pom.xml + + + 4.0.0 + entgra-iot + pom + Entgra IoT Core Distribution + Entgra IoT Core Distribution + + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + 2-dist + package + + single + + + false + UTF-8 + + ${basedir}/src/assembly/filter.properties + + \ + + ${basedir}/src/assembly/bin.xml + + + 0775 + 0775 + 0644 + 0644 + + + + + + + + + diff --git a/modules/distribution/src/assembly/bin.xml b/modules/distribution/iot-core/src/assembly/bin.xml similarity index 97% rename from modules/distribution/src/assembly/bin.xml rename to modules/distribution/iot-core/src/assembly/bin.xml index 44c436c..3b509d0 100644 --- a/modules/distribution/src/assembly/bin.xml +++ b/modules/distribution/iot-core/src/assembly/bin.xml @@ -48,7 +48,7 @@ - ../p2-profile/iot-core-profile/target/${wso2am} + ../../p2-profile/iot-core-profile/target/${wso2am} ${entgra-iot} **/repository/conf/tomcat/context.xml diff --git a/modules/distribution/iot-core/src/assembly/filter.propeties b/modules/distribution/iot-core/src/assembly/filter.propeties new file mode 100644 index 0000000..e69de29 diff --git a/modules/distribution/src/core/bin/iot-server.bat b/modules/distribution/iot-core/src/core/bin/iot-server.bat similarity index 100% rename from modules/distribution/src/core/bin/iot-server.bat rename to modules/distribution/iot-core/src/core/bin/iot-server.bat diff --git a/modules/distribution/src/core/bin/iot-server.sh b/modules/distribution/iot-core/src/core/bin/iot-server.sh similarity index 100% rename from modules/distribution/src/core/bin/iot-server.sh rename to modules/distribution/iot-core/src/core/bin/iot-server.sh diff --git a/modules/distribution/src/core/conf/deployment.toml b/modules/distribution/iot-core/src/core/conf/deployment.toml similarity index 100% rename from modules/distribution/src/core/conf/deployment.toml rename to modules/distribution/iot-core/src/core/conf/deployment.toml diff --git a/modules/distribution/src/core/conf/tomcat/context.xml b/modules/distribution/iot-core/src/core/conf/tomcat/context.xml similarity index 100% rename from modules/distribution/src/core/conf/tomcat/context.xml rename to modules/distribution/iot-core/src/core/conf/tomcat/context.xml diff --git a/modules/distribution/src/core/resources/extensions/cookie-policy-content.jsp b/modules/distribution/iot-core/src/core/resources/extensions/cookie-policy-content.jsp similarity index 100% rename from modules/distribution/src/core/resources/extensions/cookie-policy-content.jsp rename to modules/distribution/iot-core/src/core/resources/extensions/cookie-policy-content.jsp diff --git a/modules/distribution/src/core/resources/extensions/customAssets/logo.svg b/modules/distribution/iot-core/src/core/resources/extensions/customAssets/logo.svg similarity index 100% rename from modules/distribution/src/core/resources/extensions/customAssets/logo.svg rename to modules/distribution/iot-core/src/core/resources/extensions/customAssets/logo.svg diff --git a/modules/distribution/src/core/resources/extensions/header.jsp b/modules/distribution/iot-core/src/core/resources/extensions/header.jsp similarity index 100% rename from modules/distribution/src/core/resources/extensions/header.jsp rename to modules/distribution/iot-core/src/core/resources/extensions/header.jsp diff --git a/modules/distribution/src/core/resources/extensions/privacy-policy-content.jsp b/modules/distribution/iot-core/src/core/resources/extensions/privacy-policy-content.jsp similarity index 100% rename from modules/distribution/src/core/resources/extensions/privacy-policy-content.jsp rename to modules/distribution/iot-core/src/core/resources/extensions/privacy-policy-content.jsp diff --git a/modules/distribution/src/core/resources/extensions/product-title.jsp b/modules/distribution/iot-core/src/core/resources/extensions/product-title.jsp similarity index 100% rename from modules/distribution/src/core/resources/extensions/product-title.jsp rename to modules/distribution/iot-core/src/core/resources/extensions/product-title.jsp diff --git a/modules/distribution/src/core/resources/extensions/title.jsp b/modules/distribution/iot-core/src/core/resources/extensions/title.jsp similarity index 100% rename from modules/distribution/src/core/resources/extensions/title.jsp rename to modules/distribution/iot-core/src/core/resources/extensions/title.jsp diff --git a/modules/distribution/src/core/synapse-configs/default/api/_TokenAPI_.xml b/modules/distribution/iot-core/src/core/synapse-configs/default/api/_TokenAPI_.xml similarity index 100% rename from modules/distribution/src/core/synapse-configs/default/api/_TokenAPI_.xml rename to modules/distribution/iot-core/src/core/synapse-configs/default/api/_TokenAPI_.xml diff --git a/modules/distribution/pom.xml b/modules/distribution/pom.xml index 21be5b7..ef959e9 100644 --- a/modules/distribution/pom.xml +++ b/modules/distribution/pom.xml @@ -20,52 +20,20 @@ - io.entgra.iot - entgra-iot-server-parent - 4.1.1-SNAPSHOT + io.entgra.community + community-parent + 5.0.0-SNAPSHOT ../../pom.xml 4.0.0 - entgra-iot + entgra-iot-distribution pom - Entgra IoT - Distribution - Entgra IoT Distribution - - - - - - org.apache.maven.plugins - maven-assembly-plugin - - - 2-dist - package - - single - - - false - UTF-8 - - ${basedir}/src/assembly/filter.properties - - \ - - ${basedir}/src/assembly/bin.xml - - - 0775 - 0775 - 0644 - 0644 - - - - - - - + Entgra IoT - Distribution Module + Entgra IoT Distribution Module + + iot-core + iot-community + diff --git a/modules/p2-profile/iot-core-profile/pom.xml b/modules/p2-profile/iot-core-profile/pom.xml new file mode 100644 index 0000000..ec89b2d --- /dev/null +++ b/modules/p2-profile/iot-core-profile/pom.xml @@ -0,0 +1,378 @@ + + + + + + + io.entgra.community + p2-profile + 5.0.0-SNAPSHOT + ../pom.xml + + + 4.0.0 + iot-core-p2-profile + Entgra IoT - Core P2 Profile Gen + pom + + + + com.h2database.wso2 + h2-database-engine + + + + + + + org.apache.maven.plugins + maven-antrun-plugin + + + create-solution + process-resources + + run + + + + + + + + + + create-device-mgt-schema + install + + run + + + + + + + + + + + + + + + + + + + + + + + create-certificate-mgt-schema + install + + run + + + + + + + + + + + + + + + + + + + + + + + + + org.wso2.maven + carbon-p2-plugin + ${carbon.p2.plugin.version} + + + 2-p2-repo-generation + package + + p2-repo-gen + + + file:${basedir}/target/p2-repo + file:${basedir}/target/p2-repo + true + true + + + + + org.wso2.carbon.devicemgt:org.wso2.carbon.device.mgt.feature:${carbon.device.mgt.version} + + + org.wso2.carbon.devicemgt:org.wso2.carbon.device.mgt.extensions.feature:${carbon.device.mgt.version} + + + org.wso2.carbon.devicemgt:org.wso2.carbon.policy.mgt.server.feature:${carbon.device.mgt.version} + + + org.wso2.carbon.devicemgt:org.wso2.carbon.certificate.mgt.api.feature:${carbon.device.mgt.version} + + + org.wso2.carbon.devicemgt:org.wso2.carbon.certificate.mgt.cert.admin.api.feature:${carbon.device.mgt.version} + + + org.wso2.carbon.devicemgt:org.wso2.carbon.certificate.mgt.server.feature:${carbon.device.mgt.version} + + + org.wso2.carbon.devicemgt:org.wso2.carbon.apimgt.webapp.publisher.feature:${carbon.device.mgt.version} + + + org.wso2.carbon.devicemgt:org.wso2.carbon.identity.jwt.client.extension.feature:${carbon.device.mgt.version} + + + org.wso2.carbon.devicemgt:org.wso2.carbon.webapp.authenticator.framework.server.feature:${carbon.device.mgt.version} + + + org.wso2.carbon.devicemgt:org.wso2.carbon.apimgt.application.extension.feature:${carbon.device.mgt.version} + + + org.wso2.carbon.devicemgt:org.wso2.carbon.email.sender.feature:${carbon.device.mgt.version} + + + io.entgra.devicemgt:io.entgra.ui.request.interceptor.feature:${carbon.device.mgt.version} + + + org.wso2.carbon.devicemgt:org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature:${carbon.device.mgt.version} + + + org.wso2.carbon.devicemgt:org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature:${carbon.device.mgt.version} + + + org.wso2.carbon.devicemgt:org.wso2.carbon.device.mgt.extensions.push.notification.provider.http.feature:${carbon.device.mgt.version} + + + org.wso2.carbon.devicemgt:org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.feature:${carbon.device.mgt.version} + + + org.wso2.carbon.devicemgt:org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature:${carbon.device.mgt.version} + + + org.wso2.carbon.devicemgt:io.entgra.server.heart.beat.feature:${carbon.device.mgt.version} + + + + + + org.wso2.carbon.devicemgt:io.entgra.transport.mgt.sms.handler.server.feature:${carbon.device.mgt.version} + + + org.wso2.carbon.devicemgt:io.entgra.transport.mgt.sms.handler.api.feature:${carbon.device.mgt.version} + + + + + + org.wso2.carbon.devicemgt:org.wso2.carbon.device.application.mgt.api.feature:${carbon.device.mgt.version} + + + org.wso2.carbon.devicemgt:org.wso2.carbon.device.application.mgt.server.feature:${carbon.device.mgt.version} + + + + + + + feature-install + package + + p2-profile-gen + + + default + file:${basedir}/target/p2-repo + file:${basedir}/target/p2-repo + ${basedir}/target/${wso2am}/repository/components + true + + + + org.wso2.carbon.device.mgt.feature.group + ${carbon.device.mgt.version} + + + org.wso2.carbon.device.mgt.extensions.feature.group + ${carbon.device.mgt.version} + + + + + org.wso2.carbon.device.application.mgt.api.feature.group + ${carbon.device.mgt.version} + + + org.wso2.carbon.device.application.mgt.server.feature.group + ${carbon.device.mgt.version} + + + + + + io.entgra.transport.mgt.sms.handler.server.feature.group + ${carbon.device.mgt.version} + + + io.entgra.transport.mgt.sms.handler.api.feature.group + ${carbon.device.mgt.version} + + + + + + org.wso2.carbon.email.sender.feature.group + ${carbon.device.mgt.version} + + + + + org.wso2.carbon.apimgt.application.extension.feature.group + ${carbon.device.mgt.version} + + + org.wso2.carbon.apimgt.webapp.publisher.feature.group + ${carbon.device.mgt.version} + + + + + org.wso2.carbon.certificate.mgt.server.feature.group + ${carbon.device.mgt.version} + + + org.wso2.carbon.certificate.mgt.api.feature.group + ${carbon.device.mgt.version} + + + org.wso2.carbon.certificate.mgt.cert.admin.api.feature.group + ${carbon.device.mgt.version} + + + + + org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature.group + ${carbon.device.mgt.version} + + + org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature.group + ${carbon.device.mgt.version} + + + org.wso2.carbon.device.mgt.extensions.push.notification.provider.http.feature.group + ${carbon.device.mgt.version} + + + org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.feature.group + ${carbon.device.mgt.version} + + + org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature.group + ${carbon.device.mgt.version} + + + + + io.entgra.server.heart.beat.feature.group + ${carbon.device.mgt.version} + + + + + org.wso2.carbon.identity.jwt.client.extension.feature.group + ${carbon.device.mgt.version} + + + + + org.wso2.carbon.policy.mgt.server.feature.group + ${carbon.device.mgt.version} + + + + + io.entgra.ui.request.interceptor.feature.group + ${carbon.device.mgt.version} + + + + + org.wso2.carbon.webapp.authenticator.framework.server.feature.group + ${carbon.device.mgt.version} + + + + + + + + + + com.google.code.maven-replacer-plugin + replacer + 1.5.3 + + + package + + replace + + + + + + ${basedir}/target/${wso2am}/repository/components/default/configuration/org.eclipse.equinox.simpleconfigurator/bundles.info + + + + false + true + + + + + + + org.apache.maven.plugins + maven-deploy-plugin + + true + + + + + + + diff --git a/modules/p2-profile/pom.xml b/modules/p2-profile/pom.xml index 9ddcb1b..8376f59 100644 --- a/modules/p2-profile/pom.xml +++ b/modules/p2-profile/pom.xml @@ -20,14 +20,14 @@ - io.entgra.iot - entgra-iot-server-parent - 4.1.1-SNAPSHOT + io.entgra.community + community-parent + 5.0.0-SNAPSHOT ../../pom.xml 4.0.0 - entgra-iot-p2-profile + p2-profile pom Entgra IoT - P2 Profile Module http://entgra.io diff --git a/pom.xml b/pom.xml index d764b74..d115ee6 100644 --- a/pom.xml +++ b/pom.xml @@ -20,13 +20,13 @@ 4.0.0 - io.entgra.iot - entgra-iot-server-parent + io.entgra.community + community-parent pom - 4.1.1-SNAPSHOT - Entgra IoT - Parent + 5.0.0-SNAPSHOT + Entgra Community Product - Parent http://entgra.io - Entgra IoT Server + Entgra Community Product org.wso2 @@ -90,6 +90,11 @@ ${orbit.h2.engine.version} + + io.entgra.community + entgra-iot + ${project.version} + @@ -97,6 +102,7 @@ wso2am-4.0.0 entgra-iot-${project.version} + entgra-iot-community-${project.version} 4.1.16-SNAPSHOT @@ -106,6 +112,9 @@ 1.2.140.wso2v3 + 5.0.16-SNAPSHOT + + From 14037f4f888ac4e48201e9b1885bd020ae961ff4 Mon Sep 17 00:00:00 2001 From: Amalka Subasinghe Date: Mon, 7 Jun 2021 18:41:31 +0530 Subject: [PATCH 04/12] added fileMode --- modules/distribution/iot-core/src/assembly/bin.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/distribution/iot-core/src/assembly/bin.xml b/modules/distribution/iot-core/src/assembly/bin.xml index 3b509d0..bdc3dd5 100644 --- a/modules/distribution/iot-core/src/assembly/bin.xml +++ b/modules/distribution/iot-core/src/assembly/bin.xml @@ -66,6 +66,7 @@ src/core/bin ${entgra-iot}/bin + 755 src/core/resources From 1426eb4283e0e2cc358b8707c4c6e814d5b3ebbf Mon Sep 17 00:00:00 2001 From: Amalka Subasinghe Date: Tue, 8 Jun 2021 12:43:48 +0530 Subject: [PATCH 05/12] updated cdm versions --- modules/distribution/iot-community/pom.xml | 2 +- modules/distribution/iot-core/pom.xml | 2 +- modules/distribution/pom.xml | 2 +- pom.xml | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/distribution/iot-community/pom.xml b/modules/distribution/iot-community/pom.xml index 83905df..9c3abd8 100644 --- a/modules/distribution/iot-community/pom.xml +++ b/modules/distribution/iot-community/pom.xml @@ -21,7 +21,7 @@ io.entgra.community - entgra-iot-distribution + distribution 5.0.0-SNAPSHOT ../pom.xml diff --git a/modules/distribution/iot-core/pom.xml b/modules/distribution/iot-core/pom.xml index 1a5fce8..c40c7e4 100644 --- a/modules/distribution/iot-core/pom.xml +++ b/modules/distribution/iot-core/pom.xml @@ -21,7 +21,7 @@ io.entgra.community - entgra-iot-distribution + distribution 5.0.0-SNAPSHOT ../pom.xml diff --git a/modules/distribution/pom.xml b/modules/distribution/pom.xml index ef959e9..2335528 100644 --- a/modules/distribution/pom.xml +++ b/modules/distribution/pom.xml @@ -27,7 +27,7 @@ 4.0.0 - entgra-iot-distribution + distribution pom Entgra IoT - Distribution Module Entgra IoT Distribution Module diff --git a/pom.xml b/pom.xml index d115ee6..df83ed4 100644 --- a/pom.xml +++ b/pom.xml @@ -105,14 +105,14 @@ entgra-iot-community-${project.version} - 4.1.16-SNAPSHOT + 5.0.0-SNAPSHOT 5.1.2 1.2.140.wso2v3 - 5.0.16-SNAPSHOT + 6.0.0-SNAPSHOT From bc4cf55720aafb7662a83df1f98374200011e944 Mon Sep 17 00:00:00 2001 From: Amalka Subasinghe Date: Thu, 10 Jun 2021 07:35:48 +0530 Subject: [PATCH 06/12] updated iot and emm community packs --- distribution/emm-community/pom.xml | 70 ++++ .../emm-community/src/assembly/bin.xml | 66 ++++ .../src/assembly/filter.properties | 0 .../emm-community/src}/conf/deployment.toml | 53 ++- .../iot-community}/pom.xml | 5 +- .../iot-community/src/assembly/bin.xml | 2 +- .../src/assembly/filter.properties | 0 .../iot-community/src/temp.txt | 0 distribution/iot-community/target/.plxarc | 1 + .../META-INF/DEPENDENCIES | 11 + .../META-INF/LICENSE | 202 ++++++++++++ .../META-INF/NOTICE | 8 + distribution/iot-community/target/timestamp | Bin 0 -> 242 bytes .../distribution => distribution}/pom.xml | 4 +- distribution/target/.plxarc | 1 + .../META-INF/DEPENDENCIES | 11 + .../META-INF/LICENSE | 202 ++++++++++++ .../META-INF/NOTICE | 8 + distribution/target/timestamp | Bin 0 -> 228 bytes .../iot-core-profile => iot-core}/pom.xml | 43 ++- .../src/assembly/bin.xml | 16 +- iot-core/src/assembly/filter.propeties | 0 .../src/core/bin/iot-server.bat | 0 .../src/core/bin/iot-server.sh | 0 iot-core/src/core/conf/deployment.toml | 304 ++++++++++++++++++ .../src/core/conf/tomcat/context.xml | 0 .../extensions/cookie-policy-content.jsp | 0 .../extensions/customAssets/logo.svg | 0 .../src/core/resources/extensions/header.jsp | 0 .../extensions/privacy-policy-content.jsp | 0 .../resources/extensions/product-title.jsp | 0 .../src/core/resources/extensions/title.jsp | 0 .../default/api/_TokenAPI_.xml | 0 p2-profile/emm/pom.xml | 141 ++++++++ .../iot-community => p2-profile/iot}/pom.xml | 45 +-- {modules/p2-profile => p2-profile}/pom.xml | 5 +- p2-profile/target/.plxarc | 1 + .../META-INF/DEPENDENCIES | 11 + .../META-INF/LICENSE | 202 ++++++++++++ .../META-INF/NOTICE | 8 + p2-profile/target/timestamp | Bin 0 -> 226 bytes pom.xml | 12 +- 42 files changed, 1329 insertions(+), 103 deletions(-) create mode 100644 distribution/emm-community/pom.xml create mode 100644 distribution/emm-community/src/assembly/bin.xml rename {modules/distribution/iot-community => distribution/emm-community}/src/assembly/filter.properties (100%) rename {modules/distribution/iot-core/src/core => distribution/emm-community/src}/conf/deployment.toml (85%) rename {modules/distribution/iot-core => distribution/iot-community}/pom.xml (96%) rename {modules/distribution => distribution}/iot-community/src/assembly/bin.xml (96%) rename modules/distribution/iot-community/src/temp.txt => distribution/iot-community/src/assembly/filter.properties (100%) rename modules/distribution/iot-core/src/assembly/filter.propeties => distribution/iot-community/src/temp.txt (100%) create mode 100644 distribution/iot-community/target/.plxarc create mode 100644 distribution/iot-community/target/maven-shared-archive-resources/META-INF/DEPENDENCIES create mode 100644 distribution/iot-community/target/maven-shared-archive-resources/META-INF/LICENSE create mode 100644 distribution/iot-community/target/maven-shared-archive-resources/META-INF/NOTICE create mode 100644 distribution/iot-community/target/timestamp rename {modules/distribution => distribution}/pom.xml (94%) create mode 100644 distribution/target/.plxarc create mode 100644 distribution/target/maven-shared-archive-resources/META-INF/DEPENDENCIES create mode 100644 distribution/target/maven-shared-archive-resources/META-INF/LICENSE create mode 100644 distribution/target/maven-shared-archive-resources/META-INF/NOTICE create mode 100644 distribution/target/timestamp rename {modules/p2-profile/iot-core-profile => iot-core}/pom.xml (92%) rename {modules/distribution/iot-core => iot-core}/src/assembly/bin.xml (78%) create mode 100644 iot-core/src/assembly/filter.propeties rename {modules/distribution/iot-core => iot-core}/src/core/bin/iot-server.bat (100%) rename {modules/distribution/iot-core => iot-core}/src/core/bin/iot-server.sh (100%) create mode 100644 iot-core/src/core/conf/deployment.toml rename {modules/distribution/iot-core => iot-core}/src/core/conf/tomcat/context.xml (100%) rename {modules/distribution/iot-core => iot-core}/src/core/resources/extensions/cookie-policy-content.jsp (100%) rename {modules/distribution/iot-core => iot-core}/src/core/resources/extensions/customAssets/logo.svg (100%) rename {modules/distribution/iot-core => iot-core}/src/core/resources/extensions/header.jsp (100%) rename {modules/distribution/iot-core => iot-core}/src/core/resources/extensions/privacy-policy-content.jsp (100%) rename {modules/distribution/iot-core => iot-core}/src/core/resources/extensions/product-title.jsp (100%) rename {modules/distribution/iot-core => iot-core}/src/core/resources/extensions/title.jsp (100%) rename {modules/distribution/iot-core => iot-core}/src/core/synapse-configs/default/api/_TokenAPI_.xml (100%) create mode 100644 p2-profile/emm/pom.xml rename {modules/distribution/iot-community => p2-profile/iot}/pom.xml (76%) rename {modules/p2-profile => p2-profile}/pom.xml (92%) create mode 100644 p2-profile/target/.plxarc create mode 100644 p2-profile/target/maven-shared-archive-resources/META-INF/DEPENDENCIES create mode 100644 p2-profile/target/maven-shared-archive-resources/META-INF/LICENSE create mode 100644 p2-profile/target/maven-shared-archive-resources/META-INF/NOTICE create mode 100644 p2-profile/target/timestamp diff --git a/distribution/emm-community/pom.xml b/distribution/emm-community/pom.xml new file mode 100644 index 0000000..9e63888 --- /dev/null +++ b/distribution/emm-community/pom.xml @@ -0,0 +1,70 @@ + + + + + + + io.entgra.community + distribution + 5.0.0-SNAPSHOT + ../pom.xml + + + 4.0.0 + entgra-emm + pom + Entgra EMM - Community Distribution + Entgra EMM Community Distribution + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + 2-dist + package + + single + + + false + UTF-8 + + ${basedir}/src/assembly/filter.properties + + \ + + ${basedir}/src/assembly/bin.xml + + + 0775 + 0775 + 0644 + 0644 + + + + + + + + + diff --git a/distribution/emm-community/src/assembly/bin.xml b/distribution/emm-community/src/assembly/bin.xml new file mode 100644 index 0000000..204d8b7 --- /dev/null +++ b/distribution/emm-community/src/assembly/bin.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + ]> + + bin + + zip + + false + + + + ../../p2-profile/emm/target/${entgra-iot-core} + ${entgra-emm-community} + + **/repository/conf/deployment.toml + + + + + + + src/conf/deployment.toml + ${entgra-emm-community}/repository/conf/ + + + + diff --git a/modules/distribution/iot-community/src/assembly/filter.properties b/distribution/emm-community/src/assembly/filter.properties similarity index 100% rename from modules/distribution/iot-community/src/assembly/filter.properties rename to distribution/emm-community/src/assembly/filter.properties diff --git a/modules/distribution/iot-core/src/core/conf/deployment.toml b/distribution/emm-community/src/conf/deployment.toml similarity index 85% rename from modules/distribution/iot-core/src/core/conf/deployment.toml rename to distribution/emm-community/src/conf/deployment.toml index 49e0ba4..fac3b8a 100644 --- a/modules/distribution/iot-core/src/core/conf/deployment.toml +++ b/distribution/emm-community/src/conf/deployment.toml @@ -129,7 +129,7 @@ auth_token = "" #claims_extractor_impl = "org.wso2.carbon.apimgt.impl.token.ExtendedDefaultClaimsRetriever" [apim.oauth_config] -# ------------------Enabled for IOT --------------------------- +# ------------------Enabled for IOT/EMM --------------------------- enable_outbound_auth_header = true #auth_header = "Authorization" #revoke_endpoint = "https://localhost:${https.nio.port}/revoke" @@ -254,38 +254,7 @@ username = "${admin.username}" password = "${admin.password}" 'header.X-WSO2-KEY-MANAGER' = "default" -# ----------------Additionally added IOT----------------------- -[[resource.access_control]] -context="(.*)/api/device-mgt/v1.0/(.*)" -secure="true" -http_method="all" - -[[resource.access_control]] -context="(.*)/api-application-registration/(.*)" -secure="true" -http_method="all" - -[[resource.access_control]] -context="(.*)/api/device-mgt/android/v1.0/(.*)" -secure="true" -http_method="all" - -[[resource.access_control]] -context="(.*)/api/device-mgt/windows/v1.0/(.*)" -secure="true" -http_method="all" - -[[resource.access_control]] -context="(.*)/api/device-mgt/ios/v1.0/(.*)" -secure="true" -http_method="all" - -[[resource.access_control]] -context="(.*)//api/application-mgt-publisher/v1.0/(.*)" -secure="true" -http_method="all" - -#---- below configurations coming from APIM---- +#------------- Adding below configurations which are coming from APIM, to avoid replacing by IOT/EMM configurations ---- [[resource.access_control]] context="(.*)/keymanager-operations/user-info/claims(.*)" secure="true" @@ -307,8 +276,24 @@ http_method="POST" permissions="/permission/admin/manage/identity/applicationmgt/create" scopes="internal_application_mgt_create" +# ----------------Required for IOT/EMM----------------------- +[[resource.access_control]] +context="(.*)/api/device-mgt/v1.0/(.*)" +secure="true" +http_method="all" + +[[resource.access_control]] +context="(.*)/api-application-registration/(.*)" +secure="true" +http_method="all" + +[[resource.access_control]] +context="(.*)/api/application-mgt-publisher/v1.0/(.*)" +secure="true" +http_method="all" + [apim.sync_runtime_artifacts.gateway.skip_list] -apis = ["_TokenAPI_.xml", "_API_Application_Registration_.xml", "health-check.xml", "admin--Android-Mutual-SSL-Configuration-Management.xml", "admin--Android-Mutual-SSL-Device-Management.xml", "admin--Android-Mutual-SSL-Event-Receiver.xml", "admin--IOS-Enrollment.xml", "admin--IOS-Enrollment-Authenticate-Agent.xml", "admin--IOS-Enrollment-Profile.xml", "admin--IOS-Enrollment-Profile-DEP.xml", "admin--IOS-Enrollment-Scep.xml", "admin--Windows_8.1_Device_Management_Service.xml", "admin--Windows_8.1_Device_Management_Service_v1.0.0.xml", "admin--Windows_8.1_Enrollment_Service.xml", "admin--Windows_8.1_Enrollment_Service_v1.0.0.xml", "admin--Windows_10_Device_management.xml", "admin--Windows_10_Device_management_v1.0.0.xml", "admin--Windows_10_Enrollment_Service.xml", "admin--Windows_10_Enrollment_Service_v1.0.0.xml", "admin--Windows_Discovery_Service.xml", "admin--Windows_Discovery_Service_v1.0.0.xml", "admin--Windows_Enrollment_policy_Service.xml", "admin--Windows_Enrollment_policy_Service_v1.0.0.xml"] +apis = ["_TokenAPI_.xml", "_API_Application_Registration_.xml", "admin--Android-Mutual-SSL-Configuration-Management.xml", "admin--Android-Mutual-SSL-Device-Management.xml", "admin--Android-Mutual-SSL-Event-Receiver.xml"] sequences = ["_api_registration_fault_.xml"] [transport.https.properties] diff --git a/modules/distribution/iot-core/pom.xml b/distribution/iot-community/pom.xml similarity index 96% rename from modules/distribution/iot-core/pom.xml rename to distribution/iot-community/pom.xml index c40c7e4..2048390 100644 --- a/modules/distribution/iot-core/pom.xml +++ b/distribution/iot-community/pom.xml @@ -29,12 +29,11 @@ 4.0.0 entgra-iot pom - Entgra IoT Core Distribution - Entgra IoT Core Distribution + Entgra IoT - Community Distribution + Entgra IoT Community Distribution - org.apache.maven.plugins maven-assembly-plugin diff --git a/modules/distribution/iot-community/src/assembly/bin.xml b/distribution/iot-community/src/assembly/bin.xml similarity index 96% rename from modules/distribution/iot-community/src/assembly/bin.xml rename to distribution/iot-community/src/assembly/bin.xml index 73cf925..aaef702 100644 --- a/modules/distribution/iot-community/src/assembly/bin.xml +++ b/distribution/iot-community/src/assembly/bin.xml @@ -48,7 +48,7 @@ - ${basedir}/target/${entgra-iot} + ../../p2-profile/iot/target/${entgra-iot-core} ${entgra-iot-community} diff --git a/modules/distribution/iot-community/src/temp.txt b/distribution/iot-community/src/assembly/filter.properties similarity index 100% rename from modules/distribution/iot-community/src/temp.txt rename to distribution/iot-community/src/assembly/filter.properties diff --git a/modules/distribution/iot-core/src/assembly/filter.propeties b/distribution/iot-community/src/temp.txt similarity index 100% rename from modules/distribution/iot-core/src/assembly/filter.propeties rename to distribution/iot-community/src/temp.txt diff --git a/distribution/iot-community/target/.plxarc b/distribution/iot-community/target/.plxarc new file mode 100644 index 0000000..67ea6ee --- /dev/null +++ b/distribution/iot-community/target/.plxarc @@ -0,0 +1 @@ +maven-shared-archive-resources \ No newline at end of file diff --git a/distribution/iot-community/target/maven-shared-archive-resources/META-INF/DEPENDENCIES b/distribution/iot-community/target/maven-shared-archive-resources/META-INF/DEPENDENCIES new file mode 100644 index 0000000..d2ec0aa --- /dev/null +++ b/distribution/iot-community/target/maven-shared-archive-resources/META-INF/DEPENDENCIES @@ -0,0 +1,11 @@ +// ------------------------------------------------------------------ +// Transitive dependencies of this project determined from the +// maven pom organized by organization. +// ------------------------------------------------------------------ + +Entgra IoT - Community Distribution + + + + + diff --git a/distribution/iot-community/target/maven-shared-archive-resources/META-INF/LICENSE b/distribution/iot-community/target/maven-shared-archive-resources/META-INF/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/distribution/iot-community/target/maven-shared-archive-resources/META-INF/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/distribution/iot-community/target/maven-shared-archive-resources/META-INF/NOTICE b/distribution/iot-community/target/maven-shared-archive-resources/META-INF/NOTICE new file mode 100644 index 0000000..1074455 --- /dev/null +++ b/distribution/iot-community/target/maven-shared-archive-resources/META-INF/NOTICE @@ -0,0 +1,8 @@ + +Entgra IoT - Community Distribution +Copyright 2021 WSO2 + +This product includes software developed at +The Apache Software Foundation (http://www.apache.org/). + + diff --git a/distribution/iot-community/target/timestamp b/distribution/iot-community/target/timestamp new file mode 100644 index 0000000000000000000000000000000000000000..6c6cd42567dfdb5b94406d2cc2da23de7546ad59 GIT binary patch literal 242 zcmZ4UmVvdnh(Rzbu`E%qv?Mb}&m*xo!#A;jmHpPi!(s^+nHiYe7`Srs6I0w0lS}f8 zJQ+AkGKx}*GxBp%Dhli!7(jrhoC8P-05M|;gTH=8er~FMVs2ticA|c2UP*dUqJD9H zX;E^jesX?pZfRa-Nu_QQhERY literal 0 HcmV?d00001 diff --git a/modules/distribution/pom.xml b/distribution/pom.xml similarity index 94% rename from modules/distribution/pom.xml rename to distribution/pom.xml index 2335528..41e00d0 100644 --- a/modules/distribution/pom.xml +++ b/distribution/pom.xml @@ -23,7 +23,7 @@ io.entgra.community community-parent 5.0.0-SNAPSHOT - ../../pom.xml + ../pom.xml 4.0.0 @@ -33,7 +33,7 @@ Entgra IoT Distribution Module - iot-core iot-community + emm-community diff --git a/distribution/target/.plxarc b/distribution/target/.plxarc new file mode 100644 index 0000000..67ea6ee --- /dev/null +++ b/distribution/target/.plxarc @@ -0,0 +1 @@ +maven-shared-archive-resources \ No newline at end of file diff --git a/distribution/target/maven-shared-archive-resources/META-INF/DEPENDENCIES b/distribution/target/maven-shared-archive-resources/META-INF/DEPENDENCIES new file mode 100644 index 0000000..cedd1cd --- /dev/null +++ b/distribution/target/maven-shared-archive-resources/META-INF/DEPENDENCIES @@ -0,0 +1,11 @@ +// ------------------------------------------------------------------ +// Transitive dependencies of this project determined from the +// maven pom organized by organization. +// ------------------------------------------------------------------ + +Entgra IoT - Distribution Module + + + + + diff --git a/distribution/target/maven-shared-archive-resources/META-INF/LICENSE b/distribution/target/maven-shared-archive-resources/META-INF/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/distribution/target/maven-shared-archive-resources/META-INF/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/distribution/target/maven-shared-archive-resources/META-INF/NOTICE b/distribution/target/maven-shared-archive-resources/META-INF/NOTICE new file mode 100644 index 0000000..89b84fa --- /dev/null +++ b/distribution/target/maven-shared-archive-resources/META-INF/NOTICE @@ -0,0 +1,8 @@ + +Entgra IoT - Distribution Module +Copyright 2021 WSO2 + +This product includes software developed at +The Apache Software Foundation (http://www.apache.org/). + + diff --git a/distribution/target/timestamp b/distribution/target/timestamp new file mode 100644 index 0000000000000000000000000000000000000000..5ff0782e4d7a8c3bf8b28821b81aafc3219355f0 GIT binary patch literal 228 zcmZ4UmVvdnh(Rzbu`E%qv?Mb}&m*xo!#A;jmHpPi!(s^+nHiYe7`Srs6I0w0lS}f8 zJQ+AkGKx}*GxBp%Dhli!7(jrhoC8P-05M|;gQI>%er~FMVs2ticA|c2UP*dUqJD9H zX;E^jesX?pZfRa-Nu_Q io.entgra.community - p2-profile + community-parent 5.0.0-SNAPSHOT ../pom.xml 4.0.0 - iot-core-p2-profile - Entgra IoT - Core P2 Profile Gen + entgra-iot-core + Entgra IoT Core distribution pom @@ -57,7 +57,7 @@ - + create-device-mgt-schema install @@ -83,7 +83,7 @@ - + create-certificate-mgt-schema install @@ -363,15 +363,36 @@ - org.apache.maven.plugins - maven-deploy-plugin - - true - + maven-assembly-plugin + + + 2-dist + install + + single + + + false + UTF-8 + + ${basedir}/src/assembly/filter.properties + + \ + + ${basedir}/src/assembly/bin.xml + + + 0775 + 0775 + 0644 + 0644 + + + + - diff --git a/modules/distribution/iot-core/src/assembly/bin.xml b/iot-core/src/assembly/bin.xml similarity index 78% rename from modules/distribution/iot-core/src/assembly/bin.xml rename to iot-core/src/assembly/bin.xml index bdc3dd5..d8c350c 100644 --- a/modules/distribution/iot-core/src/assembly/bin.xml +++ b/iot-core/src/assembly/bin.xml @@ -48,8 +48,8 @@ - ../../p2-profile/iot-core-profile/target/${wso2am} - ${entgra-iot} + ${basedir}/target/${wso2am} + ${entgra-iot-core} **/repository/conf/tomcat/context.xml **/repository/conf/deployment.toml @@ -57,31 +57,31 @@ src/core/synapse-configs/default/api - ${entgra-iot}/repository/deployment/server/synapse-configs/default/api + ${entgra-iot-core}/repository/deployment/server/synapse-configs/default/api src/core/conf/tomcat - ${entgra-iot}/repository/conf/tomcat + ${entgra-iot-core}/repository/conf/tomcat src/core/bin - ${entgra-iot}/bin + ${entgra-iot-core}/bin 755 src/core/resources - ${entgra-iot}/repository/deployment/server/webapps/authenticationendpoint + ${entgra-iot-core}/repository/deployment/server/webapps/authenticationendpoint src/core/resources - ${entgra-iot}/repository/deployment/server/webapps/accountrecoveryendpoint + ${entgra-iot-core}/repository/deployment/server/webapps/accountrecoveryendpoint src/core/conf/deployment.toml - ${entgra-iot}/repository/conf/ + ${entgra-iot-core}/repository/conf/ diff --git a/iot-core/src/assembly/filter.propeties b/iot-core/src/assembly/filter.propeties new file mode 100644 index 0000000..e69de29 diff --git a/modules/distribution/iot-core/src/core/bin/iot-server.bat b/iot-core/src/core/bin/iot-server.bat similarity index 100% rename from modules/distribution/iot-core/src/core/bin/iot-server.bat rename to iot-core/src/core/bin/iot-server.bat diff --git a/modules/distribution/iot-core/src/core/bin/iot-server.sh b/iot-core/src/core/bin/iot-server.sh similarity index 100% rename from modules/distribution/iot-core/src/core/bin/iot-server.sh rename to iot-core/src/core/bin/iot-server.sh diff --git a/iot-core/src/core/conf/deployment.toml b/iot-core/src/core/conf/deployment.toml new file mode 100644 index 0000000..a4c16d7 --- /dev/null +++ b/iot-core/src/core/conf/deployment.toml @@ -0,0 +1,304 @@ +[server] +hostname = "localhost" +#offset=0 +base_path = "${carbon.protocol}://${carbon.host}:${carbon.management.port}" +#discard_empty_caches = false +server_role = "default" + +[database_configuration] +enable_h2_console = "true" + +[super_admin] +username = "admin" +password = "admin" +create_admin_account = true + +[user_store] +type = "database_unique_id" + +[database.apim_db] +type = "h2" +url = "jdbc:h2:./repository/database/WSO2AM_DB;AUTO_SERVER=TRUE;DB_CLOSE_ON_EXIT=FALSE" +username = "wso2carbon" +password = "wso2carbon" + +[database.shared_db] +type = "h2" +url = "jdbc:h2:./repository/database/WSO2SHARED_DB;DB_CLOSE_ON_EXIT=FALSE" +username = "wso2carbon" +password = "wso2carbon" + +[keystore.tls] +file_name = "wso2carbon.jks" +type = "JKS" +password = "wso2carbon" +alias = "wso2carbon" +key_password = "wso2carbon" + +#[keystore.primary] +#file_name = "wso2carbon.jks" +#type = "JKS" +#password = "wso2carbon" +#alias = "wso2carbon" +#key_password = "wso2carbon" + +#[keystore.internal] +#file_name = "wso2carbon.jks" +#type = "JKS" +#password = "wso2carbon" +#alias = "wso2carbon" +#key_password = "wso2carbon" + +[[apim.gateway.environment]] +name = "Default" +type = "hybrid" +display_in_api_console = true +description = "This is a hybrid gateway that handles both production and sandbox token traffic." +show_as_token_endpoint_url = true +service_url = "https://localhost:${mgt.transport.https.port}/services/" +username= "${admin.username}" +password= "${admin.password}" +ws_endpoint = "ws://localhost:9099" +wss_endpoint = "wss://localhost:8099" +http_endpoint = "http://localhost:${http.nio.port}" +https_endpoint = "https://localhost:${https.nio.port}" +websub_event_receiver_http_endpoint = "http://localhost:9021" +websub_event_receiver_https_endpoint = "https://localhost:8021" + +[apim.sync_runtime_artifacts.gateway] +gateway_labels =["Default"] + +#[apim.cache.gateway_token] +#enable = true +#expiry_time = "900s" + +#[apim.cache.resource] +#enable = true +#expiry_time = "900s" + +#[apim.cache.km_token] +#enable = false +#expiry_time = "15m" + +#[apim.cache.recent_apis] +#enable = false + +#[apim.cache.scopes] +#enable = true + +#[apim.cache.publisher_roles] +#enable = true + +#[apim.cache.jwt_claim] +#enable = true +#expiry_time = "15m" + +#[apim.cache.tags] +#expiry_time = "2m" + +[apim.analytics] +enable = false +config_endpoint = "https://localhost:8080/auth/v1" +auth_token = "" + +#[apim.key_manager] +#service_url = "https://localhost:${mgt.transport.https.port}/services/" +#username = "$ref{super_admin.username}" +#password = "$ref{super_admin.password}" +#pool.init_idle_capacity = 50 +#pool.max_idle = 100 +#key_validation_handler_type = "default" +#key_validation_handler_type = "custom" +#key_validation_handler_impl = "org.wso2.carbon.apimgt.keymgt.handlers.DefaultKeyValidationHandler" + +#[apim.idp] +#server_url = "https://localhost:${mgt.transport.https.port}" +#authorize_endpoint = "https://localhost:${mgt.transport.https.port}/oauth2/authorize" +#oidc_logout_endpoint = "https://localhost:${mgt.transport.https.port}/oidc/logout" +#oidc_check_session_endpoint = "https://localhost:${mgt.transport.https.port}/oidc/checksession" + +#[apim.jwt] +#enable = true +#encoding = "base64" # base64,base64url +#generator_impl = "org.wso2.carbon.apimgt.keymgt.token.JWTGenerator" +#claim_dialect = "http://wso2.org/claims" +#convert_dialect = false +#header = "X-JWT-Assertion" +#signing_algorithm = "SHA256withRSA" +#enable_user_claims = true +#claims_extractor_impl = "org.wso2.carbon.apimgt.impl.token.ExtendedDefaultClaimsRetriever" + +[apim.oauth_config] +# ------------------Enabled for IOT/EMM --------------------------- +enable_outbound_auth_header = true +#auth_header = "Authorization" +#revoke_endpoint = "https://localhost:${https.nio.port}/revoke" +#enable_token_encryption = false +#enable_token_hashing = false + +#[apim.devportal] +#url = "https://localhost:${mgt.transport.https.port}/devportal" +#enable_application_sharing = false +#if application_sharing_type, application_sharing_impl both defined priority goes to application_sharing_impl +#application_sharing_type = "default" #changed type, saml, default #todo: check the new config for rest api +#application_sharing_impl = "org.wso2.carbon.apimgt.impl.SAMLGroupIDExtractorImpl" +#display_multiple_versions = false +#display_deprecated_apis = false +#enable_comments = true +#enable_ratings = true +#enable_forum = true +#enable_anonymous_mode=true +#enable_cross_tenant_subscriptions = true +#default_reserved_username = "apim_reserved_user" + +[apim.cors] +allow_origins = "*" +allow_methods = ["GET","PUT","POST","DELETE","PATCH","OPTIONS"] +allow_headers = ["authorization","Access-Control-Allow-Origin","Content-Type","SOAPAction","apikey","Internal-Key"] +allow_credentials = false + +#[apim.throttling] +#enable_data_publishing = true +#enable_policy_deploy = true +#enable_blacklist_condition = true +#enable_persistence = true +#throttle_decision_endpoints = ["tcp://localhost:5672","tcp://localhost:5672"] + +#[apim.throttling.blacklist_condition] +#start_delay = "5m" +#period = "1h" + +#[apim.throttling.jms] +#start_delay = "5m" + +#[apim.throttling.event_sync] +#hostName = "0.0.0.0" +#port = 11224 + +#[apim.throttling.event_management] +#hostName = "0.0.0.0" +#port = 10005 + +#[[apim.throttling.url_group]] +#traffic_manager_urls = ["tcp://localhost:9611","tcp://localhost:9611"] +#traffic_manager_auth_urls = ["ssl://localhost:9711","ssl://localhost:9711"] +#type = "loadbalance" + +#[[apim.throttling.url_group]] +#traffic_manager_urls = ["tcp://localhost:9611","tcp://localhost:9611"] +#traffic_manager_auth_urls = ["ssl://localhost:9711","ssl://localhost:9711"] +#type = "failover" + +#[apim.workflow] +#enable = false +#service_url = "https://localhost:9445/bpmn" +#username = "$ref{super_admin.username}" +#password = "$ref{super_admin.password}" +#callback_endpoint = "https://localhost:${mgt.transport.https.port}/api/am/admin/v0.17/workflows/update-workflow-status" +#token_endpoint = "https://localhost:${https.nio.port}/token" +#client_registration_endpoint = "https://localhost:${mgt.transport.https.port}/client-registration/v0.17/register" +#client_registration_username = "$ref{super_admin.username}" +#client_registration_password = "$ref{super_admin.password}" + +#data bridge config +#[transport.receiver] +#type = "binary" +#worker_threads = 10 +#session_timeout = "30m" +#keystore.file_name = "$ref{keystore.tls.file_name}" +#keystore.password = "$ref{keystore.tls.password}" +#tcp_port = 9611 +#ssl_port = 9711 +#ssl_receiver_thread_pool_size = 100 +#tcp_receiver_thread_pool_size = 100 +#ssl_enabled_protocols = ["TLSv1","TLSv1.1","TLSv1.2"] +#ciphers = ["SSL_RSA_WITH_RC4_128_MD5","SSL_RSA_WITH_RC4_128_SHA"] + +#[apim.notification] +#from_address = "APIM.com" +#username = "APIM" +#password = "APIM+123" +#hostname = "localhost" +#port = 3025 +#enable_start_tls = false +#enable_authentication = true + +#[apim.token.revocation] +#notifier_impl = "org.wso2.carbon.apimgt.keymgt.events.TokenRevocationNotifierImpl" +#enable_realtime_notifier = true +#realtime_notifier.ttl = 5000 +#enable_persistent_notifier = true +#persistent_notifier.hostname = "https://localhost:2379/v2/keys/jti/" +#persistent_notifier.ttl = 5000 +#persistent_notifier.username = "root" +#persistent_notifier.password = "root" + +[[event_handler]] +name="userPostSelfRegistration" +subscriptions=["POST_ADD_USER"] + +[service_provider] +sp_name_regex = "^[\\sa-zA-Z0-9._-]*$" + +[database.local] +url = "jdbc:h2:./repository/database/WSO2CARBON_DB;DB_CLOSE_ON_EXIT=FALSE" + +[[event_listener]] +id = "token_revocation" +type = "org.wso2.carbon.identity.core.handler.AbstractIdentityHandler" +name = "org.wso2.is.notification.ApimOauthEventInterceptor" +order = 1 +[event_listener.properties] +notification_endpoint = "https://localhost:${mgt.transport.https.port}/internal/data/v1/notify" +username = "${admin.username}" +password = "${admin.password}" +'header.X-WSO2-KEY-MANAGER' = "default" + +#---- Adding below configurations which are coming from APIM, to avoid replacing by IOT/EMM configurations ---- +[[resource.access_control]] +context="(.*)/keymanager-operations/user-info/claims(.*)" +secure="true" +http_method="GET" +permissions="/permission/admin/manage/identity/usermgt/list" +scopes="internal_user_mgt_list" + +[[resource.access_control]] +context="(.*)/keymanager-operations/user-info/claims/generate" +secure="true" +http_method="POST" +permissions="/permission/admin/manage/identity/usermgt/list" +scopes="internal_user_mgt_list" + +[[resource.access_control]] +context="(.*)/keymanager-operations/dcr/register" +secure="true" +http_method="POST" +permissions="/permission/admin/manage/identity/applicationmgt/create" +scopes="internal_application_mgt_create" + +# ----------------Required for IOT/EMM----------------------- +[[resource.access_control]] +context="(.*)/api/device-mgt/v1.0/(.*)" +secure="true" +http_method="all" + +[[resource.access_control]] +context="(.*)/api-application-registration/(.*)" +secure="true" +http_method="all" + +[[resource.access_control]] +context="(.*)/api/application-mgt-publisher/v1.0/(.*)" +secure="true" +http_method="all" + +[apim.sync_runtime_artifacts.gateway.skip_list] +apis = ["_TokenAPI_.xml", "_API_Application_Registration_.xml"] +sequences = ["_api_registration_fault_.xml"] + +[transport.https.properties] +maxHttpHeaderSize="16384" + +[transport.http.properties] +maxHttpHeaderSize="16384" + diff --git a/modules/distribution/iot-core/src/core/conf/tomcat/context.xml b/iot-core/src/core/conf/tomcat/context.xml similarity index 100% rename from modules/distribution/iot-core/src/core/conf/tomcat/context.xml rename to iot-core/src/core/conf/tomcat/context.xml diff --git a/modules/distribution/iot-core/src/core/resources/extensions/cookie-policy-content.jsp b/iot-core/src/core/resources/extensions/cookie-policy-content.jsp similarity index 100% rename from modules/distribution/iot-core/src/core/resources/extensions/cookie-policy-content.jsp rename to iot-core/src/core/resources/extensions/cookie-policy-content.jsp diff --git a/modules/distribution/iot-core/src/core/resources/extensions/customAssets/logo.svg b/iot-core/src/core/resources/extensions/customAssets/logo.svg similarity index 100% rename from modules/distribution/iot-core/src/core/resources/extensions/customAssets/logo.svg rename to iot-core/src/core/resources/extensions/customAssets/logo.svg diff --git a/modules/distribution/iot-core/src/core/resources/extensions/header.jsp b/iot-core/src/core/resources/extensions/header.jsp similarity index 100% rename from modules/distribution/iot-core/src/core/resources/extensions/header.jsp rename to iot-core/src/core/resources/extensions/header.jsp diff --git a/modules/distribution/iot-core/src/core/resources/extensions/privacy-policy-content.jsp b/iot-core/src/core/resources/extensions/privacy-policy-content.jsp similarity index 100% rename from modules/distribution/iot-core/src/core/resources/extensions/privacy-policy-content.jsp rename to iot-core/src/core/resources/extensions/privacy-policy-content.jsp diff --git a/modules/distribution/iot-core/src/core/resources/extensions/product-title.jsp b/iot-core/src/core/resources/extensions/product-title.jsp similarity index 100% rename from modules/distribution/iot-core/src/core/resources/extensions/product-title.jsp rename to iot-core/src/core/resources/extensions/product-title.jsp diff --git a/modules/distribution/iot-core/src/core/resources/extensions/title.jsp b/iot-core/src/core/resources/extensions/title.jsp similarity index 100% rename from modules/distribution/iot-core/src/core/resources/extensions/title.jsp rename to iot-core/src/core/resources/extensions/title.jsp diff --git a/modules/distribution/iot-core/src/core/synapse-configs/default/api/_TokenAPI_.xml b/iot-core/src/core/synapse-configs/default/api/_TokenAPI_.xml similarity index 100% rename from modules/distribution/iot-core/src/core/synapse-configs/default/api/_TokenAPI_.xml rename to iot-core/src/core/synapse-configs/default/api/_TokenAPI_.xml diff --git a/p2-profile/emm/pom.xml b/p2-profile/emm/pom.xml new file mode 100644 index 0000000..71e6dc2 --- /dev/null +++ b/p2-profile/emm/pom.xml @@ -0,0 +1,141 @@ + + + + + + + io.entgra.community + p2-profile + 5.0.0-SNAPSHOT + ../pom.xml + + + 4.0.0 + entgra-emm-p2-profile + pom + Entgra EMM - p2 profile + Entgra EMM p2 profile + + + + + org.apache.maven.plugins + maven-dependency-plugin + false + + + 1-unpack-entgra-iots + test + + unpack + + + + + io.entgra.community + entgra-iot-core + zip + true + target + + + + + + + + org.wso2.maven + carbon-p2-plugin + + + 2-p2-repo-generation + package + + p2-repo-gen + + + file:${basedir}/target/p2-repo + file:${basedir}/target/p2-repo + true + true + + + org.wso2.carbon.devicemgt-plugins:org.wso2.carbon.device.mgt.mobile.android.feature:${carbon.device.mgt.plugin.version} + + + + + + + + + feature-install + package + + p2-profile-gen + + + default + file:${basedir}/target/p2-repo + file:${basedir}/target/p2-repo + ${basedir}/target/${entgra-iot-core}/repository/components + true + + + org.wso2.carbon.device.mgt.mobile.android.feature.group + ${carbon.device.mgt.plugin.version} + + + + + + + + + + + + com.google.code.maven-replacer-plugin + replacer + 1.5.3 + + + package + + replace + + + + + + ${basedir}/target/${entgra-iot-core}/repository/components/default/configuration/org.eclipse.equinox.simpleconfigurator/bundles.info + + + + false + true + + + + + + + + + diff --git a/modules/distribution/iot-community/pom.xml b/p2-profile/iot/pom.xml similarity index 76% rename from modules/distribution/iot-community/pom.xml rename to p2-profile/iot/pom.xml index 9c3abd8..b5869b3 100644 --- a/modules/distribution/iot-community/pom.xml +++ b/p2-profile/iot/pom.xml @@ -21,16 +21,16 @@ io.entgra.community - distribution + p2-profile 5.0.0-SNAPSHOT ../pom.xml 4.0.0 - entgra-iot-community + entgra-iot-p2-profile pom - Entgra IoT - Community Distribution - Entgra IoT Community Distribution + Entgra IoT - p2 profile + Entgra IoT p2 profile @@ -49,7 +49,7 @@ io.entgra.community - entgra-iot + entgra-iot-core zip true target @@ -95,7 +95,7 @@ default file:${basedir}/target/p2-repo file:${basedir}/target/p2-repo - ${basedir}/target/${entgra-iot}/repository/components + ${basedir}/target/${entgra-iot-core}/repository/components true @@ -125,7 +125,7 @@ - ${basedir}/target/${entgra-iot}/repository/components/default/configuration/org.eclipse.equinox.simpleconfigurator/bundles.info + ${basedir}/target/${entgra-iot-core}/repository/components/default/configuration/org.eclipse.equinox.simpleconfigurator/bundles.info @@ -135,36 +135,7 @@ - - org.apache.maven.plugins - maven-assembly-plugin - - - 2-dist - package - - single - - - false - UTF-8 - - ${basedir}/src/assembly/filter.properties - - \ - - ${basedir}/src/assembly/bin.xml - - - 0775 - 0775 - 0644 - 0644 - - - - - + diff --git a/modules/p2-profile/pom.xml b/p2-profile/pom.xml similarity index 92% rename from modules/p2-profile/pom.xml rename to p2-profile/pom.xml index 8376f59..9f1f210 100644 --- a/modules/p2-profile/pom.xml +++ b/p2-profile/pom.xml @@ -23,7 +23,7 @@ io.entgra.community community-parent 5.0.0-SNAPSHOT - ../../pom.xml + ../pom.xml 4.0.0 @@ -33,7 +33,8 @@ http://entgra.io - iot-core-profile + iot + emm diff --git a/p2-profile/target/.plxarc b/p2-profile/target/.plxarc new file mode 100644 index 0000000..67ea6ee --- /dev/null +++ b/p2-profile/target/.plxarc @@ -0,0 +1 @@ +maven-shared-archive-resources \ No newline at end of file diff --git a/p2-profile/target/maven-shared-archive-resources/META-INF/DEPENDENCIES b/p2-profile/target/maven-shared-archive-resources/META-INF/DEPENDENCIES new file mode 100644 index 0000000..fb35ea7 --- /dev/null +++ b/p2-profile/target/maven-shared-archive-resources/META-INF/DEPENDENCIES @@ -0,0 +1,11 @@ +// ------------------------------------------------------------------ +// Transitive dependencies of this project determined from the +// maven pom organized by organization. +// ------------------------------------------------------------------ + +Entgra IoT - P2 Profile Module + + + + + diff --git a/p2-profile/target/maven-shared-archive-resources/META-INF/LICENSE b/p2-profile/target/maven-shared-archive-resources/META-INF/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/p2-profile/target/maven-shared-archive-resources/META-INF/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/p2-profile/target/maven-shared-archive-resources/META-INF/NOTICE b/p2-profile/target/maven-shared-archive-resources/META-INF/NOTICE new file mode 100644 index 0000000..b2cab3c --- /dev/null +++ b/p2-profile/target/maven-shared-archive-resources/META-INF/NOTICE @@ -0,0 +1,8 @@ + +Entgra IoT - P2 Profile Module +Copyright 2021 WSO2 + +This product includes software developed at +The Apache Software Foundation (http://www.apache.org/). + + diff --git a/p2-profile/target/timestamp b/p2-profile/target/timestamp new file mode 100644 index 0000000000000000000000000000000000000000..1e10b78cc6d682f0f1ad3162350e2bd9170edad0 GIT binary patch literal 226 zcmZ4UmVvdnh(Rzbu`E%qv?Mb}&m*xo!#A;jmHpPi!(s^+nHiYe7`Srs6I0w0lS}f8 zJQ+AkGKx}*GxBp%Dhli!7(jrhoC8P-05M|;gS~!6er~FMVs2ticA|c2UP*dUqJD9H zX;E^jesX?pZfRa-Nu_QDJv(CY - modules/p2-profile - modules/distribution + iot-core + p2-profile + distribution @@ -92,7 +93,7 @@ io.entgra.community - entgra-iot + entgra-iot-core ${project.version} @@ -101,8 +102,9 @@ wso2am-4.0.0 - entgra-iot-${project.version} - entgra-iot-community-${project.version} + entgra-iot-core-${project.version} + entgra-iot-${project.version} + entgra-emm-${project.version} 5.0.0-SNAPSHOT From 9b1bfec3dd1f80dfd661d5ea94de7d72d2d4d5b5 Mon Sep 17 00:00:00 2001 From: Amalka Subasinghe Date: Thu, 10 Jun 2021 10:42:11 +0530 Subject: [PATCH 07/12] updated pack names --- distribution/emm-community/pom.xml | 2 +- distribution/iot-community/pom.xml | 2 +- distribution/iot-community/target/timestamp | Bin 242 -> 242 bytes pom.xml | 4 ++-- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/distribution/emm-community/pom.xml b/distribution/emm-community/pom.xml index 9e63888..034e5c5 100644 --- a/distribution/emm-community/pom.xml +++ b/distribution/emm-community/pom.xml @@ -27,7 +27,7 @@ 4.0.0 - entgra-emm + entgra-emm-community pom Entgra EMM - Community Distribution Entgra EMM Community Distribution diff --git a/distribution/iot-community/pom.xml b/distribution/iot-community/pom.xml index 2048390..b62eb03 100644 --- a/distribution/iot-community/pom.xml +++ b/distribution/iot-community/pom.xml @@ -27,7 +27,7 @@ 4.0.0 - entgra-iot + entgra-iot-community pom Entgra IoT - Community Distribution Entgra IoT Community Distribution diff --git a/distribution/iot-community/target/timestamp b/distribution/iot-community/target/timestamp index 6c6cd42567dfdb5b94406d2cc2da23de7546ad59..4835c52b1f25915615000f8c9836c62aed406605 100644 GIT binary patch delta 12 Tcmeyw_=$1CTh=c^(i18GCi(@E delta 12 Tcmeyw_=$1CThwso2am-4.0.0 entgra-iot-core-${project.version} - entgra-iot-${project.version} - entgra-emm-${project.version} + entgra-iot-community-${project.version} + entgra-emm-community-${project.version} 5.0.0-SNAPSHOT From 99a8d002d2db15cca3f4b7b5b309b28dca44d140 Mon Sep 17 00:00:00 2001 From: Amalka Subasinghe Date: Thu, 10 Jun 2021 13:27:53 +0530 Subject: [PATCH 08/12] fixed packing issue --- iot-core/pom.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/iot-core/pom.xml b/iot-core/pom.xml index 7786484..56dcac6 100644 --- a/iot-core/pom.xml +++ b/iot-core/pom.xml @@ -59,7 +59,7 @@ create-device-mgt-schema - install + package run @@ -85,7 +85,7 @@ create-certificate-mgt-schema - install + package run @@ -118,7 +118,7 @@ 2-p2-repo-generation - package + prepare-package p2-repo-gen @@ -208,7 +208,7 @@ feature-install - package + prepare-package p2-profile-gen @@ -369,7 +369,7 @@ 2-dist - install + package single From 6722f4059f854bf890d3ba035bdec6e4eb8f717b Mon Sep 17 00:00:00 2001 From: Amalka Subasinghe Date: Fri, 11 Jun 2021 10:42:33 +0530 Subject: [PATCH 09/12] added wso2am download logic --- iot-core/pom.xml | 29 ++++++++++++++++++++++++++++- pom.xml | 2 ++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/iot-core/pom.xml b/iot-core/pom.xml index 56dcac6..81e92d1 100644 --- a/iot-core/pom.xml +++ b/iot-core/pom.xml @@ -45,7 +45,34 @@ maven-antrun-plugin - create-solution + check-pack + process-resources + + run + + + + + + + + + download-pack + process-resources + + run + + + + + + + + + extract-pack process-resources run diff --git a/pom.xml b/pom.xml index ecec594..b5cb7ff 100644 --- a/pom.xml +++ b/pom.xml @@ -102,6 +102,8 @@ wso2am-4.0.0 + https://github.com/wso2/product-apim/releases/download/v4.0.0/${wso2am}.zip + entgra-iot-core-${project.version} entgra-iot-community-${project.version} entgra-emm-community-${project.version} From 3ef50dd8dd824e9edd0248391b1715af9176d0bd Mon Sep 17 00:00:00 2001 From: Amalka Subasinghe Date: Mon, 14 Jun 2021 13:20:21 +0530 Subject: [PATCH 10/12] fixed bug in token call --- iot-core/src/core/synapse-configs/default/api/_TokenAPI_.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/iot-core/src/core/synapse-configs/default/api/_TokenAPI_.xml b/iot-core/src/core/synapse-configs/default/api/_TokenAPI_.xml index d4dd08a..eafd691 100644 --- a/iot-core/src/core/synapse-configs/default/api/_TokenAPI_.xml +++ b/iot-core/src/core/synapse-configs/default/api/_TokenAPI_.xml @@ -1,8 +1,8 @@ - - + + From 780b6bab40ab553663f3c965b7872f66bd9ee25c Mon Sep 17 00:00:00 2001 From: Amalka Subasinghe Date: Mon, 21 Jun 2021 20:57:34 +0530 Subject: [PATCH 11/12] added identity-extension ouath2 component --- distribution/iot-community/target/timestamp | Bin 242 -> 242 bytes iot-core/pom.xml | 4 ++++ iot-core/src/assembly/bin.xml | 11 +++++++++++ iot-core/src/core/conf/deployment.toml | 7 +++++++ pom.xml | 5 +++++ 5 files changed, 27 insertions(+) diff --git a/distribution/iot-community/target/timestamp b/distribution/iot-community/target/timestamp index 4835c52b1f25915615000f8c9836c62aed406605..a036c8a94dcd22f8f3ae24d08c92cb0f8fa86645 100644 GIT binary patch delta 11 Scmeyw_=$1CI~EaTi3$K6{sb@p delta 11 Scmeyw_=$1CI~F172^9by&IFzS diff --git a/iot-core/pom.xml b/iot-core/pom.xml index 81e92d1..ee3864d 100644 --- a/iot-core/pom.xml +++ b/iot-core/pom.xml @@ -36,6 +36,10 @@ com.h2database.wso2 h2-database-engine + + org.wso2.carbon.devicemgt + org.wso2.carbon.device.mgt.oauth.extensions + diff --git a/iot-core/src/assembly/bin.xml b/iot-core/src/assembly/bin.xml index d8c350c..d3e55ad 100644 --- a/iot-core/src/assembly/bin.xml +++ b/iot-core/src/assembly/bin.xml @@ -85,4 +85,15 @@ + + + ${entgra-iot-core}/repository/components/dropins + + org.wso2.carbon.devicemgt:org.wso2.carbon.device.mgt.oauth.extensions + + + + + + diff --git a/iot-core/src/core/conf/deployment.toml b/iot-core/src/core/conf/deployment.toml index a4c16d7..4b63f91 100644 --- a/iot-core/src/core/conf/deployment.toml +++ b/iot-core/src/core/conf/deployment.toml @@ -302,3 +302,10 @@ maxHttpHeaderSize="16384" [transport.http.properties] maxHttpHeaderSize="16384" +[oauth.grant_type.jwt_bearer] +grant_handler="org.wso2.carbon.device.mgt.oauth.extensions.handlers.grant.ExtendedJWTGrantHandler" + +[[oauth.custom_grant_type]] +name="access_token" +grant_handler="org.wso2.carbon.device.mgt.oauth.extensions.handlers.grant.AccessTokenGrantHandler" +grant_validator="org.wso2.carbon.device.mgt.oauth.extensions.validators.AccessTokenGrantValidator" \ No newline at end of file diff --git a/pom.xml b/pom.xml index b5cb7ff..f504547 100644 --- a/pom.xml +++ b/pom.xml @@ -83,6 +83,11 @@ org.wso2.carbon.identity.jwt.client.extension ${carbon.device.mgt.version} + + org.wso2.carbon.devicemgt + org.wso2.carbon.device.mgt.oauth.extensions + ${carbon.device.mgt.version} + From 7ec26ad35a8537938216f48ec1d2637d4b896229 Mon Sep 17 00:00:00 2001 From: Amalka Subasinghe Date: Mon, 21 Jun 2021 21:34:56 +0530 Subject: [PATCH 12/12] added grant handler configs --- distribution/emm-community/src/conf/deployment.toml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/distribution/emm-community/src/conf/deployment.toml b/distribution/emm-community/src/conf/deployment.toml index fac3b8a..8473704 100644 --- a/distribution/emm-community/src/conf/deployment.toml +++ b/distribution/emm-community/src/conf/deployment.toml @@ -302,3 +302,10 @@ maxHttpHeaderSize="16384" [transport.http.properties] maxHttpHeaderSize="16384" +[oauth.grant_type.jwt_bearer] +grant_handler="org.wso2.carbon.device.mgt.oauth.extensions.handlers.grant.ExtendedJWTGrantHandler" + +[[oauth.custom_grant_type]] +name="access_token" +grant_handler="org.wso2.carbon.device.mgt.oauth.extensions.handlers.grant.AccessTokenGrantHandler" +grant_validator="org.wso2.carbon.device.mgt.oauth.extensions.validators.AccessTokenGrantValidator"