From f890415baea2c507d471c0ebdae06531fa3de19e Mon Sep 17 00:00:00 2001 From: ayyoob Date: Sun, 5 Feb 2017 17:53:37 +0530 Subject: [PATCH] enabled mutual ssl support and added artifact deployment related features --- .../distribution/src/assembly/bin.xml | 19 +++- .../conf/security/authenticators.xml | 74 ++++++++++++++ .../conf/tomcat/catalina-server.xml | 99 +++++++++++++++++++ modules/analytics/p2-profile-gen/pom.xml | 7 ++ .../core/distribution/src/assembly/bin.xml | 15 ++- .../src/repository/bin/wso2server.bat | 2 +- .../src/repository/bin/wso2server.sh | 2 + .../conf/security/authenticators.xml | 12 ++- .../conf/tomcat/catalina-server.xml | 99 +++++++++++++++++++ modules/core/p2-profile-gen/pom.xml | 11 +++ pom.xml | 2 +- 11 files changed, 334 insertions(+), 8 deletions(-) create mode 100644 modules/analytics/distribution/src/repository/conf/security/authenticators.xml create mode 100644 modules/analytics/distribution/src/repository/conf/tomcat/catalina-server.xml create mode 100644 modules/core/distribution/src/repository/conf/tomcat/catalina-server.xml diff --git a/modules/analytics/distribution/src/assembly/bin.xml b/modules/analytics/distribution/src/assembly/bin.xml index 55cda758..ac35f977 100644 --- a/modules/analytics/distribution/src/assembly/bin.xml +++ b/modules/analytics/distribution/src/assembly/bin.xml @@ -49,6 +49,8 @@ **/repository/conf/security/cipher-tool.properties **/repository/deployment/server/jaggeryapps/portal/modules/oauth/plugins/token-handler-utils.js **/repository/deployment/server/jaggeryapps/portal/modules/oauth/plugins/token-handlers.js + **/repository/conf/security/authenticators.xml + **/repository/conf/tomcat/catalina-server.xml @@ -404,6 +406,21 @@ true 644 + + + src/repository/conf/security/authenticators.xml + + ${pom.artifactId}-${pom.version}/repository/conf/security/ + + true + 644 + + + src/repository/conf/tomcat/catalina-server.xml + ${pom.artifactId}-${pom.version}/repository/conf/tomcat + true + 644 + @@ -814,7 +831,7 @@ - ../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/carbonapps/org_wso2_carbon_analytics_cdmf-1.0.0.car + ../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/devicetypes/device_management/org_wso2_carbon_analytics_cdmf-1.0.0.car ${pom.artifactId}-${pom.version}/repository/deployment/server/carbonapps/ 644 diff --git a/modules/analytics/distribution/src/repository/conf/security/authenticators.xml b/modules/analytics/distribution/src/repository/conf/security/authenticators.xml new file mode 100644 index 00000000..7fb33e27 --- /dev/null +++ b/modules/analytics/distribution/src/repository/conf/security/authenticators.xml @@ -0,0 +1,74 @@ + + + + + + + + + + 5 + + + + + 10 + + /carbon/admin/login.jsp + carbonServer + https://localhost:9443/samlsso + urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified + https://localhost:9443/acs + + + + + + + + + + + + + + + + + + + + + + 5 + + UserName + false + + + + + \ No newline at end of file diff --git a/modules/analytics/distribution/src/repository/conf/tomcat/catalina-server.xml b/modules/analytics/distribution/src/repository/conf/tomcat/catalina-server.xml new file mode 100644 index 00000000..c68a93ef --- /dev/null +++ b/modules/analytics/distribution/src/repository/conf/tomcat/catalina-server.xml @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/modules/analytics/p2-profile-gen/pom.xml b/modules/analytics/p2-profile-gen/pom.xml index 715c17ad..fecb8059 100644 --- a/modules/analytics/p2-profile-gen/pom.xml +++ b/modules/analytics/p2-profile-gen/pom.xml @@ -395,6 +395,9 @@ org.wso2.carbon.devicemgt-plugins:org.wso2.extension.siddhi.execution.json.feature:${carbon.device.mgt.plugin.version} + + org.wso2.carbon.identity:org.wso2.carbon.identity.authenticator.mutualssl.feature:${identity.carbon.auth.mutual.ssl.version} + @@ -806,6 +809,10 @@ org.wso2.extension.siddhi.execution.json.feature.group ${carbon.device.mgt.plugin.version} + + org.wso2.carbon.identity.authenticator.mutualssl.feature.group + ${identity.carbon.auth.mutual.ssl.version} + diff --git a/modules/core/distribution/src/assembly/bin.xml b/modules/core/distribution/src/assembly/bin.xml index c7ec011b..689b8b00 100644 --- a/modules/core/distribution/src/assembly/bin.xml +++ b/modules/core/distribution/src/assembly/bin.xml @@ -73,7 +73,8 @@ **/lib/httpmime* **/lib/encoder* **/plugins/jaxb* - **/security/authenticators.xml + **/repository/conf/security/authenticators.xml + **/repository/conf/tomcat/catalina-server.xml **/user-mgt.xml **/plugins/org.wso2.carbon.localentry.ui* @@ -407,7 +408,7 @@ ${pom.artifactId}-${pom.version}/repository/deployment/server/carbonapps - + ../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources @@ -1186,6 +1187,12 @@ true 644 + + src/repository/conf/tomcat/catalina-server.xml + ${pom.artifactId}-${pom.version}/repository/conf/tomcat + true + 644 + @@ -1320,9 +1327,9 @@ - ../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/carbonapps/org_wso2_carbon_analytics_cdmf-1.0.0.car + ../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/devicetypes/device_management/org_wso2_carbon_analytics_cdmf-1.0.0.car - ${pom.artifactId}-${pom.version}/repository/deployment/server/carbonapps/ + ${pom.artifactId}-${pom.version}/repository/resources/devicetypes/device_management/ 644 diff --git a/modules/core/distribution/src/repository/bin/wso2server.bat b/modules/core/distribution/src/repository/bin/wso2server.bat index 33cd68cf..6a5b22e8 100644 --- a/modules/core/distribution/src/repository/bin/wso2server.bat +++ b/modules/core/distribution/src/repository/bin/wso2server.bat @@ -162,7 +162,7 @@ set CARBON_CLASSPATH=.\lib;%CARBON_CLASSPATH% set JAVA_ENDORSED=".\lib\endorsed";"%JAVA_HOME%\jre\lib\endorsed";"%JAVA_HOME%\lib\endorsed" -set CMD_LINE_ARGS=-Xbootclasspath/a:%CARBON_XBOOTCLASSPATH% -Xms256m -Xmx1024m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath="%CARBON_HOME%\repository\logs\heap-dump.hprof" -Dcom.sun.management.jmxremote -classpath %CARBON_CLASSPATH% %JAVA_OPTS% -Djava.endorsed.dirs=%JAVA_ENDORSED% -Dcarbon.registry.root=/ -Dcarbon.home="%CARBON_HOME%" -Dlogger.server.name="IoT-Core" -Dwso2.server.standalone=true -Djava.command="%JAVA_HOME%\bin\java" -Djava.opts="%JAVA_OPTS%" -Djava.io.tmpdir="%CARBON_HOME%\tmp" -Dcatalina.base="%CARBON_HOME%\lib\tomcat" -Dwso2.carbon.xml=%CARBON_HOME%\repository\conf\carbon.xml -Dwso2.registry.xml="%CARBON_HOME%\repository\conf\registry.xml" -Dwso2.user.mgt.xml="%CARBON_HOME%\repository\conf\user-mgt.xml" -Dwso2.transports.xml="%CARBON_HOME%\repository\conf\mgt-transports.xml" -Djava.util.logging.config.file="%CARBON_HOME%\repository\conf\etc\logging-bridge.properties" -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Dcarbon.config.dir.path="%CARBON_HOME%\repository\conf" -Dcomponents.repo="%CARBON_HOME%\repository\components" -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 -Dcarbon.classpath=%CARBON_CLASSPATH% -Dfile.encoding=UTF8 -Dorg.wso2.ignoreHostnameVerification=true -Dorg.opensaml.httpclient.https.disableHostnameVerification=true -Diot.analytics.host="localhost" -Diot.analytics.https.port="9445" -Dmqtt.broker.host="localhost" -Dmqtt.broker.port="1886" -Diot.core.host="localhost" -Diot.core.https.port="9443" -Diot.keymanager.host="localhost" -Diot.keymanager.https.port="9443" -Diot.gateway.host="localhost" -Diot.gateway.https.port="8243" -Diot.gateway.http.port="8280" -Diot.apimpublisher.host="localhost" -Diot.apimpublisher.https.port="9443" -Diot.apimstore.host="localhost" -Diot.apimstore.https.port="8243" +set CMD_LINE_ARGS=-Xbootclasspath/a:%CARBON_XBOOTCLASSPATH% -Xms256m -Xmx1024m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath="%CARBON_HOME%\repository\logs\heap-dump.hprof" -Dcom.sun.management.jmxremote -classpath %CARBON_CLASSPATH% %JAVA_OPTS% -Djava.endorsed.dirs=%JAVA_ENDORSED% -Dcarbon.registry.root=/ -Dcarbon.home="%CARBON_HOME%" -Dlogger.server.name="IoT-Core" -Dwso2.server.standalone=true -Djava.command="%JAVA_HOME%\bin\java" -Djava.opts="%JAVA_OPTS%" -Djava.io.tmpdir="%CARBON_HOME%\tmp" -Dcatalina.base="%CARBON_HOME%\lib\tomcat" -Dwso2.carbon.xml=%CARBON_HOME%\repository\conf\carbon.xml -Dwso2.registry.xml="%CARBON_HOME%\repository\conf\registry.xml" -Dwso2.user.mgt.xml="%CARBON_HOME%\repository\conf\user-mgt.xml" -Dwso2.transports.xml="%CARBON_HOME%\repository\conf\mgt-transports.xml" -Djava.util.logging.config.file="%CARBON_HOME%\repository\conf\etc\logging-bridge.properties" -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Dcarbon.config.dir.path="%CARBON_HOME%\repository\conf" -Dcomponents.repo="%CARBON_HOME%\repository\components" -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 -Dcarbon.classpath=%CARBON_CLASSPATH% -Dfile.encoding=UTF8 -Dorg.wso2.ignoreHostnameVerification=true -Dorg.opensaml.httpclient.https.disableHostnameVerification=true -Diot.analytics.host="localhost" -Diot.analytics.https.port="9445" -Diot.manager.host="localhost" -Diot.manager.https.port="9445" -Dmqtt.broker.host="localhost" -Dmqtt.broker.port="1886" -Diot.core.host="localhost" -Diot.core.https.port="9443" -Diot.keymanager.host="localhost" -Diot.keymanager.https.port="9443" -Diot.gateway.host="localhost" -Diot.gateway.https.port="8243" -Diot.gateway.http.port="8280" -Diot.apimpublisher.host="localhost" -Diot.apimpublisher.https.port="9443" -Diot.apimstore.host="localhost" -Diot.apimstore.https.port="8243" :runJava echo JAVA_HOME environment variable is set to %JAVA_HOME% diff --git a/modules/core/distribution/src/repository/bin/wso2server.sh b/modules/core/distribution/src/repository/bin/wso2server.sh index fc7c8894..329a6ecf 100755 --- a/modules/core/distribution/src/repository/bin/wso2server.sh +++ b/modules/core/distribution/src/repository/bin/wso2server.sh @@ -309,6 +309,8 @@ do -Dorg.opensaml.httpclient.https.disableHostnameVerification=true \ -Diot.analytics.host="localhost" \ -Diot.analytics.https.port="9445" \ + -Diot.manager.host="localhost" \ + -Diot.manager.https.port="9443" \ -Dmqtt.broker.host="localhost" \ -Dmqtt.broker.port="1886" \ -Diot.core.host="localhost" \ diff --git a/modules/core/distribution/src/repository/conf/security/authenticators.xml b/modules/core/distribution/src/repository/conf/security/authenticators.xml index 4c227fe9..4063c7e6 100644 --- a/modules/core/distribution/src/repository/conf/security/authenticators.xml +++ b/modules/core/distribution/src/repository/conf/security/authenticators.xml @@ -40,7 +40,17 @@ 5 - + + + 5 + + UserName + false + + + + + 10 diff --git a/modules/core/distribution/src/repository/conf/tomcat/catalina-server.xml b/modules/core/distribution/src/repository/conf/tomcat/catalina-server.xml new file mode 100644 index 00000000..c68a93ef --- /dev/null +++ b/modules/core/distribution/src/repository/conf/tomcat/catalina-server.xml @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/modules/core/p2-profile-gen/pom.xml b/modules/core/p2-profile-gen/pom.xml index 8897532b..c8c15301 100644 --- a/modules/core/p2-profile-gen/pom.xml +++ b/modules/core/p2-profile-gen/pom.xml @@ -730,6 +730,9 @@ org.wso2.carbon.analytics.cdmf:org.wso2.carbon.analytics.cdmf.feature:${cdmf.analytics.version} + + org.wso2.carbon.identity:org.wso2.carbon.identity.authenticator.mutualssl.feature:${identity.carbon.auth.mutual.ssl.version} + @@ -1564,6 +1567,10 @@ org.wso2.carbon.analytics.cdmf.feature.group ${cdmf.analytics.version} + + org.wso2.carbon.identity.authenticator.mutualssl.feature.group + ${identity.carbon.auth.mutual.ssl.version} + @@ -3810,6 +3817,10 @@ ${carbon.device.mgt.plugin.version} + + org.wso2.carbon.identity.authenticator.mutualssl.feature.group + ${identity.carbon.auth.mutual.ssl.version} + diff --git a/pom.xml b/pom.xml index f0142183..4c921de1 100644 --- a/pom.xml +++ b/pom.xml @@ -1676,7 +1676,7 @@ 1.0.2 - 1.0.3 + 1.0.4-SNAPSHOT