From ac5c4b0d3c315d489c87065f7976d5605ebe8309 Mon Sep 17 00:00:00 2001 From: Madawa Soysa Date: Thu, 15 Dec 2016 17:21:21 +0530 Subject: [PATCH 1/4] Removing UI components from MB This commit removes the ui components of the message broker module in order to bring the module in to a headless state. --- modules/broker/p2-profile/pom.xml | 50 ------------------------------- pom.xml | 20 ------------- 2 files changed, 70 deletions(-) diff --git a/modules/broker/p2-profile/pom.xml b/modules/broker/p2-profile/pom.xml index 66366263..a007c3db 100644 --- a/modules/broker/p2-profile/pom.xml +++ b/modules/broker/p2-profile/pom.xml @@ -103,9 +103,6 @@ org.wso2.carbon.registry:org.wso2.carbon.registry.contentsearch.feature:${carbon.registry.version} - - org.wso2.carbon.registry:org.wso2.carbon.registry.ui.menu.feature:${carbon.registry.version} - org.wso2.carbon.registry:org.wso2.carbon.registry.resource.properties.feature:${carbon.registry.version} @@ -118,9 +115,6 @@ org.wso2.carbon.messaging:org.wso2.carbon.andes.feature:${carbon.messaging.version} - - org.wso2.carbon.multitenancy:org.wso2.carbon.tenant.common.feature:${carbon.multitenancy.version} - org.wso2.carbon.commons:org.wso2.carbon.tenant.mgt.common.feature:${carbon.commons.version} @@ -136,18 +130,12 @@ org.wso2.carbon.identity:org.wso2.carbon.identity.authenticator.saml2.sso.server.feature:${identity.carbon.auth.saml2.version} - - org.wso2.carbon.identity:org.wso2.carbon.identity.authenticator.saml2.sso.ui.feature:${identity.carbon.auth.saml2.version} - org.wso2.carbon.identity:org.wso2.carbon.user.mgt.feature:${carbon.identity.framework.version} org.wso2.carbon.identity:org.wso2.carbon.identity.core.feature:${carbon.identity.framework.version} - - org.wso2.carbon.identity:org.wso2.carbon.identity.core.ui.feature:${carbon.identity.framework.version} - org.wso2.carbon:org.wso2.carbon.core.feature:${carbon.kernel.version} @@ -161,13 +149,6 @@ org.wso2.carbon.metrics:org.wso2.carbon.metrics.feature:${carbon.metrics.version} - - - org.wso2.mb:org.wso2.mb.styles.feature:${product.mb.version} - - - org.wso2.mb:org.wso2.stratos.mb.dashboard.ui.feature:${product.mb.version} - org.wso2.ciphertool:org.wso2.ciphertool.feature:${cipher.tool.version} @@ -232,10 +213,6 @@ org.wso2.carbon.registry.core.feature.group ${carbon.registry.version} - - org.wso2.carbon.registry.ui.menu.feature.group - ${carbon.registry.version} - org.wso2.carbon.registry.resource.properties.feature.group @@ -245,10 +222,6 @@ org.wso2.carbon.wsdl.tools.feature.group ${carbon.commons.version} - - org.wso2.carbon.registry.core.ui.feature.group - ${carbon.registry.version} - org.wso2.carbon.um.ws.service.feature.group ${carbon.um.ws.version} @@ -263,10 +236,6 @@ ${carbon.multitenancy.version} - - org.wso2.carbon.tenant.common.feature.group - ${carbon.multitenancy.version} - org.wso2.carbon.identity.authenticator.saml2.sso.server.feature.group @@ -281,12 +250,6 @@ org.wso2.carbon.tenant.throttling.agent.feature.group ${carbon.multitenancy.version} - - - org.wso2.carbon.identity.authenticator.saml2.sso.ui.feature.group - - ${identity.carbon.auth.saml2.version} - org.wso2.carbon.user.mgt.feature.group ${carbon.identity.framework.version} @@ -295,10 +258,6 @@ org.wso2.carbon.identity.core.feature.group ${carbon.identity.framework.version} - - org.wso2.carbon.identity.core.ui.feature.group - ${carbon.identity.framework.version} - org.wso2.carbon.messaging.metrics.feature.group ${carbon.messaging.version} @@ -307,15 +266,6 @@ org.wso2.carbon.metrics.feature.group ${carbon.metrics.version} - - - org.wso2.stratos.mb.dashboard.ui.feature.group - ${product.mb.version} - - - org.wso2.mb.styles.feature.group - ${product.mb.version} - org.wso2.ciphertool.feature.group diff --git a/pom.xml b/pom.xml index 5b90e548..70c79762 100644 --- a/pom.xml +++ b/pom.xml @@ -1274,36 +1274,16 @@ servlet-api ${servlet-api.version} - - org.wso2.iot - org.wso2.stratos.mb.dashboard.ui - ${product.iot.broker.version} - org.wso2.carbon org.wso2.carbon.ui.menu.stratos ${carbon.ui.menu.stratos.version} - - org.wso2.iot - org.wso2.stratos.mb.deployment - ${product.iot.broker.version} - - - org.wso2.iot - org.wso2.stratos.mb.login.ui - ${product.iot.broker.version} - org.wso2.iot org.wso2.iot.broker.styles ${product.iot.broker.version} - - org.wso2.iot - org.wso2.stratos.mb.styles - ${product.iot.broker.version} - org.wso2.iot From 60b0ddb3aba7df6f2cb62356d1448fe2dbb8b7af Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Tue, 20 Dec 2016 09:38:08 +0530 Subject: [PATCH 2/4] Version bump of [carbon-analytics-common] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5b90e548..a31dbb17 100644 --- a/pom.xml +++ b/pom.xml @@ -1558,7 +1558,7 @@ 4.6.6 - 5.1.5-SNAPSHOT + 5.1.5 1.3.0 1.3.0 ${product.iot.version} From ea333d897e209e42ccafa95a8e651ff4c273db06 Mon Sep 17 00:00:00 2001 From: charitha Date: Tue, 20 Dec 2016 12:31:13 +0530 Subject: [PATCH 3/4] Remove carbon console UI from MB --- .../distribution/src/main/assembly/bin.xml | 7 + .../broker/distribution/src/main/conf/web.xml | 177 ++++++++++++++++++ modules/broker/p2-profile/pom.xml | 7 + 3 files changed, 191 insertions(+) create mode 100644 modules/broker/distribution/src/main/conf/web.xml diff --git a/modules/broker/distribution/src/main/assembly/bin.xml b/modules/broker/distribution/src/main/assembly/bin.xml index 15dda311..8d198090 100644 --- a/modules/broker/distribution/src/main/assembly/bin.xml +++ b/modules/broker/distribution/src/main/assembly/bin.xml @@ -210,6 +210,7 @@ **/broker.xml + tomcat/carbon/WEB-INF/web.xml **/axis2.xml **/carbon.xml **/cipher-text.properties @@ -352,6 +353,12 @@ ${pom.artifactId}-${pom.version}/repository/conf/ true + + src/main/conf/web.xml + + ${pom.artifactId}-${pom.version}/repository/conf/tomcat/carbon/WEB-INF/ + true + src/main/conf/metrics.xml diff --git a/modules/broker/distribution/src/main/conf/web.xml b/modules/broker/distribution/src/main/conf/web.xml new file mode 100644 index 00000000..ce5eba2e --- /dev/null +++ b/modules/broker/distribution/src/main/conf/web.xml @@ -0,0 +1,177 @@ + + + + + + + Restrict access to carbon console + + Restricted Console UI + /carbon/* + + + + + + + Owasp.CsrfGuard.Config + repository/conf/security/Owasp.CsrfGuard.Carbon.properties + + + + bridgeservlet + Carbon Bridge Servlet + Carbon Bridge Servlet + org.wso2.carbon.tomcat.ext.servlet.DelegationServlet + + 1 + + + + + JavaScriptServlet + org.owasp.csrfguard.servlet.JavaScriptServlet + + + + bridgeservlet + /* + + + + bridgeservlet + *.jsp + + + + JavaScriptServlet + /carbon/admin/js/csrfPrevention.js + + + + + CharsetFilter + org.wso2.carbon.tomcat.ext.filter.CharacterSetFilter + + requestEncoding + UTF-8 + + + + + + CSRFGuard + org.owasp.csrfguard.CsrfGuardFilter + + + + + HttpHeaderSecurityFilter + org.apache.catalina.filters.HttpHeaderSecurityFilter + + hstsEnabled + false + + + + + HttpHeaderSecurityFilter + * + + + + CharsetFilter + /* + + + + CSRFGuard + /* + + + + + org.owasp.csrfguard.CsrfGuardServletContextListener + + + + + org.owasp.csrfguard.CsrfGuardHttpSessionListener + + + + 15 + + true + + + + + + 400 + /carbon/errors/error_400.html + + + 401 + /carbon/errors/error_401.html + + + 403 + /carbon/errors/error_403.html + + + 404 + /carbon/errors/error_404.html + + + 405 + /carbon/errors/error_405.html + + + 408 + /carbon/errors/error_408.html + + + 410 + /carbon/errors/error_410.html + + + 500 + /carbon/errors/error_500.html + + + 502 + /carbon/errors/error_502.html + + + 503 + /carbon/errors/error_503.html + + + 504 + /carbon/errors/error_504.html + + + + /carbon/errors/error.html + + diff --git a/modules/broker/p2-profile/pom.xml b/modules/broker/p2-profile/pom.xml index a007c3db..938d31b6 100644 --- a/modules/broker/p2-profile/pom.xml +++ b/modules/broker/p2-profile/pom.xml @@ -115,6 +115,9 @@ org.wso2.carbon.messaging:org.wso2.carbon.andes.feature:${carbon.messaging.version} + + org.wso2.carbon.multitenancy:org.wso2.carbon.tenant.common.server.feature:${carbon.multitenancy.version} + org.wso2.carbon.commons:org.wso2.carbon.tenant.mgt.common.feature:${carbon.commons.version} @@ -236,6 +239,10 @@ ${carbon.multitenancy.version} + + org.wso2.carbon.tenant.common.server.feature.group + ${carbon.multitenancy.version} + org.wso2.carbon.identity.authenticator.saml2.sso.server.feature.group From a3b3d92be0223e53b83208831a979cbb16fc8e05 Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Thu, 22 Dec 2016 08:31:14 +0530 Subject: [PATCH 4/4] Disable hostname verification for opensaml http-client --- modules/core/distribution/src/repository/bin/wso2server.bat | 2 +- modules/core/distribution/src/repository/bin/wso2server.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/core/distribution/src/repository/bin/wso2server.bat b/modules/core/distribution/src/repository/bin/wso2server.bat index 9406db61..39cf7c63 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 +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 :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 b4b84fc9..65add0f6 100755 --- a/modules/core/distribution/src/repository/bin/wso2server.sh +++ b/modules/core/distribution/src/repository/bin/wso2server.sh @@ -306,6 +306,7 @@ do -Dcom.ibm.cacheLocalHost=true \ -DworkerNode=false \ -Dorg.wso2.ignoreHostnameVerification=true \ + -Dorg.opensaml.httpclient.https.disableHostnameVerification=true \ org.wso2.carbon.bootstrap.Bootstrap $* status=$? done