Revert: removing MB references from IOTserver pack (1fe9a80102)

merge-requests/1/head
sinthuja 8 years ago
parent 4ff880f57f
commit c992e68ec7

@ -216,7 +216,7 @@
<include>**/api-manager.xml</include>
<include>**/sso-idp-config.xml</include>
<include>**/application-authentication.xml</include>
<!--include>**/broker.xml</include-->
<include>**/broker.xml</include>
<include>**/log4j.properties</include>
<include>**/nhttp.properties</include>
<include>**/passthru-http.properties</include>
@ -574,7 +574,7 @@
<fileMode>644</fileMode>
</fileSet>
<!--fileSet>
<fileSet>
<directory>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/dbscripts/mb-store
</directory>
<outputDirectory>${pom.artifactId}-${pom.version}/dbscripts/mb-store</outputDirectory>
@ -582,10 +582,10 @@
<include>**/*.*</include>
</includes>
<fileMode>644</fileMode>
</fileSet-->
</fileSet>
<!-- messaging related configs -->
<!--fileSet>
<fileSet>
<directory>
../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/
</directory>
@ -595,10 +595,10 @@
<include>**/broker.xml</include>
</includes>
<fileMode>644</fileMode>
</fileSet-->
</fileSet>
<!--QPID related configurations-->
<!--fileSet>
<fileSet>
<directory>
../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/advanced/
</directory>
@ -609,7 +609,7 @@
<include>**/qpid-jmxremote.access</include>
</includes>
<fileMode>644</fileMode>
</fileSet-->
</fileSet>
<!-- Dashboard portal Jaggery app. Should be copied to <DAS_HOME>/repository/deployment/server/jaggeryapps -->
<fileSet>
@ -856,12 +856,12 @@
<fileMode>644</fileMode>
</file>
<!-- Copying event-broker.xml -->
<!--file>
<file>
<source>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/messaging-event-broker.xml</source>
<outputDirectory>${pom.artifactId}-${pom.version}/repository/conf</outputDirectory>
<filtered>true</filtered>
<fileMode>644</fileMode>
</file-->
</file>
<!-- Copying application-authentication.xml -->
<file>
<source>
@ -937,11 +937,11 @@
<fileMode>644</fileMode>
</file>
<!-- Copying broker.xml -->
<!--file>
<file>
<source>src/repository/conf/broker.xml</source>
<outputDirectory>${pom.artifactId}-${pom.version}/repository/conf</outputDirectory>
<fileMode>644</fileMode>
</file-->
</file>
<file>
<source>
../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/tomcat/webapp-classloading.xml
@ -994,11 +994,11 @@
<outputDirectory>${pom.artifactId}-${pom.version}/repository/database/</outputDirectory>
<fileMode>644</fileMode>
</file>
<!--file>
<file>
<source>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/database/WSO2MB_DB.h2.db</source>
<outputDirectory>${pom.artifactId}-${pom.version}/repository/database/</outputDirectory>
<fileMode>644</fileMode>
</file-->
</file>
<!-- nTask Component -->
<file>
<source>

@ -45,7 +45,6 @@
<dependency>
<groupId>org.wso2.andes.wso2</groupId>
<artifactId>andes</artifactId>
<version>3.1.2</version>
</dependency>
<dependency>
<groupId>org.wso2.carbon</groupId>

@ -53,19 +53,15 @@ public class DeviceAccessBasedMQTTAuthorizer implements IAuthorizer {
@Override
public boolean isAuthorizedForTopic(MQTTAuthorizationSubject authorizationSubject, String topic,
MQTTAuthoriztionPermissionLevel permissionLevel) {
if (isUserAuthorized(authorizationSubject, ADMIN_PERMISSION, UI_EXECUTE)) {
System.out.println("isAuthorizedForTopic - user is auth success !");
return true;
}
String topics[] = topic.split("/");
if (topics.length < 3) {
System.out.println("isAuthorizedForTopic topic name invalid");
return false;
}
String tenantIdFromTopic = topics[0];
if (!tenantIdFromTopic.equals(authorizationSubject.getTenantDomain())) {
System.out.println("isAuthorizedForTopic tenantID invalid");
return false;
}
String deviceType = topics[1];
@ -82,12 +78,10 @@ public class DeviceAccessBasedMQTTAuthorizer implements IAuthorizer {
+ permissionScope;
for (String scope : scopes) {
if (requiredScope.equals(scope)) {
System.out.println("isAuthorizedForTopic - Pass");
return true;
}
}
}
System.out.println("isAuthorizedForTopic - Failed");
return false;
}
@ -119,12 +113,10 @@ public class DeviceAccessBasedMQTTAuthorizer implements IAuthorizer {
if (userRealm != null && userRealm.getAuthorizationManager() != null) {
return userRealm.getAuthorizationManager().isUserAuthorized(username, permission, action);
}
System.out.println("isUserAuthorized failse");
return false;
} catch (UserStoreException e) {
String errorMsg = String.format("Unable to authorize the user : %s", username);
logger.error(errorMsg, e);
System.out.println("isUserAuthorized failed");
return false;
} finally {
PrivilegedCarbonContext.endTenantFlow();

@ -695,6 +695,9 @@
<!-- End of Dashboards Features -->
<!-- MB Features -->
<featureArtifactDef>
org.wso2.carbon.messaging:org.wso2.carbon.andes.server.feature:${carbon.messaging.version}
</featureArtifactDef>
<featureArtifactDef>
org.wso2.carbon.metrics:org.wso2.carbon.metrics.feature:${carbon.metrics.version}
</featureArtifactDef>
@ -828,6 +831,10 @@
<id>org.wso2.iot.styles.feature.group</id>
<version>${carbon.iot.device.mgt.version}</version>
</feature>
<feature>
<id>org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization.feature.group</id>
<version>${carbon.iot.device.mgt.version}</version>
</feature>
<!-- End of IoTServer Features -->
<!-- Device Management Features -->
@ -1524,6 +1531,10 @@
</feature>
<!-- End of Dashboard Features -->
<feature>
<id>org.wso2.carbon.andes.server.feature.group</id>
<version>${carbon.messaging.version}</version>
</feature>
<feature>
<id>org.wso2.carbon.metrics.feature.group</id>
<version>${carbon.metrics.version}</version>
@ -1566,11 +1577,23 @@
<id>org.wso2.iot.styles.feature.group</id>
<version>${carbon.iot.device.mgt.version}</version>
</feature>
<feature>
<id>org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization.feature.group</id>
<version>${carbon.iot.device.mgt.version}</version>
</feature>
<!-- End of IoTServer Features -->
<feature>
<id>org.wso2.carbon.logging.mgt.feature.group</id>
<version>${carbon.commons.version}</version>
</feature>
<feature>
<id>org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization.feature.group</id>
<version>${carbon.iot.device.mgt.version}</version>
</feature>
<feature>
<id>org.wso2.carbon.andes.server.feature.group</id>
<version>${carbon.messaging.version}</version>
</feature>
<feature>
<id>org.wso2.carbon.metrics.feature.group</id>
<version>${carbon.metrics.version}</version>

@ -1015,6 +1015,11 @@
<artifactId>org.eclipse.paho.client.mqttv3</artifactId>
<version>${eclipse.paho.version}</version>
</dependency>
<dependency>
<groupId>org.wso2.andes.wso2</groupId>
<artifactId>andes</artifactId>
<version>${carbon.messaging.version}</version>
</dependency>
</dependencies>
</dependencyManagement>

Loading…
Cancel
Save