revert-70aa11f8
Nirothipan 7 years ago
commit 4b0cab79cb

@ -22,13 +22,13 @@
<parent>
<artifactId>apimgt-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.apimgt.annotations</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>WSO2 Carbon - API Management Annotations</name>
<description>WSO2 Carbon - API Management Custom Annotation Module</description>

@ -21,12 +21,12 @@
<parent>
<artifactId>apimgt-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<artifactId>org.wso2.carbon.apimgt.application.extension.api</artifactId>
<packaging>war</packaging>
<name>WSO2 Carbon - API Application Management API</name>

@ -22,12 +22,12 @@
<parent>
<artifactId>apimgt-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<artifactId>org.wso2.carbon.apimgt.application.extension</artifactId>
<packaging>bundle</packaging>
<name>WSO2 Carbon - API Application Management</name>

@ -21,13 +21,13 @@
<parent>
<artifactId>apimgt-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.apimgt.handlers</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>WSO2 Carbon - API Security Handler Component</name>
<description>WSO2 Carbon - API Management Security Handler Module</description>

@ -13,13 +13,13 @@
<parent>
<artifactId>apimgt-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.apimgt.integration.client</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>WSO2 Carbon - API Management Integration Client</name>
<description>WSO2 Carbon - API Management Integration Client</description>

@ -13,13 +13,13 @@
<parent>
<artifactId>apimgt-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.apimgt.integration.generated.client</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>WSO2 Carbon - API Management Integration Generated Client</name>
<description>WSO2 Carbon - API Management Integration Client</description>

@ -22,13 +22,13 @@
<parent>
<artifactId>apimgt-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.apimgt.webapp.publisher</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>WSO2 Carbon - API Management Webapp Publisher</name>
<description>WSO2 Carbon - API Management Webapp Publisher</description>

@ -22,13 +22,13 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>apimgt-extensions</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<packaging>pom</packaging>
<name>WSO2 Carbon - API Management Extensions Component</name>
<url>http://wso2.org</url>

@ -22,7 +22,7 @@
<parent>
<artifactId>certificate-mgt</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -22,7 +22,7 @@
<parent>
<artifactId>certificate-mgt</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -21,13 +21,13 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>certificate-mgt</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.certificate.mgt.core</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>WSO2 Carbon - Certificate Management Core</name>
<description>WSO2 Carbon - Certificate Management Core</description>

@ -22,14 +22,14 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>certificate-mgt</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<packaging>pom</packaging>
<name>WSO2 Carbon - Certificate Management Component</name>
<url>http://wso2.org</url>

@ -22,7 +22,7 @@
<parent>
<artifactId>device-mgt-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -22,7 +22,7 @@
<parent>
<artifactId>device-mgt-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -22,7 +22,7 @@
<parent>
<artifactId>device-mgt-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -22,7 +22,7 @@
<parent>
<artifactId>device-mgt-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -22,7 +22,7 @@
<parent>
<artifactId>device-mgt-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -22,7 +22,7 @@
<parent>
<artifactId>device-mgt-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -22,7 +22,7 @@
<parent>
<artifactId>carbon-devicemgt</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

@ -3,7 +3,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>device-mgt</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>device-mgt</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -22,7 +22,7 @@
<parent>
<artifactId>device-mgt</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -29,6 +29,7 @@ import org.wso2.carbon.device.mgt.jaxrs.beans.ErrorResponse;
import org.wso2.carbon.device.mgt.jaxrs.service.api.ActivityInfoProviderService;
import org.wso2.carbon.device.mgt.jaxrs.service.impl.util.RequestValidationUtil;
import org.wso2.carbon.device.mgt.jaxrs.util.DeviceMgtAPIUtils;
import org.wso2.carbon.user.api.UserStoreException;
import javax.validation.constraints.Size;
import javax.ws.rs.*;
@ -54,22 +55,27 @@ public class ActivityProviderServiceImpl implements ActivityInfoProviderService
@HeaderParam("If-Modified-Since") String ifModifiedSince) {
Activity activity;
DeviceManagementProviderService dmService;
try {
RequestValidationUtil.validateActivityId(id);
dmService = DeviceMgtAPIUtils.getDeviceManagementService();
activity = dmService.getOperationByActivityId(id);
if (activity == null) {
return Response.status(404).entity(
new ErrorResponse.ErrorResponseBuilder().setMessage("No activity can be " +
"found upon the provided activity id '" + id + "'").build()).build();
Response response = validateAdminUser();
if (response == null) {
try {
RequestValidationUtil.validateActivityId(id);
dmService = DeviceMgtAPIUtils.getDeviceManagementService();
activity = dmService.getOperationByActivityId(id);
if (activity == null) {
return Response.status(404).entity(
new ErrorResponse.ErrorResponseBuilder().setMessage("No activity can be " +
"found upon the provided activity id '" + id + "'").build()).build();
}
return Response.status(Response.Status.OK).entity(activity).build();
} catch (OperationManagementException e) {
String msg = "ErrorResponse occurred while fetching the activity for the supplied id.";
log.error(msg, e);
return Response.serverError().entity(
new ErrorResponse.ErrorResponseBuilder().setMessage(msg).build()).build();
}
return Response.status(Response.Status.OK).entity(activity).build();
} catch (OperationManagementException e) {
String msg = "ErrorResponse occurred while fetching the activity for the supplied id.";
log.error(msg, e);
return Response.serverError().entity(
new ErrorResponse.ErrorResponseBuilder().setMessage(msg).build()).build();
} else {
return response;
}
}
@ -120,7 +126,6 @@ public class ActivityProviderServiceImpl implements ActivityInfoProviderService
long sinceTimestamp;
long timestamp = 0;
boolean isIfModifiedSinceSet = false;
boolean isSinceSet = false;
if (log.isDebugEnabled()) {
log.debug("getActivities since: " + since + " , offset: " + offset + " ,limit: " + limit + " ," +
"ifModifiedSince: " + ifModifiedSince);
@ -150,7 +155,6 @@ public class ActivityProviderServiceImpl implements ActivityInfoProviderService
"Invalid date string is provided in 'since' filter").build()).build();
}
sinceTimestamp = sinceDate.getTime();
isSinceSet = true;
timestamp = sinceTimestamp / 1000;
}
@ -162,38 +166,57 @@ public class ActivityProviderServiceImpl implements ActivityInfoProviderService
if (log.isDebugEnabled()) {
log.debug("getActivities final timestamp " + timestamp);
}
Response response = validateAdminUser();
if (response == null) {
List<Activity> activities;
ActivityList activityList = new ActivityList();
DeviceManagementProviderService dmService;
try {
if (log.isDebugEnabled()) {
log.debug("Calling database to get activities.");
}
dmService = DeviceMgtAPIUtils.getDeviceManagementService();
activities = dmService.getActivitiesUpdatedAfter(timestamp, limit, offset);
activityList.setList(activities);
if (log.isDebugEnabled()) {
log.debug("Calling database to get activity count.");
}
int count = dmService.getActivityCountUpdatedAfter(timestamp);
if (log.isDebugEnabled()) {
log.debug("Activity count: " + count);
}
activityList.setCount(count);
if (activities == null || activities.size() == 0) {
if (isIfModifiedSinceSet) {
return Response.notModified().build();
}
}
return Response.ok().entity(activityList).build();
} catch (OperationManagementException e) {
String msg
= "ErrorResponse occurred while fetching the activities updated after given time stamp.";
log.error(msg, e);
return Response.serverError().entity(
new ErrorResponse.ErrorResponseBuilder().setMessage(msg).build()).build();
}
} else {
return response;
}
}
List<Activity> activities;
ActivityList activityList = new ActivityList();
DeviceManagementProviderService dmService;
private Response validateAdminUser(){
try {
if (log.isDebugEnabled()) {
log.debug("Calling database to get activities.");
}
dmService = DeviceMgtAPIUtils.getDeviceManagementService();
activities = dmService.getActivitiesUpdatedAfter(timestamp, limit, offset);
activityList.setList(activities);
if (log.isDebugEnabled()) {
log.debug("Calling database to get activity count.");
}
int count = dmService.getActivityCountUpdatedAfter(timestamp);
if (log.isDebugEnabled()) {
log.debug("Activity count: " + count);
if (!DeviceMgtAPIUtils.isAdmin()) {
return Response.status(Response.Status.UNAUTHORIZED).entity("Unauthorized operation! Only admin role can perform " +
"this operation.").build();
}
activityList.setCount(count);
if (activities == null || activities.size() == 0) {
if (isIfModifiedSinceSet) {
return Response.notModified().build();
}
}
return Response.ok().entity(activityList).build();
} catch (OperationManagementException e) {
return null;
} catch (UserStoreException e) {
String msg
= "ErrorResponse occurred while fetching the activities updated after given time stamp.";
= "Error occurred while validating the user have admin role!";
log.error(msg, e);
return Response.serverError().entity(
new ErrorResponse.ErrorResponseBuilder().setMessage(msg).build()).build();
}
}
}

@ -702,4 +702,18 @@ public class DeviceMgtAPIUtils {
SSLContext.setDefault(sslContext);
}
public static boolean isAdmin() throws UserStoreException {
int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(true);
UserRealm realmService = DeviceMgtAPIUtils.getRealmService().getTenantUserRealm(tenantId);
String adminRoleName = realmService.getRealmConfiguration().getAdminRoleName();
String userName = PrivilegedCarbonContext.getThreadLocalCarbonContext().getUsername();
String[] roles = realmService.getUserStoreManager().getRoleListOfUser(userName);
for (String role: roles){
if (role != null && role.equals(adminRoleName)){
return true;
}
}
return false;
}
}

@ -21,7 +21,7 @@
<parent>
<artifactId>device-mgt</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -94,8 +94,6 @@ public interface OperationManager {
Activity getOperationByActivityIdAndDevice(String activity, DeviceIdentifier deviceId)
throws OperationManagementException;
List<Activity> getActivitiesUpdatedAfter(long timestamp) throws OperationManagementException;
List<Activity> getActivitiesUpdatedAfter(long timestamp, int limit, int offset) throws OperationManagementException;
int getActivityCountUpdatedAfter(long timestamp) throws OperationManagementException;

@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>device-mgt</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -741,7 +741,11 @@ public class OperationManagerImpl implements OperationManager {
if (operationId == 0) {
throw new IllegalArgumentException("Operation ID cannot be null or zero (0).");
}
if (!isActionAuthorized(deviceId)) {
throw new OperationManagementException("User '" + getUser() + "' is not authorized to access the '" +
deviceId.getType() + "' device, which carries the identifier '" +
deviceId.getId() + "'");
}
Device device = this.getDevice(deviceId);
try {
OperationManagementDAOFactory.openConnection();
@ -756,21 +760,6 @@ public class OperationManagerImpl implements OperationManager {
}
}
@Override
public List<Activity> getActivitiesUpdatedAfter(long timestamp) throws OperationManagementException {
try {
OperationManagementDAOFactory.openConnection();
return operationDAO.getActivitiesUpdatedAfter(timestamp);
} catch (SQLException e) {
throw new OperationManagementException("Error occurred while opening a connection to the data source.", e);
} catch (OperationManagementDAOException e) {
throw new OperationManagementException("Error occurred while getting the activity list changed after a " +
"given time.", e);
} finally {
OperationManagementDAOFactory.closeConnection();
}
}
@Override
public List<Activity> getActivitiesUpdatedAfter(long timestamp, int limit,
int offset) throws OperationManagementException {

@ -566,8 +566,6 @@ public interface DeviceManagementProviderService {
Activity getOperationByActivityIdAndDevice(String activity, DeviceIdentifier deviceId) throws OperationManagementException;
List<Activity> getActivitiesUpdatedAfter(long timestamp) throws OperationManagementException;
List<Activity> getActivitiesUpdatedAfter(long timestamp, int limit, int offset) throws OperationManagementException;
int getActivityCountUpdatedAfter(long timestamp) throws OperationManagementException;

@ -1458,11 +1458,6 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
return DeviceManagementDataHolder.getInstance().getOperationManager().getOperationByActivityIdAndDevice(activity, deviceId);
}
@Override
public List<Activity> getActivitiesUpdatedAfter(long timestamp) throws OperationManagementException {
return DeviceManagementDataHolder.getInstance().getOperationManager().getActivitiesUpdatedAfter(timestamp);
}
@Override
public List<Activity> getActivitiesUpdatedAfter(long timestamp, int limit, int offset) throws OperationManagementException {
limit = DeviceManagerUtil.validateActivityListPageSize(limit);

@ -63,7 +63,6 @@ import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.TimeZone;
/**
* This is the testcase which covers the methods from {@link OperationManager}
@ -84,6 +83,7 @@ public class OperationManagementTests {
private List<DeviceIdentifier> deviceIds = new ArrayList<>();
private OperationManager operationMgtService;
private Activity commandActivity;
private long commandActivityBeforeUpdatedTimestamp;
@BeforeClass
public void init() throws Exception {
@ -149,15 +149,19 @@ public class OperationManagementTests {
@Test
public void addNonAdminUserDevicesCommandOperation() throws DeviceManagementException, OperationManagementException,
InvalidDeviceException {
PrivilegedCarbonContext.startTenantFlow();
PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantId(MultitenantConstants.SUPER_TENANT_ID, true);
PrivilegedCarbonContext.getThreadLocalCarbonContext().setUsername(NON_ADMIN_USER);
startTenantFlowAsNonAdmin();
Activity activity = this.operationMgtService.addOperation(getOperation(new CommandOperation(), Operation.Type.COMMAND, COMMAND_OPERATON_CODE),
deviceIds);
PrivilegedCarbonContext.endTenantFlow();
validateOperationResponse(activity, ActivityStatus.Status.UNAUTHORIZED);
}
private void startTenantFlowAsNonAdmin() {
PrivilegedCarbonContext.startTenantFlow();
PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantId(MultitenantConstants.SUPER_TENANT_ID, true);
PrivilegedCarbonContext.getThreadLocalCarbonContext().setUsername(NON_ADMIN_USER);
}
@Test(dependsOnMethods = "addCommandOperation")
public void addPolicyOperation() throws DeviceManagementException, OperationManagementException, InvalidDeviceException {
Activity activity = this.operationMgtService.addOperation(getOperation(new PolicyOperation(), Operation.Type.POLICY, POLICY_OPERATION_CODE),
@ -203,6 +207,18 @@ public class OperationManagementTests {
}
}
@Test(dependsOnMethods = "addProfileOperation", expectedExceptions = OperationManagementException.class)
public void getOperationsAsNonAdmin() throws DeviceManagementException, OperationManagementException, InvalidDeviceException {
try {
startTenantFlowAsNonAdmin();
for (DeviceIdentifier deviceIdentifier : deviceIds) {
this.operationMgtService.getOperations(deviceIdentifier);
}
} finally {
PrivilegedCarbonContext.endTenantFlow();
}
}
@Test(dependsOnMethods = "getOperations")
public void getPendingOperations() throws DeviceManagementException, OperationManagementException, InvalidDeviceException {
for (DeviceIdentifier deviceIdentifier : deviceIds) {
@ -211,6 +227,18 @@ public class OperationManagementTests {
}
}
@Test(dependsOnMethods = "getOperations", expectedExceptions = OperationManagementException.class)
public void getPendingOperationsAsNonAdmin() throws DeviceManagementException, OperationManagementException, InvalidDeviceException {
try {
startTenantFlowAsNonAdmin();
for (DeviceIdentifier deviceIdentifier : deviceIds) {
this.operationMgtService.getPendingOperations(deviceIdentifier);
}
} finally {
PrivilegedCarbonContext.endTenantFlow();
}
}
@Test(dependsOnMethods = "getPendingOperations")
public void getPaginatedRequestAsAdmin() throws OperationManagementException {
PrivilegedCarbonContext.startTenantFlow();
@ -228,29 +256,32 @@ public class OperationManagementTests {
PrivilegedCarbonContext.endTenantFlow();
}
@Test(dependsOnMethods = "getPendingOperations")
@Test(dependsOnMethods = "getPendingOperations", expectedExceptions = OperationManagementException.class)
public void getPaginatedRequestAsNonAdmin() throws OperationManagementException {
PrivilegedCarbonContext.startTenantFlow();
PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantId(MultitenantConstants.SUPER_TENANT_ID, true);
PrivilegedCarbonContext.getThreadLocalCarbonContext().setUsername(NON_ADMIN_USER);
PaginationRequest request = new PaginationRequest(1, 2);
request.setDeviceType(DEVICE_TYPE);
request.setOwner(ADMIN_USER);
for (DeviceIdentifier deviceIdentifier : deviceIds) {
try {
this.operationMgtService.getOperations(deviceIdentifier, request);
} catch (OperationManagementException ex) {
if (ex.getMessage() == null) {
Assert.assertTrue(ex.getMessage().contains("User '" + NON_ADMIN_USER + "' is not authorized"));
try {
startTenantFlowAsNonAdmin();
PaginationRequest request = new PaginationRequest(1, 2);
request.setDeviceType(DEVICE_TYPE);
request.setOwner(ADMIN_USER);
for (DeviceIdentifier deviceIdentifier : deviceIds) {
try {
this.operationMgtService.getOperations(deviceIdentifier, request);
} catch (OperationManagementException ex) {
if (ex.getMessage() == null) {
Assert.assertTrue(ex.getMessage().contains("User '" + NON_ADMIN_USER + "' is not authorized"));
}
throw ex;
}
}
} finally {
PrivilegedCarbonContext.endTenantFlow();
}
PrivilegedCarbonContext.endTenantFlow();
}
@Test(dependsOnMethods = "getPaginatedRequestAsAdmin")
public void updateOperation() throws OperationManagementException {
//This is required to introduce a delay for the update operation of the device.
this.commandActivityBeforeUpdatedTimestamp = System.currentTimeMillis();
try {
Thread.sleep(2000);
} catch (InterruptedException ignored) {
@ -266,6 +297,30 @@ public class OperationManagementTests {
Assert.assertEquals(pendingOperations.size(), 3);
}
@Test(dependsOnMethods = "updateOperation", expectedExceptions = OperationManagementException.class)
public void updateOperationAsNonAdmin() throws OperationManagementException {
//This is required to introduce a delay for the update operation of the device.
try {
Thread.sleep(2000);
} catch (InterruptedException ignored) {
}
try {
DeviceIdentifier deviceIdentifier = this.deviceIds.get(0);
List operations = this.operationMgtService.getPendingOperations(deviceIdentifier);
Assert.assertTrue(operations != null && operations.size() == 3);
startTenantFlowAsNonAdmin();
Operation operation = (Operation) operations.get(0);
operation.setStatus(Operation.Status.COMPLETED);
operation.setOperationResponse("The operation is successfully completed, and updated by non admin!");
this.operationMgtService.updateOperation(deviceIdentifier, operation);
List pendingOperations = this.operationMgtService.getPendingOperations(deviceIdentifier);
Assert.assertEquals(pendingOperations.size(), 3);
} finally {
PrivilegedCarbonContext.endTenantFlow();
}
}
@Test(dependsOnMethods = "updateOperation")
public void getNextPendingOperation() throws OperationManagementException {
DeviceIdentifier deviceIdentifier = this.deviceIds.get(0);
@ -284,6 +339,20 @@ public class OperationManagementTests {
Assert.assertTrue(operation.getType().equals(Operation.Type.COMMAND));
}
@Test(dependsOnMethods = "getNextPendingOperation", expectedExceptions = OperationManagementException.class)
public void getOperationByDeviceAndOperationIdNonAdmin() throws OperationManagementException {
startTenantFlowAsNonAdmin();
try {
DeviceIdentifier deviceIdentifier = this.deviceIds.get(0);
String operationId = this.commandActivity.getActivityId().
replace(DeviceManagementConstants.OperationAttributes.ACTIVITY, "");
this.operationMgtService.getOperationByDeviceAndOperationId(deviceIdentifier,
Integer.parseInt(operationId));
} finally {
PrivilegedCarbonContext.endTenantFlow();
}
}
@Test(dependsOnMethods = "getOperationByDeviceAndOperationId")
public void getOperationsByDeviceAndStatus() throws OperationManagementException, DeviceManagementException {
DeviceIdentifier deviceIdentifier = this.deviceIds.get(0);
@ -291,6 +360,17 @@ public class OperationManagementTests {
Assert.assertEquals(operation.size(), 3);
}
@Test(dependsOnMethods = "getOperationByDeviceAndOperationId", expectedExceptions = OperationManagementException.class)
public void getOperationsByDeviceAndStatusByNonAdmin() throws OperationManagementException, DeviceManagementException {
startTenantFlowAsNonAdmin();
try {
DeviceIdentifier deviceIdentifier = this.deviceIds.get(0);
this.operationMgtService.getOperationsByDeviceAndStatus(deviceIdentifier, Operation.Status.PENDING);
} finally {
PrivilegedCarbonContext.endTenantFlow();
}
}
@Test(dependsOnMethods = "getOperationsByDeviceAndStatus")
public void getOperation() throws OperationManagementException, DeviceManagementException {
String operationId = this.commandActivity.getActivityId().
@ -319,31 +399,21 @@ public class OperationManagementTests {
Assert.assertEquals(activity.getActivityStatus().get(0).getStatus(), ActivityStatus.Status.COMPLETED);
}
@Test(dependsOnMethods = "updateOperation")
public void getOperationUpdatedAfterWithLimitAndOffet() throws OperationManagementException, ParseException {
String timestamp = this.commandActivity.getCreatedTimeStamp();
SimpleDateFormat dateFormat = new SimpleDateFormat("EEE MMM dd hh:mm:ss Z yyyy");
dateFormat.setTimeZone(TimeZone.getTimeZone("IST"));
Date date = dateFormat.parse(timestamp);
List<Activity> operations = this.operationMgtService.getActivitiesUpdatedAfter(date.getTime() / 1000, 10, 0);
Assert.assertTrue(operations != null && operations.size() == 1,
"The operations updated after the created should be 1");
Activity operation = operations.get(0);
Assert.assertTrue(operation.getActivityStatus() != null && operation.getActivityStatus().size() == 1,
"The operation should be having the activity status of atleast one device");
Assert.assertEquals(operation.getActivityStatus().get(0).getDeviceIdentifier().getId(),
deviceIds.get(0).getId());
Assert.assertEquals(operation.getActivityStatus().get(0).getDeviceIdentifier().getType(),
deviceIds.get(0).getType());
@Test(dependsOnMethods = "getOperationActivity", expectedExceptions = OperationManagementException.class)
public void getOperationByActivityIdAndDeviceAsNonAdmin() throws OperationManagementException {
startTenantFlowAsNonAdmin();
try {
this.operationMgtService.
getOperationByActivityIdAndDevice(this.commandActivity.getActivityId(), this.deviceIds.get(0));
} finally {
PrivilegedCarbonContext.endTenantFlow();
}
}
@Test(dependsOnMethods = "updateOperation")
public void getOperationUpdatedAfter() throws OperationManagementException, ParseException {
String timestamp = this.commandActivity.getCreatedTimeStamp();
SimpleDateFormat dateFormat = new SimpleDateFormat("EEE MMM dd hh:mm:ss Z yyyy");
dateFormat.setTimeZone(TimeZone.getTimeZone("IST"));
Date date = dateFormat.parse(timestamp);
List<Activity> operations = this.operationMgtService.getActivitiesUpdatedAfter(date.getTime() / 1000);
public void getOperationUpdatedAfterWithLimitAndOffset() throws OperationManagementException, ParseException {
List<Activity> operations = this.operationMgtService.getActivitiesUpdatedAfter
(this.commandActivityBeforeUpdatedTimestamp / 1000, 10, 0);
Assert.assertTrue(operations != null && operations.size() == 1,
"The operations updated after the created should be 1");
Activity operation = operations.get(0);
@ -355,13 +425,10 @@ public class OperationManagementTests {
deviceIds.get(0).getType());
}
@Test(dependsOnMethods = "getOperationUpdatedAfter")
@Test(dependsOnMethods = "getOperationUpdatedAfterWithLimitAndOffset")
public void getActivityCountUpdatedAfter() throws OperationManagementException, ParseException {
String timestamp = this.commandActivity.getCreatedTimeStamp();
SimpleDateFormat dateFormat = new SimpleDateFormat("EEE MMM dd hh:mm:ss Z yyyy");
dateFormat.setTimeZone(TimeZone.getTimeZone("IST"));
Date date = dateFormat.parse(timestamp);
int activityCount = this.operationMgtService.getActivityCountUpdatedAfter(date.getTime() / 1000);
int activityCount = this.operationMgtService.getActivityCountUpdatedAfter
(this.commandActivityBeforeUpdatedTimestamp / 1000);
Assert.assertTrue(activityCount == 1,
"The activities updated after the created should be 1");
}

@ -40,7 +40,6 @@ import org.wso2.carbon.user.core.service.RealmService;
import org.wso2.carbon.utils.multitenancy.MultitenantConstants;
import java.io.InputStream;
import java.lang.reflect.Method;
import java.util.Date;
public class DeviceManagementProviderServiceTest extends BaseDeviceManagementTest {
@ -50,9 +49,6 @@ public class DeviceManagementProviderServiceTest extends BaseDeviceManagementTes
private static final String DEVICE_TYPE = "RANDOM_DEVICE_TYPE";
DeviceManagementProviderService deviceMgtService;
private Method setProvisioningConfig;
private Method setOperationMonitoringConfig;
private Method setDeviceStatusTaskPluginConfig;
@BeforeClass
public void init() throws Exception {
@ -129,39 +125,39 @@ public class DeviceManagementProviderServiceTest extends BaseDeviceManagementTes
}
}
@Test(dependsOnMethods = {"testReEnrollmentofSameDeviceUnderSameUser"})
public void testReEnrollmentofSameDeviceWithOtherUser() {
EnrolmentInfo enrolmentInfo = new EnrolmentInfo();
enrolmentInfo.setDateOfEnrolment(new Date().getTime());
enrolmentInfo.setDateOfLastUpdate(new Date().getTime());
enrolmentInfo.setOwner("user1");
enrolmentInfo.setOwnership(EnrolmentInfo.OwnerShip.BYOD);
enrolmentInfo.setStatus(EnrolmentInfo.Status.CREATED);
Device alternateDevice = TestDataHolder.generateDummyDeviceData("12345", DEVICE_TYPE,
enrolmentInfo);
try {
Device retrievedDevice1 = deviceMgtService.getDevice(new DeviceIdentifier("12345", DEVICE_TYPE));
deviceMgtService.enrollDevice(alternateDevice);
Device retrievedDevice2 = deviceMgtService.getDevice(new DeviceIdentifier(alternateDevice
.getDeviceIdentifier(), alternateDevice.getType()));
log.info(retrievedDevice1.getEnrolmentInfo().getOwner());
log.info(retrievedDevice2.getEnrolmentInfo().getOwner());
Assert.assertFalse(retrievedDevice1.getEnrolmentInfo().getOwner().equalsIgnoreCase
(retrievedDevice2.getEnrolmentInfo().getOwner()));
} catch (DeviceManagementException e) {
String msg = "Error Occured while enrolling device";
Assert.fail(msg, e);
}
}
// @Test(dependsOnMethods = {"testReEnrollmentofSameDeviceUnderSameUser"})
// public void testReEnrollmentofSameDeviceWithOtherUser() {
//
// EnrolmentInfo enrolmentInfo = new EnrolmentInfo();
// enrolmentInfo.setDateOfEnrolment(new Date().getTime());
// enrolmentInfo.setDateOfLastUpdate(new Date().getTime());
// enrolmentInfo.setOwner("user1");
// enrolmentInfo.setOwnership(EnrolmentInfo.OwnerShip.BYOD);
// enrolmentInfo.setStatus(EnrolmentInfo.Status.CREATED);
//
// Device alternateDevice = TestDataHolder.generateDummyDeviceData("12345", DEVICE_TYPE,
// enrolmentInfo);
//
// try {
// Device retrievedDevice1 = deviceMgtService.getDevice(new DeviceIdentifier("12345", DEVICE_TYPE));
//
// deviceMgtService.enrollDevice(alternateDevice);
// Device retrievedDevice2 = deviceMgtService.getDevice(new DeviceIdentifier(alternateDevice
// .getDeviceIdentifier(), alternateDevice.getType()));
//
// log.info(retrievedDevice1.getEnrolmentInfo().getOwner());
// log.info(retrievedDevice2.getEnrolmentInfo().getOwner());
//
// Assert.assertFalse(retrievedDevice1.getEnrolmentInfo().getOwner().equalsIgnoreCase
// (retrievedDevice2.getEnrolmentInfo().getOwner()));
// } catch (DeviceManagementException e) {
// String msg = "Error Occured while enrolling device";
// Assert.fail(msg, e);
// }
// }
@Test(dependsOnMethods = {"testReEnrollmentofSameDeviceWithOtherUser"})
@Test(dependsOnMethods = {"testReEnrollmentofSameDeviceUnderSameUser"})
public void testDisenrollment() {
Device device = TestDataHolder.generateDummyDeviceData(DEVICE_TYPE);

@ -22,7 +22,7 @@
<parent>
<artifactId>device-mgt</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -22,7 +22,7 @@
<parent>
<artifactId>device-mgt</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -23,7 +23,7 @@
<parent>
<artifactId>device-mgt</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>email-sender</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

@ -22,13 +22,13 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>identity-extensions</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.mgt.oauth.extensions</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>WSO2 Carbon - OAuth Extensions</name>
<url>http://wso2.org</url>

@ -21,7 +21,7 @@
<parent>
<artifactId>identity-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>identity-extensions</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

@ -22,14 +22,14 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>policy-mgt</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.complex.policy.decision.point</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>WSO2 Carbon - Policy Decision Point</name>
<description>WSO2 Carbon - Policy Decision Point</description>

@ -3,14 +3,14 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>policy-mgt</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.policy.decision.point</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>WSO2 Carbon - Policy Decision Point</name>
<description>WSO2 Carbon - Policy Decision Point</description>

@ -3,7 +3,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>policy-mgt</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
@ -11,7 +11,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.policy.information.point</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>WSO2 Carbon - Policy Information Point</name>
<description>WSO2 Carbon - Policy Information Point</description>

@ -22,14 +22,14 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>policy-mgt</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.policy.mgt.common</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>WSO2 Carbon - Policy Management Common</name>
<description>WSO2 Carbon - Policy Management Common</description>

@ -22,14 +22,14 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>policy-mgt</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.policy.mgt.core</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>WSO2 Carbon - Policy Management Core</name>
<description>WSO2 Carbon - Policy Management Core</description>

@ -23,13 +23,13 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>policy-mgt</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<packaging>pom</packaging>
<name>WSO2 Carbon - Policy Management Component</name>
<url>http://wso2.org</url>

@ -21,7 +21,7 @@
<parent>
<artifactId>carbon-devicemgt</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

@ -21,14 +21,14 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>webapp-authenticator-framework</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.webapp.authenticator.framework</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>WSO2 Carbon - Web Application Authenticator Framework Bundle</name>
<description>WSO2 Carbon - Web Application Authenticator Framework Bundle</description>

@ -22,14 +22,14 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>webapp-authenticator-framework</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<packaging>pom</packaging>
<name>WSO2 Carbon - Webapp Authenticator Framework</name>
<url>http://wso2.org</url>

@ -21,14 +21,14 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>apimgt-extensions-feature</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.apimgt.application.extension.feature</artifactId>
<packaging>pom</packaging>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<name>WSO2 Carbon - API Management Application Extension Feature</name>
<url>http://wso2.org</url>
<description>This feature contains an implementation of a api application registration, which takes care of subscription

@ -22,14 +22,14 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>apimgt-extensions-feature</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.apimgt.handler.server.feature</artifactId>
<packaging>pom</packaging>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<name>WSO2 Carbon - Device Management - APIM handler Server Feature</name>
<url>http://wso2.org</url>
<description>This feature contains the handler for the api authentications

@ -21,13 +21,13 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>apimgt-extensions-feature</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.apimgt.integration.client.feature</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<packaging>pom</packaging>
<name>WSO2 Carbon - APIM Integration Client Feature</name>
<url>http://wso2.org</url>

@ -21,14 +21,14 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>apimgt-extensions-feature</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.apimgt.webapp.publisher.feature</artifactId>
<packaging>pom</packaging>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<name>WSO2 Carbon - API Management Webapp Publisher Feature</name>
<url>http://wso2.org</url>
<description>This feature contains an implementation of a Tomcat lifecycle listener, which takes care of publishing

@ -22,14 +22,14 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>apimgt-extensions-feature</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<packaging>pom</packaging>
<name>WSO2 Carbon - API Management Extensions Feature</name>
<url>http://wso2.org</url>

@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>certificate-mgt-feature</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>certificate-mgt-feature</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -22,14 +22,14 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>certificate-mgt-feature</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.certificate.mgt.server.feature</artifactId>
<packaging>pom</packaging>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<name>WSO2 Carbon - Certificate Management Server Feature</name>
<url>http://wso2.org</url>
<description>This feature contains the core bundles required for back-end Certificate Management functionality

@ -22,14 +22,14 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>certificate-mgt-feature</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<packaging>pom</packaging>
<name>WSO2 Carbon - Certificate Management Feature</name>
<url>http://wso2.org</url>

@ -22,14 +22,14 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>device-mgt-extensions-feature</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature</artifactId>
<packaging>pom</packaging>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<name>WSO2 Carbon - Device Type Deployer Feature</name>
<url>http://wso2.org</url>
<description>WSO2 Carbon - Device Type Deployer Feature</description>

@ -22,14 +22,14 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>device-mgt-extensions-feature</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.feature</artifactId>
<packaging>pom</packaging>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<name>WSO2 Carbon - FCM Based Push Notification Provider Feature</name>
<url>http://wso2.org</url>
<description>WSO2 Carbon - MQTT Based Push Notification Provider Feature</description>

@ -22,14 +22,14 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>device-mgt-extensions-feature</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.mgt.extensions.push.notification.provider.http.feature</artifactId>
<packaging>pom</packaging>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<name>WSO2 Carbon - MQTT Based Push Notification Provider Feature</name>
<url>http://wso2.org</url>
<description>WSO2 Carbon - MQTT Based Push Notification Provider Feature</description>

@ -22,14 +22,14 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>device-mgt-extensions-feature</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature</artifactId>
<packaging>pom</packaging>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<name>WSO2 Carbon - MQTT Based Push Notification Provider Feature</name>
<url>http://wso2.org</url>
<description>WSO2 Carbon - MQTT Based Push Notification Provider Feature</description>

@ -22,14 +22,14 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>device-mgt-extensions-feature</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature</artifactId>
<packaging>pom</packaging>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<name>WSO2 Carbon - XMPP Based Push Notification Provider Feature</name>
<url>http://wso2.org</url>
<description>WSO2 Carbon - XMPP Based Push Notification Provider Feature</description>

@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

@ -3,13 +3,13 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>device-mgt-feature</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.mgt.analytics.dashboard.feature</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<packaging>pom</packaging>
<name>WSO2 Carbon - Device Management Dashboard Analytics Feature</name>
<description>WSO2 Carbon - Device Management Dashboard Analytics Feature</description>

@ -22,14 +22,14 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>device-mgt-feature</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.mgt.analytics.data.publisher.feature</artifactId>
<packaging>pom</packaging>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<name>WSO2 Carbon - Device Management Server Feature</name>
<url>http://wso2.org</url>
<description>This feature contains bundles related to device analytics data publisher</description>

@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>device-mgt-feature</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -4,14 +4,14 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>device-mgt-feature</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.mgt.extensions.feature</artifactId>
<packaging>pom</packaging>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<name>WSO2 Carbon - Device Management Extensions Feature</name>
<url>http://wso2.org</url>
<description>This feature contains common extensions used by key device management functionalities

@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>device-mgt-feature</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -22,14 +22,14 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>device-mgt-feature</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.mgt.server.feature</artifactId>
<packaging>pom</packaging>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<name>WSO2 Carbon - Device Management Server Feature</name>
<url>http://wso2.org</url>
<description>This feature contains the core bundles required for Back-end Device Management functionality

@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>device-mgt-feature</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

@ -22,14 +22,14 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>email-sender-feature</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.email.sender.feature</artifactId>
<packaging>pom</packaging>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<name>WSO2 Carbon - Email Sender Feature</name>
<url>http://wso2.org</url>
<description>This feature contains the core bundles required for email sender related functionality

@ -22,14 +22,14 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>email-sender-feature</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<packaging>pom</packaging>
<name>WSO2 Carbon - Email Sender Feature</name>
<url>http://wso2.org</url>

@ -23,14 +23,14 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>jwt-client-feature</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.identity.jwt.client.extension.feature</artifactId>
<packaging>pom</packaging>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<name>WSO2 Carbon - JWT Client Feature</name>
<url>http://wso2.org</url>
<description>This feature contains jwt client implementation from which we can get a access token using the jwt

@ -23,13 +23,13 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jwt-client-feature</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<packaging>pom</packaging>
<name>WSO2 Carbon - JWT Client Extension Feature</name>
<url>http://wso2.org</url>

@ -23,14 +23,14 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>oauth-extensions-feature</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.mgt.oauth.extensions.feature</artifactId>
<packaging>pom</packaging>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<name>WSO2 Carbon - Device Mgt OAuth Extensions Feature</name>
<url>http://wso2.org</url>
<description>This feature contains devicemgt related OAuth extensions</description>

@ -22,14 +22,14 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>oauth-extensions-feature</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<packaging>pom</packaging>
<name>WSO2 Carbon - Device Management OAuth Extensions Feature</name>
<url>http://wso2.org</url>

@ -23,14 +23,14 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>policy-mgt-feature</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.policy.mgt.server.feature</artifactId>
<packaging>pom</packaging>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<name>WSO2 Carbon - Policy Management Server Feature</name>
<url>http://wso2.org</url>
<description>This feature contains the core bundles required for Back-end Device Management functionality

@ -23,14 +23,14 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>policy-mgt-feature</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<packaging>pom</packaging>
<name>WSO2 Carbon - Policy Management Feature</name>
<url>http://wso2.org</url>

@ -22,14 +22,14 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>webapp-authenticator-framework-feature</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.webapp.authenticator.framework.server.feature</artifactId>
<packaging>pom</packaging>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<name>WSO2 Carbon - Webapp Authenticator Framework Server Feature</name>
<url>http://wso2.org</url>
<description>This feature contains the core bundles required for Back-end Device Management functionality

@ -22,14 +22,14 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>webapp-authenticator-framework-feature</artifactId>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<packaging>pom</packaging>
<name>WSO2 Carbon - Webapp Authenticator Framework Feature</name>
<url>http://wso2.org</url>

@ -23,7 +23,7 @@
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId>
<packaging>pom</packaging>
<version>3.0.118-SNAPSHOT</version>
<version>3.0.119-SNAPSHOT</version>
<name>WSO2 Carbon - Device Management - Parent</name>
<url>http://wso2.org</url>
<description>WSO2 Connected Device Manager Components</description>
@ -1851,7 +1851,7 @@
<axiom.wso2.version>1.2.11.wso2v10</axiom.wso2.version>
<!-- Carbon Device Management -->
<carbon.device.mgt.version>3.0.118-SNAPSHOT</carbon.device.mgt.version>
<carbon.device.mgt.version>3.0.119-SNAPSHOT</carbon.device.mgt.version>
<!-- Carbon Commons -->
<carbon.commons.version>4.4.8</carbon.commons.version>

Loading…
Cancel
Save