parent
b0e8b7bfa1
commit
3bbd7b8b2e
@ -0,0 +1,71 @@
|
||||
<?org.wso2.uesxml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
~ Copyright (c) 2016, 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.
|
||||
-->
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
|
||||
<parent>
|
||||
<groupId>io.entgra.iot</groupId>
|
||||
<artifactId>entgra-iot-server-parent</artifactId>
|
||||
<version>4.1.1-SNAPSHOT</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>entgra-iot</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<name>Entgra IoT - Distribution</name>
|
||||
<description>Entgra IoT Distribution</description>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>2-dist</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<appendAssemblyId>false</appendAssemblyId>
|
||||
<encoding>UTF-8</encoding>
|
||||
<filters>
|
||||
<filter>${basedir}/src/assembly/filter.properties</filter>
|
||||
</filters>
|
||||
<escapeString>\</escapeString>
|
||||
<descriptors>
|
||||
<descriptor>${basedir}/src/assembly/bin.xml</descriptor>
|
||||
</descriptors>
|
||||
<archiverConfig>
|
||||
<defaultDirectoryMode>0775</defaultDirectoryMode>
|
||||
<directoryMode>0775</directoryMode>
|
||||
<defaultFileMode>0644</defaultFileMode>
|
||||
<fileMode>0644</fileMode>
|
||||
</archiverConfig>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
@ -0,0 +1,87 @@
|
||||
<!--
|
||||
~ Copyright (c) 2021, 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.
|
||||
-->
|
||||
|
||||
<!DOCTYPE assembly [
|
||||
<!ELEMENT assembly (id|formats|includeBaseDirectory|fileSets|dependencySets|files)*>
|
||||
<!ELEMENT id (#PCDATA)>
|
||||
<!ELEMENT formats (format)*>
|
||||
<!ELEMENT format (#PCDATA)>
|
||||
<!ELEMENT includeBaseDirectory (#PCDATA)>
|
||||
<!ELEMENT fileSets (fileSet)*>
|
||||
<!ELEMENT fileSet (directory|outputDirectory|excludes|includes|fileMode|filtered)*>
|
||||
<!ELEMENT directory (#PCDATA)>
|
||||
<!ELEMENT outputDirectory (#PCDATA)>
|
||||
<!ELEMENT excludes (exclude)*>
|
||||
<!ELEMENT exclude (#PCDATA)>
|
||||
<!ELEMENT includes (include)*>
|
||||
<!ELEMENT include (#PCDATA)>
|
||||
<!ELEMENT fileMode (#PCDATA)>
|
||||
<!ELEMENT filtered (#PCDATA)>
|
||||
<!ELEMENT dependencySets (dependencySet)*>
|
||||
<!ELEMENT dependencySet (outputDirectory|includes)*>
|
||||
<!ELEMENT files (file)*>
|
||||
<!ELEMENT file (source|outputDirectory|fileMode|filtered|destName)*>
|
||||
<!ELEMENT source (#PCDATA)>
|
||||
<!ELEMENT destName (#PCDATA)>
|
||||
]>
|
||||
<assembly>
|
||||
<id>bin</id>
|
||||
<formats>
|
||||
<format>zip</format>
|
||||
</formats>
|
||||
<includeBaseDirectory>false</includeBaseDirectory>
|
||||
|
||||
<fileSets>
|
||||
<fileSet>
|
||||
<directory>../p2-profile/iot-core-profile/target/${wso2am}</directory>
|
||||
<outputDirectory>${entgra-iot}</outputDirectory>
|
||||
<excludes>
|
||||
<exclude>**/repository/conf/tomcat/context.xml</exclude>
|
||||
<exclude>**/repository/conf/deployment.toml</exclude>
|
||||
</excludes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>src/core/synapse-configs/default/api</directory>
|
||||
<outputDirectory>${entgra-iot}/repository/deployment/server/synapse-configs/default/api</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>src/core/conf/tomcat</directory>
|
||||
<outputDirectory>${entgra-iot}/repository/conf/tomcat</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>src/core/bin</directory>
|
||||
<outputDirectory>${entgra-iot}/bin</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>src/core/resources</directory>
|
||||
<outputDirectory>${entgra-iot}/repository/deployment/server/webapps/authenticationendpoint</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>src/core/resources</directory>
|
||||
<outputDirectory>${entgra-iot}/repository/deployment/server/webapps/accountrecoveryendpoint</outputDirectory>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
|
||||
<files>
|
||||
<file>
|
||||
<source>src/core/conf/deployment.toml</source>
|
||||
<outputDirectory>${entgra-iot}/repository/conf/</outputDirectory>
|
||||
</file>
|
||||
</files>
|
||||
|
||||
</assembly>
|
@ -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
|
@ -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
|
@ -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"
|
||||
|
@ -0,0 +1,75 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<!-- The contents of this file will be loaded for each web application -->
|
||||
<Context useHttpOnly="true" useRelativeRedirects="false">
|
||||
|
||||
<!-- Default set of monitored resources -->
|
||||
|
||||
<Loader className="org.wso2.carbon.webapp.mgt.loader.CarbonWebappLoader"
|
||||
loaderClass="org.wso2.carbon.webapp.mgt.loader.CarbonWebappClassLoader"/>
|
||||
|
||||
<!-- Uncomment this to disable session persistence across Tomcat restarts -->
|
||||
<Manager className="org.wso2.carbon.webapp.mgt.CarbonTomcatSessionManager">
|
||||
<SessionIdGenerator sessionIdLength="128"/>
|
||||
</Manager>
|
||||
|
||||
<!-- Uncomment this to enable Comet connection tacking (provides events
|
||||
on session expiration as well as webapp lifecycle) -->
|
||||
<!--
|
||||
<Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />
|
||||
-->
|
||||
<!-- Listener for WS-Discovery -->
|
||||
<!--<Listener className="org.wso2.carbon.discovery.cxf.listeners.TomcatCxfDiscoveryListener" />-->
|
||||
|
||||
<!-- APIPublisherLifecycleListener listens to webapp deployment events and publish JAX-RS services packaged into each of the aforesaid
|
||||
web applications that are configured to be made available as 'Managed APIs'. Given below are the parameters that need to be congigured
|
||||
in the form of 'context-param's in web.xml of each applicable web application.
|
||||
|
||||
'managed-api-enabled' - Indicates that the web application being processed needs to be published as a 'Managed API'.
|
||||
'managed-api-context' - Context of the 'Managed API'.
|
||||
'managed-api-version' - Version of the 'Managed API'.
|
||||
'managed-api-owner' - Owner of the 'Managed API'.
|
||||
'managed-api-isSecured' - Indicates if the 'Managed API' needs to be exposed over a secured channel.
|
||||
'managed-api-transports' - Transports through which the 'Managed API' is exposed.
|
||||
-->
|
||||
<Listener className="org.wso2.carbon.apimgt.webapp.publisher.lifecycle.listener.APIPublisherLifecycleListener"/>
|
||||
|
||||
<!-- WebAppDeploymentLifecycleListener listens to webapp deployment events and adds the custom permissions defined in webapps'
|
||||
META-INF/permissions.xml to the permissions/admin section of registry. Given below is a sample of permissions.xml file.
|
||||
|
||||
<PermissionConfiguration>
|
||||
<Permission>
|
||||
<name>Device Management</name>
|
||||
<path>/device-mgt</path>
|
||||
</Permission>
|
||||
<Permission>
|
||||
<name>Administrator</name>
|
||||
<path>/device-mgt/admin</path>
|
||||
</Permission>
|
||||
<Permission>
|
||||
<name>Dashboard</name>
|
||||
<path>/device-mgt/admin/dashboard</path>
|
||||
</Permission>
|
||||
<Permission>
|
||||
<name>Lock</name>
|
||||
<path>/device-mgt/admin/operation/lock</path>
|
||||
</Permission>
|
||||
</PermissionConfiguration>
|
||||
-->
|
||||
<Listener className="org.wso2.carbon.device.mgt.core.config.permission.lifecycle.WebAppDeploymentLifecycleListener"/>
|
||||
</Context>
|
After Width: | Height: | Size: 48 KiB |
@ -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.
|
||||
--%>
|
||||
|
||||
<!-- localize.jsp MUST already be included in the calling script -->
|
||||
|
||||
<%@ 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", "");
|
||||
}
|
||||
|
||||
%>
|
||||
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="icon" href="libs/themes/default/assets/images/favicon.ico" type="image/x-icon"/>
|
||||
<link href="libs/themes/default/theme.min.css" rel="stylesheet">
|
||||
|
||||
<style>
|
||||
a {
|
||||
color : #1b3bcc
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #1b3bcc
|
||||
}
|
||||
.ui.primary.buttons .button,
|
||||
.ui.primary.button {
|
||||
background-color: #1b3bcc
|
||||
}
|
||||
|
||||
.ui.primary.buttons .button:hover,
|
||||
.ui.primary.button:hover {
|
||||
background-color: #1b3bcc
|
||||
}
|
||||
|
||||
.ui.button.link-button {
|
||||
color: #1b3bcc;
|
||||
}
|
||||
|
||||
.ui.warning.message {
|
||||
background-color: #fbfbff;
|
||||
}
|
||||
</style>
|
||||
<title><%=request.getAttribute("pageTitle")%></title>
|
||||
|
||||
<%
|
||||
String cssPath = request.getAttribute("customCSS") + "";
|
||||
if (!StringUtils.isEmpty(cssPath)) {
|
||||
%>
|
||||
<link href=<%=cssPath%> rel="stylesheet" type="text/css">
|
||||
<% }
|
||||
%>
|
||||
|
||||
<script src="libs/jquery_3.4.1/jquery-3.4.1.js"></script>
|
@ -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.
|
||||
--%>
|
||||
|
||||
<!-- localize.jsp MUST already be included in the calling script -->
|
||||
|
||||
<%@ page import="org.apache.commons.lang.StringUtils"%>
|
||||
|
||||
<% if ("IOT Server".equals(request.getAttribute("headerTitle"))) { %>
|
||||
<div class="product-title">
|
||||
<div class="theme-icon inline auto transparent product-logo">
|
||||
<img src=extensions/customAssets/logo.svg alt="Logo" />
|
||||
</div>
|
||||
<h1 class="product-title-text">IOT Server</h1>
|
||||
</div>
|
||||
<% } 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)) {
|
||||
%>
|
||||
<div class="product-title box">
|
||||
<img src=<%=logoSrc%> alt=<%=logoAltText%> height=<%=logoHeight%> width=<%=logoWidth%>>
|
||||
</div>
|
||||
<% } else { %>
|
||||
<div class="product-title box">
|
||||
<h1 class="product-title-text" vertical-align="middle"><%=request.getAttribute("headerTitle")%></h1>
|
||||
</div>
|
||||
<% } %>
|
||||
<% } %>
|
@ -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.
|
||||
--%>
|
||||
|
||||
<!-- localize.jsp MUST already be included in the calling script -->
|
||||
|
||||
<!-- title -->
|
||||
<title>WSO2 IOT Server</title>
|
@ -0,0 +1,44 @@
|
||||
<api xmlns="http://ws.apache.org/ns/synapse" name="_WSO2AMTokenAPI_" context="/token">
|
||||
<resource methods="POST" url-mapping="/*" faultSequence="_token_fault_">
|
||||
<inSequence>
|
||||
<property name="uri.var.portnum" expression="get-property('system','iot.keymanager.https.port')"/>
|
||||
<property name="uri.var.hostname" expression="get-property('system','iot.keymanager.host')"/>
|
||||
<filter source="$body//scope" regex="PRODUCTION">
|
||||
<then>
|
||||
<payloadFactory media-type="xml">
|
||||
<format>
|
||||
<xformValues>
|
||||
<refresh_token>$1</refresh_token>
|
||||
<grant_type>refresh_token</grant_type>
|
||||
</xformValues>
|
||||
</format>
|
||||
<args>
|
||||
<arg xmlns:m0="http://services.samples/xsd" expression="//refresh_token" />
|
||||
</args>
|
||||
</payloadFactory>
|
||||
<header name="Content-Type" scope="transport" value="application/x-www-form-urlencoded" />
|
||||
<property name="messageType" scope="axis2" type="STRING" value="application/x-www-form-urlencoded" />
|
||||
</then>
|
||||
<else>
|
||||
</else>
|
||||
</filter>
|
||||
<send>
|
||||
<endpoint>
|
||||
<http uri-template="https://{uri.var.hostname}:{uri.var.portnum}/oauth2/token">
|
||||
<timeout>
|
||||
<duration>60000</duration>
|
||||
<responseAction>fault</responseAction>
|
||||
</timeout>
|
||||
</http>
|
||||
</endpoint>
|
||||
</send>
|
||||
</inSequence>
|
||||
<outSequence>
|
||||
<send/>
|
||||
</outSequence>
|
||||
</resource>
|
||||
<handlers>
|
||||
<handler class="org.wso2.carbon.apimgt.gateway.handlers.ext.APIManagerCacheExtensionHandler"/>
|
||||
<handler class="org.wso2.carbon.apimgt.gateway.handlers.common.SynapsePropertiesHandler"/>
|
||||
</handlers>
|
||||
</api>
|
@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
~ Copyright (c) 2021, 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.
|
||||
-->
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
|
||||
<parent>
|
||||
<groupId>io.entgra.iot</groupId>
|
||||
<artifactId>entgra-iot-server-parent</artifactId>
|
||||
<version>4.1.1-SNAPSHOT</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>entgra-iot-p2-profile</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<name>Entgra IoT - P2 Profile Module</name>
|
||||
<url>http://entgra.io</url>
|
||||
|
||||
<modules>
|
||||
<module>iot-core-profile</module>
|
||||
</modules>
|
||||
|
||||
</project>
|
@ -0,0 +1,352 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (c) 2016, 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.
|
||||
-->
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>io.entgra.iot</groupId>
|
||||
<artifactId>entgra-iot-server-parent</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<version>4.1.1-SNAPSHOT</version>
|
||||
<name>Entgra IoT - Parent</name>
|
||||
<url>http://entgra.io</url>
|
||||
<description>Entgra IoT Server</description>
|
||||
|
||||
<parent>
|
||||
<groupId>org.wso2</groupId>
|
||||
<artifactId>wso2</artifactId>
|
||||
<version>2</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
<module>modules/p2-profile</module>
|
||||
<module>modules/distribution</module>
|
||||
</modules>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<!--CDM core dependencies-->
|
||||
<dependency>
|
||||
<groupId>org.wso2.carbon.devicemgt</groupId>
|
||||
<artifactId>org.wso2.carbon.device.mgt.core</artifactId>
|
||||
<version>${carbon.device.mgt.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.wso2.carbon.devicemgt</groupId>
|
||||
<artifactId>org.wso2.carbon.device.mgt.common</artifactId>
|
||||
<version>${carbon.device.mgt.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.wso2.carbon.devicemgt</groupId>
|
||||
<artifactId>org.wso2.carbon.device.mgt.group.core</artifactId>
|
||||
<version>${carbon.device.mgt.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.wso2.carbon.devicemgt</groupId>
|
||||
<artifactId>org.wso2.carbon.device.mgt.group.common</artifactId>
|
||||
<version>${carbon.device.mgt.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.wso2.carbon.devicemgt</groupId>
|
||||
<artifactId>org.wso2.carbon.policy.mgt.common</artifactId>
|
||||
<version>${carbon.device.mgt.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.wso2.carbon.devicemgt</groupId>
|
||||
<artifactId>org.wso2.carbon.policy.mgt.core</artifactId>
|
||||
<version>${carbon.device.mgt.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.wso2.carbon.devicemgt</groupId>
|
||||
<artifactId>org.wso2.carbon.certificate.mgt.core</artifactId>
|
||||
<version>${carbon.device.mgt.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.wso2.carbon.devicemgt</groupId>
|
||||
<artifactId>org.wso2.carbon.identity.jwt.client.extension</artifactId>
|
||||
<version>${carbon.device.mgt.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!--Orbit dependencies-->
|
||||
<dependency>
|
||||
<groupId>com.h2database.wso2</groupId>
|
||||
<artifactId>h2-database-engine</artifactId>
|
||||
<version>${orbit.h2.engine.version}</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<properties>
|
||||
|
||||
<wso2am>wso2am-4.0.0</wso2am>
|
||||
<entgra-iot>entgra-iot-${project.version}</entgra-iot>
|
||||
|
||||
<!-- Carbon Device Management-->
|
||||
<carbon.device.mgt.version>4.1.16-SNAPSHOT</carbon.device.mgt.version>
|
||||
|
||||
<carbon.p2.plugin.version>5.1.2</carbon.p2.plugin.version>
|
||||
|
||||
<!--Orbit versions-->
|
||||
<orbit.h2.engine.version>1.2.140.wso2v3</orbit.h2.engine.version>
|
||||
|
||||
</properties>
|
||||
|
||||
<scm>
|
||||
<url>https://gitlab.com/entgra/product-iots.git</url>
|
||||
<developerConnection>scm:git:https://gitlab.com/entgra/product-iots.git</developerConnection>
|
||||
<connection>scm:git:https://gitlab.com/entgra/product-iots.git</connection>
|
||||
<tag>HEAD</tag>
|
||||
</scm>
|
||||
|
||||
<build>
|
||||
<extensions>
|
||||
<extension>
|
||||
<groupId>org.apache.maven.wagon</groupId>
|
||||
<artifactId>wagon-ssh</artifactId>
|
||||
<version>2.1</version>
|
||||
</extension>
|
||||
</extensions>
|
||||
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.jvnet.maven.incrementalbuild</groupId>
|
||||
<artifactId>incremental-build-plugin</artifactId>
|
||||
<version>1.3</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>incremental-build</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>2.3.1</version>
|
||||
<configuration>
|
||||
<encoding>UTF-8</encoding>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-release-plugin</artifactId>
|
||||
<configuration>
|
||||
<preparationGoals>clean install</preparationGoals>
|
||||
<autoVersionSubmodules>true</autoVersionSubmodules>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>maven-scr-plugin</artifactId>
|
||||
<version>1.7.2</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>generate-scr-scrdescriptor</id>
|
||||
<goals>
|
||||
<goal>scr</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>maven-bundle-plugin</artifactId>
|
||||
<version>2.3.5</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<obrRepository>NONE</obrRepository>
|
||||
<!--<instructions>
|
||||
<_include>-osgi.bnd</_include>
|
||||
</instructions>-->
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
<version>2.1.2</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-sources</id>
|
||||
<phase>verify</phase>
|
||||
<goals>
|
||||
<goal>jar-no-fork</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<version>3.0.0</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||
<version>2.4</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>build-helper-maven-plugin</artifactId>
|
||||
<version>1.8</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>2.18.1</version>
|
||||
<!--Need to remove below configuration after fixing tests-->
|
||||
<configuration>
|
||||
<testFailureIgnore>true</testFailureIgnore>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>wso2.releases</id>
|
||||
<name>WSO2 internal Repository</name>
|
||||
<url>http://maven.wso2.org/nexus/content/repositories/releases/</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
<updatePolicy>daily</updatePolicy>
|
||||
<checksumPolicy>ignore</checksumPolicy>
|
||||
</releases>
|
||||
</pluginRepository>
|
||||
<pluginRepository>
|
||||
<id>wso2.snapshots</id>
|
||||
<name>Apache Snapshot Repository</name>
|
||||
<url>http://maven.wso2.org/nexus/content/repositories/snapshots/</url>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
<updatePolicy>daily</updatePolicy>
|
||||
</snapshots>
|
||||
<releases>
|
||||
<enabled>false</enabled>
|
||||
</releases>
|
||||
</pluginRepository>
|
||||
<pluginRepository>
|
||||
<id>wso2-nexus</id>
|
||||
<name>WSO2 internal Repository</name>
|
||||
<url>http://maven.wso2.org/nexus/content/groups/wso2-public/</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
<updatePolicy>daily</updatePolicy>
|
||||
<checksumPolicy>ignore</checksumPolicy>
|
||||
</releases>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
|
||||
|
||||
<repositories>
|
||||
<!-- Before adding ANYTHING in here, please start a discussion on the dev list.
|
||||
Ideally the Axis2 build should only use Maven central (which is available
|
||||
by default) and nothing else. We had troubles with other repositories in
|
||||
the past. Therefore configuring additional repositories here should be
|
||||
considered very carefully. -->
|
||||
<repository>
|
||||
<id>wso2-nexus</id>
|
||||
<name>WSO2 internal Repository</name>
|
||||
<url>http://maven.wso2.org/nexus/content/groups/wso2-public/</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
<updatePolicy>daily</updatePolicy>
|
||||
<checksumPolicy>ignore</checksumPolicy>
|
||||
</releases>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>wso2.releases</id>
|
||||
<name>WSO2 internal Repository</name>
|
||||
<url>http://maven.wso2.org/nexus/content/repositories/releases/</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
<updatePolicy>daily</updatePolicy>
|
||||
<checksumPolicy>ignore</checksumPolicy>
|
||||
</releases>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>wso2.snapshots</id>
|
||||
<name>WSO2 Snapshot Repository</name>
|
||||
<url>http://maven.wso2.org/nexus/content/repositories/snapshots/</url>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
<updatePolicy>daily</updatePolicy>
|
||||
</snapshots>
|
||||
<releases>
|
||||
<enabled>false</enabled>
|
||||
</releases>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>entgra-nexus</id>
|
||||
<name>Entgra internal Repository</name>
|
||||
<url>http://nexus.entgra.io/repository/maven-public/</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
<updatePolicy>daily</updatePolicy>
|
||||
<checksumPolicy>ignore</checksumPolicy>
|
||||
</releases>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>entgra.snapshots</id>
|
||||
<name>Entgra Snapshot Repository</name>
|
||||
<url>http://nexus.entgra.io/repository/maven-snapshots/</url>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
<updatePolicy>daily</updatePolicy>
|
||||
</snapshots>
|
||||
<releases>
|
||||
<enabled>false</enabled>
|
||||
</releases>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>entgra.releases</id>
|
||||
<name>Entgra internal Repository</name>
|
||||
<url>http://nexus.entgra.io/repository/maven-releases/</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
<updatePolicy>daily</updatePolicy>
|
||||
<checksumPolicy>ignore</checksumPolicy>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
</repositories>
|
||||
<distributionManagement>
|
||||
<snapshotRepository>
|
||||
<id>maven-snapshots</id>
|
||||
<url>http://nexus.entgra.io/repository/maven-snapshots/</url>
|
||||
</snapshotRepository>
|
||||
<repository>
|
||||
<id>maven-release</id>
|
||||
<url>http://nexus.entgra.io/repository/maven-releases/</url>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
</project>
|
Reference in new issue