revert-70aa11f8
warunalakshitha 8 years ago
commit 97a53a7387

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

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

@ -39,6 +39,11 @@
<param-name>doAuthentication</param-name> <param-name>doAuthentication</param-name>
<param-value>true</param-value> <param-value>true</param-value>
</context-param> </context-param>
<!--This is to support basic auth.-->
<context-param>
<param-name>basicAuth</param-name>
<param-value>true</param-value>
</context-param>
<!--publish to apim--> <!--publish to apim-->
<context-param> <context-param>

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

@ -46,7 +46,7 @@ public class APIManagementProviderServiceImpl implements APIManagementProviderSe
private static final int MAX_API_PER_TAG = 200; private static final int MAX_API_PER_TAG = 200;
private static final String APP_TIER_TYPE = "application"; private static final String APP_TIER_TYPE = "application";
private static final Map<String, String> tiersMap = new HashMap<>(); private static final Map<String, String> tiersMap = new HashMap<>();
private static final int MAX_ATTEMPTS = 10; private static final int MAX_ATTEMPTS = 20;
@Override @Override
public void removeAPIApplication(String applicationName, String username) throws APIManagerException { public void removeAPIApplication(String applicationName, String username) throws APIManagerException {
@ -76,18 +76,18 @@ public class APIManagementProviderServiceImpl implements APIManagementProviderSe
String tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext() String tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext()
.getTenantDomain(); .getTenantDomain();
String tiersLoadedForTenant = tiersMap.get(tenantDomain); String tiersLoadedForTenant = tiersMap.get(tenantDomain);
if (tiersLoadedForTenant == null) { if (tiersLoadedForTenant == null) {
int tierStatus = 0; boolean tierLoaded = false;
int attempts = 0; int attempts = 0;
do { do {
try { try {
storeClient.getIndividualTier() storeClient.getIndividualTier()
.tiersTierLevelTierNameGet(ApiApplicationConstants.DEFAULT_TIER, APP_TIER_TYPE, .tiersTierLevelTierNameGet(ApiApplicationConstants.DEFAULT_TIER, APP_TIER_TYPE,
tenantDomain, CONTENT_TYPE, null, null); tenantDomain, CONTENT_TYPE, null, null);
tiersMap.put(tenantDomain, "exist"); tiersMap.put(tenantDomain, "exist");
tierStatus = 200; tierLoaded = true;
} catch (FeignException e) { } catch (FeignException e) {
tierStatus = e.status();
attempts++; attempts++;
try { try {
Thread.sleep(500); Thread.sleep(500);
@ -95,7 +95,7 @@ public class APIManagementProviderServiceImpl implements APIManagementProviderSe
log.warn("Interrupted the waiting for tier availability."); log.warn("Interrupted the waiting for tier availability.");
} }
} }
} while (tierStatus == 500 && attempts < MAX_ATTEMPTS); } while ((!tierLoaded) && attempts < MAX_ATTEMPTS);
} }
ApplicationList applicationList = storeClient.getApplications() ApplicationList applicationList = storeClient.getApplications()

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

@ -24,14 +24,12 @@ package org.wso2.carbon.apimgt.handlers.beans;
*/ */
public class DCR { public class DCR {
// Owner of the application private String callbackUrl;
private String owner; private String owner;
// Client name
private String clientName; private String clientName;
// Oauth Grant type
private String grantType; private String grantType;
// Scope of the token
private String tokenScope; private String tokenScope;
private boolean isSaasApp;
public String getOwner() { public String getOwner() {
return owner; return owner;
@ -64,5 +62,27 @@ public class DCR {
public void setTokenScope(String tokenScope) { public void setTokenScope(String tokenScope) {
this.tokenScope = tokenScope; this.tokenScope = tokenScope;
} }
public boolean getIsSaasApp() {
return isSaasApp;
}
public void setIsSaasApp(boolean isSaasApp) {
this.isSaasApp = isSaasApp;
}
public String getCallbackUrl() {
return callbackUrl;
}
public void setCallbackUrl(String callbackUrl) {
this.callbackUrl = callbackUrl;
}
public String toJSON() {
return "{\"callbackUrl\": \"" + callbackUrl + "\",\"clientName\": \"" + clientName + "\", \"tokenScope\": " +
"\"" + tokenScope + "\", \"owner\": \"" + owner + "\"," + "\"grantType\": \"" + grantType +
"\", \"saasApp\" :" + isSaasApp + " }\n";
}
} }

@ -36,4 +36,14 @@ public class AuthConstants {
public static final String MDM_SIGNATURE = "mdm-signature"; public static final String MDM_SIGNATURE = "mdm-signature";
public static final String PROXY_MUTUAL_AUTH_HEADER = "proxy-mutual-auth-header"; public static final String PROXY_MUTUAL_AUTH_HEADER = "proxy-mutual-auth-header";
public static final String ENCODED_PEM = "encoded-pem"; public static final String ENCODED_PEM = "encoded-pem";
public static final String CALLBACK_URL = "";
public static final String CLIENT_NAME = "IOT-API-MANAGER";
public static final String GRANT_TYPE = "refresh_token password client_credentials";
public static final String TOKEN_SCOPE = "default";
public static final String CONTENT_TYPE_HEADER = "Content-Type";
public static final String CONTENT_TYPE = "application/json";
public static final String AUTHORIZATION_HEADER = "Authorization";
public static final String BASIC_AUTH_PREFIX = "Basic ";
public static final String CLIENT_ID = "clientId";
public static final String CLIENT_SECRET = "clientSecret";
} }

@ -19,7 +19,6 @@
package org.wso2.carbon.apimgt.handlers.utils; package org.wso2.carbon.apimgt.handlers.utils;
import com.google.gson.Gson;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.apache.ws.security.util.Base64; import org.apache.ws.security.util.Base64;
@ -118,8 +117,7 @@ public class Utils {
tokenHeaders.put("Content-Type", "application/x-www-form-urlencoded"); tokenHeaders.put("Content-Type", "application/x-www-form-urlencoded");
RESTInvoker restInvoker = new RESTInvoker(); RESTInvoker restInvoker = new RESTInvoker();
RESTResponse response = restInvoker.invokePOST(tokenUrl, tokenHeaders, null, RESTResponse response = restInvoker.invokePOST(tokenUrl, tokenHeaders, null, null, tokenContent);
null, tokenContent);
if(log.isDebugEnabled()) { if(log.isDebugEnabled()) {
log.debug("Token response:" + response.getContent()); log.debug("Token response:" + response.getContent());
} }
@ -144,31 +142,32 @@ public class Utils {
private static void getClientSecretes(IOTServerConfiguration iotServerConfiguration) private static void getClientSecretes(IOTServerConfiguration iotServerConfiguration)
throws APIMCertificateMGTException { throws APIMCertificateMGTException {
try { try {
String username = iotServerConfiguration.getUsername();
String password = iotServerConfiguration.getPassword();
DCR dcr = new DCR(); DCR dcr = new DCR();
dcr.setOwner(iotServerConfiguration.getUsername()); dcr.setOwner(iotServerConfiguration.getUsername());
dcr.setClientName("IOT-API-MANAGER"); dcr.setClientName(AuthConstants.CLIENT_NAME);
dcr.setGrantType("refresh_token password client_credentials"); dcr.setGrantType(AuthConstants.GRANT_TYPE);
dcr.setTokenScope("default"); dcr.setTokenScope(AuthConstants.TOKEN_SCOPE);
Gson gson = new Gson(); dcr.setCallbackUrl(AuthConstants.CALLBACK_URL);
String dcrContent = gson.toJson(dcr); dcr.setIsSaasApp(true);
Map<String, String> drcHeaders = new HashMap<String, String>(); String dcrContent = dcr.toJSON();
drcHeaders.put("Content-Type", "application/json"); Map<String, String> dcrHeaders = new HashMap<String, String>();
String basicAuth = Base64.encode((username + ":" + password).getBytes());
dcrHeaders.put(AuthConstants.CONTENT_TYPE_HEADER, AuthConstants.CONTENT_TYPE);
dcrHeaders.put(AuthConstants.AUTHORIZATION_HEADER, AuthConstants.BASIC_AUTH_PREFIX + basicAuth);
URI dcrUrl = new URI(iotServerConfiguration.getDynamicClientRegistrationEndpoint()); URI dcrUrl = new URI(iotServerConfiguration.getDynamicClientRegistrationEndpoint());
RESTInvoker restInvoker = new RESTInvoker(); RESTInvoker restInvoker = new RESTInvoker();
RESTResponse response = restInvoker.invokePOST(dcrUrl, drcHeaders, null, RESTResponse response = restInvoker.invokePOST(dcrUrl, dcrHeaders, null, null, dcrContent);
null, dcrContent);
if (log.isDebugEnabled()) { if (log.isDebugEnabled()) {
log.debug("DCR response :" + response.getContent()); log.debug("DCR response :" + response.getContent());
} }
JSONObject jsonResponse = new JSONObject(response.getContent()); JSONObject jsonResponse = new JSONObject(response.getContent());
clientId = jsonResponse.getString("client_id"); clientId = jsonResponse.getString(AuthConstants.CLIENT_ID);
clientSecret = jsonResponse.getString("client_secret"); clientSecret = jsonResponse.getString(AuthConstants.CLIENT_SECRET);
} catch (JSONException e) { } catch (JSONException e) {
throw new APIMCertificateMGTException("Error occurred while converting the json to object", e); throw new APIMCertificateMGTException("Error occurred while converting the json to object", e);
} catch (IOException e) { } catch (IOException | URISyntaxException e) {
throw new APIMCertificateMGTException("Error occurred while trying to call DCR endpoint", e);
} catch (URISyntaxException e) {
throw new APIMCertificateMGTException("Error occurred while trying to call DCR endpoint", e); throw new APIMCertificateMGTException("Error occurred while trying to call DCR endpoint", e);
} }

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

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

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

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

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

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

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

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

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

@ -70,8 +70,7 @@ public class DeviceTypeManagerService implements DeviceManagementService {
this.operationMonitoringConfigs = new OperationMonitoringTaskConfig(); this.operationMonitoringConfigs = new OperationMonitoringTaskConfig();
this.setOperationMonitoringConfig(deviceTypeConfiguration); this.setOperationMonitoringConfig(deviceTypeConfiguration);
this.setInitialOperationConfig(deviceTypeConfiguration); this.setInitialOperationConfig(deviceTypeConfiguration);
if (deviceTypeConfiguration.getPolicyMonitoring() != null && deviceTypeConfiguration.getPolicyMonitoring() if (deviceTypeConfiguration.getPolicyMonitoring() != null ) {
.isEnabled()) {
this.policyMonitoringManager = new DefaultPolicyMonitoringManager(); this.policyMonitoringManager = new DefaultPolicyMonitoringManager();
} }
} }

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

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

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

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

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

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

@ -22,7 +22,7 @@
<parent> <parent>
<artifactId>device-mgt</artifactId> <artifactId>device-mgt</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>2.0.39-SNAPSHOT</version> <version>2.0.50-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
@ -280,6 +280,16 @@
<dependency> <dependency>
<groupId>javax.ws.rs</groupId> <groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId> <artifactId>javax.ws.rs-api</artifactId>
</dependency>
<dependency>
<groupId>org.wso2.carbon.analytics-common</groupId>
<artifactId>org.wso2.carbon.event.receiver.stub</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.wso2.carbon.analytics-common</groupId>
<artifactId>org.wso2.carbon.event.stream.stub</artifactId>
<scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.wso2.carbon.commons</groupId> <groupId>org.wso2.carbon.commons</groupId>

@ -436,6 +436,7 @@ public class DeviceManagementServiceImpl implements DeviceManagementService {
new ErrorResponse.ErrorResponseBuilder().setMessage(msg).build()).build(); new ErrorResponse.ErrorResponseBuilder().setMessage(msg).build()).build();
} }
deviceList.setList(devices); deviceList.setList(devices);
deviceList.setCount(devices.size());
return Response.status(Response.Status.OK).entity(deviceList).build(); return Response.status(Response.Status.OK).entity(deviceList).build();
} }

@ -40,6 +40,7 @@ import org.wso2.carbon.device.mgt.jaxrs.util.CredentialManagementResponseBuilder
import org.wso2.carbon.device.mgt.jaxrs.util.DeviceMgtAPIUtils; import org.wso2.carbon.device.mgt.jaxrs.util.DeviceMgtAPIUtils;
import org.wso2.carbon.identity.user.store.count.UserStoreCountRetriever; import org.wso2.carbon.identity.user.store.count.UserStoreCountRetriever;
import org.wso2.carbon.identity.user.store.count.exception.UserStoreCounterException; import org.wso2.carbon.identity.user.store.count.exception.UserStoreCounterException;
import org.wso2.carbon.user.api.Permission;
import org.wso2.carbon.user.api.UserStoreException; import org.wso2.carbon.user.api.UserStoreException;
import org.wso2.carbon.user.api.UserStoreManager; import org.wso2.carbon.user.api.UserStoreManager;
import org.wso2.carbon.utils.CarbonUtils; import org.wso2.carbon.utils.CarbonUtils;
@ -82,6 +83,16 @@ public class UserManagementServiceImpl implements UserManagementService {
private static final String DEFAULT_DEVICE_USER = "Internal/devicemgt-user"; private static final String DEFAULT_DEVICE_USER = "Internal/devicemgt-user";
private static final String DEFAULT_DEVICE_ADMIN = "Internal/devicemgt-admin"; private static final String DEFAULT_DEVICE_ADMIN = "Internal/devicemgt-admin";
// Permissions that are given for a normal device user.
private static final Permission[] PERMISSIONS_FOR_DEVICE_USER = {
new Permission("/permission/admin/Login", "ui.execute"),
new Permission("/permission/admin/device-mgt/device/api/subscribe", "ui.execute"),
new Permission("/permission/admin/device-mgt/devices/enroll", "ui.execute"),
new Permission("/permission/admin/device-mgt/devices/disenroll", "ui.execute"),
new Permission("/permission/admin/device-mgt/devices/owning-device/view", "ui.execute"),
new Permission("/permission/admin/manage/portal", "ui.execute")
};
@POST @POST
@Override @Override
public Response addUser(UserInfo userInfo) { public Response addUser(UserInfo userInfo) {
@ -114,6 +125,11 @@ public class UserManagementServiceImpl implements UserManagementService {
String[] roles = new String[tmpRoles.size()]; String[] roles = new String[tmpRoles.size()];
tmpRoles.toArray(roles); tmpRoles.toArray(roles);
// If the normal device user role does not exist, create a new role with the minimal permissions
if (!userStoreManager.isExistingRole(DEFAULT_DEVICE_USER)) {
userStoreManager.addRole(DEFAULT_DEVICE_USER, null, PERMISSIONS_FOR_DEVICE_USER);
}
userStoreManager.addUser(userInfo.getUsername(), initialUserPassword, userStoreManager.addUser(userInfo.getUsername(), initialUserPassword,
roles, defaultUserClaims, null); roles, defaultUserClaims, null);
// Outputting debug message upon successful addition of user // Outputting debug message upon successful addition of user
@ -238,6 +254,7 @@ public class UserManagementServiceImpl implements UserManagementService {
} }
} }
rolesToDelete.remove(ROLE_EVERYONE); rolesToDelete.remove(ROLE_EVERYONE);
rolesToAdd.remove(ROLE_EVERYONE);
userStoreManager.updateRoleListOfUser(username, userStoreManager.updateRoleListOfUser(username,
rolesToDelete.toArray(new String[rolesToDelete.size()]), rolesToDelete.toArray(new String[rolesToDelete.size()]),
rolesToAdd.toArray(new String[rolesToAdd.size()])); rolesToAdd.toArray(new String[rolesToAdd.size()]));
@ -257,13 +274,10 @@ public class UserManagementServiceImpl implements UserManagementService {
} }
} }
private List<String> getFilteredRoles(UserStoreManager userStoreManager, String username) { private List<String> getFilteredRoles(UserStoreManager userStoreManager, String username)
throws UserStoreException {
String[] roleListOfUser = new String[0]; String[] roleListOfUser = new String[0];
try { roleListOfUser = userStoreManager.getRoleListOfUser(username);
roleListOfUser = userStoreManager.getRoleListOfUser(username);
} catch (UserStoreException e) {
e.printStackTrace();
}
List<String> filteredRoles = new ArrayList<>(); List<String> filteredRoles = new ArrayList<>();
for (String role : roleListOfUser) { for (String role : roleListOfUser) {
if (!(role.startsWith("Internal/") || role.startsWith("Authentication/"))) { if (!(role.startsWith("Internal/") || role.startsWith("Authentication/"))) {
@ -379,7 +393,6 @@ public class UserManagementServiceImpl implements UserManagementService {
} else { } else {
offsetList = new ArrayList<>(); offsetList = new ArrayList<>();
} }
BasicUserInfoList result = new BasicUserInfoList(); BasicUserInfoList result = new BasicUserInfoList();
result.setList(offsetList); result.setList(offsetList);
result.setCount(users.length); result.setCount(users.length);

@ -18,6 +18,7 @@
*/ */
package org.wso2.carbon.device.mgt.jaxrs.service.impl.admin; package org.wso2.carbon.device.mgt.jaxrs.service.impl.admin;
import org.apache.axis2.AxisFault;
import org.apache.axis2.client.Options; import org.apache.axis2.client.Options;
import org.apache.axis2.java.security.SSLProtocolSocketFactory; import org.apache.axis2.java.security.SSLProtocolSocketFactory;
import org.apache.axis2.transport.http.HTTPConstants; import org.apache.axis2.transport.http.HTTPConstants;
@ -27,6 +28,9 @@ import org.apache.commons.httpclient.protocol.Protocol;
import org.apache.commons.httpclient.protocol.ProtocolSocketFactory; import org.apache.commons.httpclient.protocol.ProtocolSocketFactory;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
import org.wso2.carbon.application.mgt.stub.upload.CarbonAppUploaderStub; import org.wso2.carbon.application.mgt.stub.upload.CarbonAppUploaderStub;
import org.wso2.carbon.application.mgt.stub.upload.types.carbon.UploadedFileItem; import org.wso2.carbon.application.mgt.stub.upload.types.carbon.UploadedFileItem;
import org.wso2.carbon.base.ServerConfiguration; import org.wso2.carbon.base.ServerConfiguration;
@ -35,11 +39,16 @@ import org.wso2.carbon.core.util.Utils;
import org.wso2.carbon.device.mgt.jaxrs.service.api.admin.DeviceTypePublisherAdminService; import org.wso2.carbon.device.mgt.jaxrs.service.api.admin.DeviceTypePublisherAdminService;
import org.wso2.carbon.device.mgt.jaxrs.util.DeviceMgtAPIUtils; import org.wso2.carbon.device.mgt.jaxrs.util.DeviceMgtAPIUtils;
import org.wso2.carbon.identity.jwt.client.extension.JWTClient; import org.wso2.carbon.identity.jwt.client.extension.JWTClient;
import org.wso2.carbon.identity.jwt.client.extension.exception.JWTClientException;
import org.wso2.carbon.registry.core.Registry; import org.wso2.carbon.registry.core.Registry;
import org.wso2.carbon.registry.core.Resource; import org.wso2.carbon.registry.core.Resource;
import org.wso2.carbon.registry.core.ResourceImpl; import org.wso2.carbon.registry.core.ResourceImpl;
import org.wso2.carbon.registry.core.exceptions.RegistryException; import org.wso2.carbon.registry.core.exceptions.RegistryException;
import org.wso2.carbon.user.api.UserStoreException;
import org.wso2.carbon.utils.CarbonUtils; import org.wso2.carbon.utils.CarbonUtils;
import org.wso2.carbon.event.receiver.stub.EventReceiverAdminServiceStub;
import org.wso2.carbon.event.stream.stub.EventStreamAdminServiceStub;
import org.wso2.carbon.utils.multitenancy.MultitenantConstants;
import javax.activation.DataHandler; import javax.activation.DataHandler;
import javax.net.ssl.KeyManagerFactory; import javax.net.ssl.KeyManagerFactory;
@ -51,6 +60,8 @@ import javax.ws.rs.Path;
import javax.ws.rs.PathParam; import javax.ws.rs.PathParam;
import javax.ws.rs.core.Response; import javax.ws.rs.core.Response;
import java.io.*; import java.io.*;
import java.nio.file.Files;
import java.rmi.RemoteException;
import java.security.KeyManagementException; import java.security.KeyManagementException;
import java.security.KeyStore; import java.security.KeyStore;
import java.security.KeyStoreException; import java.security.KeyStoreException;
@ -89,11 +100,15 @@ public class DeviceTypePublisherAdminServiceImpl implements DeviceTypePublisherA
private static final String SSLV3 = "SSLv3"; private static final String SSLV3 = "SSLv3";
private KeyStore keyStore; private KeyStore keyStore;
private KeyStore trustStore; private KeyStore trustStore;
private char[] keyStorePassword; private char[] keyStorePassword;
private SSLContext sslContext; private SSLContext sslContext;
private String tenantDomain;
private static final Log log = LogFactory.getLog(DeviceTypePublisherAdminServiceImpl.class); private static final Log log = LogFactory.getLog(DeviceTypePublisherAdminServiceImpl.class);
private static final String DEFAULT_RESOURCE_LOCATION = "/resources/devicetypes"; private static final String DEFAULT_RESOURCE_LOCATION = "/resources/devicetypes";
private static final String CAR_FILE_LOCATION = CarbonUtils.getCarbonHome() + File.separator + "repository" + private static final String CAR_FILE_LOCATION = CarbonUtils.getCarbonHome() + File.separator + "repository" +
@ -105,10 +120,15 @@ public class DeviceTypePublisherAdminServiceImpl implements DeviceTypePublisherA
private static final String IOT_MGT_HOST_NAME = "${iot.manager.host}"; private static final String IOT_MGT_HOST_NAME = "${iot.manager.host}";
private static final String DAS_URL = DEFAULT_HTTP_PROTOCOL + "://" + DAS_HOST_NAME private static final String DAS_URL = DEFAULT_HTTP_PROTOCOL + "://" + DAS_HOST_NAME
+ ":" + DAS_PORT + "/services/CarbonAppUploader" + "/"; + ":" + DAS_PORT + "/services/CarbonAppUploader" + "/";
private static final String DAS_EVENT_RECEIVER_EP = DEFAULT_HTTP_PROTOCOL + "://" + DAS_HOST_NAME
+ ":" + DAS_PORT + "/services/EventReceiverAdminService" + "/";
private static final String IOT_MGT_URL = DEFAULT_HTTP_PROTOCOL + "://" + IOT_MGT_HOST_NAME private static final String IOT_MGT_URL = DEFAULT_HTTP_PROTOCOL + "://" + IOT_MGT_HOST_NAME
+ ":" + IOT_MGT_PORT + "/services/CarbonAppUploader" + "/"; + ":" + IOT_MGT_PORT + "/services/CarbonAppUploader" + "/";
private static final String MEDIA_TYPE_XML = "application/xml"; private static final String MEDIA_TYPE_XML = "application/xml";
private static final String DEVICE_MANAGEMENT_TYPE = "device_management"; private static final String DEVICE_MANAGEMENT_TYPE = "device_management";
private static final String TENANT_DOMAIN_PROPERTY = "\\$\\{tenant-domain\\}";
@Override @Override
@POST @POST
@ -117,7 +137,7 @@ public class DeviceTypePublisherAdminServiceImpl implements DeviceTypePublisherA
try { try {
//Getting the tenant Domain //Getting the tenant Domain
String tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain(); tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain();
String username = PrivilegedCarbonContext.getThreadLocalCarbonContext().getUsername(); String username = PrivilegedCarbonContext.getThreadLocalCarbonContext().getUsername();
String tenantAdminUser = username + "@" + tenantDomain; String tenantAdminUser = username + "@" + tenantDomain;
@ -187,6 +207,14 @@ public class DeviceTypePublisherAdminServiceImpl implements DeviceTypePublisherA
registry.put(DEFAULT_RESOURCE_LOCATION + type + ".exist", resource); registry.put(DEFAULT_RESOURCE_LOCATION + type + ".exist", resource);
} }
} }
if(!tenantDomain.equals(MultitenantConstants.SUPER_TENANT_DOMAIN_NAME)) {
publishDynamicEventReceivers(type, tenantDomain);
}
publishDynamicEventReceivers(type,MultitenantConstants.SUPER_TENANT_DOMAIN_NAME);
publishDynamicEventStream(type,MultitenantConstants.SUPER_TENANT_DOMAIN_NAME);
} else { } else {
return Response.status(Response.Status.BAD_REQUEST) return Response.status(Response.Status.BAD_REQUEST)
.entity("\"Error, Artifact does not exist.\"").build(); .entity("\"Error, Artifact does not exist.\"").build();
@ -222,6 +250,179 @@ public class DeviceTypePublisherAdminServiceImpl implements DeviceTypePublisherA
} }
} }
private void publishDynamicEventReceivers(String deviceType, String tenantDomain){
PrivilegedCarbonContext.getThreadLocalCarbonContext().startTenantFlow();
PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(tenantDomain, true);
try {
EventReceiverAdminServiceStub receiverAdminServiceStub = new EventReceiverAdminServiceStub(Utils.replaceSystemProperty(DAS_EVENT_RECEIVER_EP));
Options eventReciverOptions = receiverAdminServiceStub._getServiceClient().getOptions();
if (eventReciverOptions == null) {
eventReciverOptions = new Options();
}
String username=null;
if(!tenantDomain.equals(MultitenantConstants.SUPER_TENANT_DOMAIN_NAME)) {
username = PrivilegedCarbonContext.getThreadLocalCarbonContext().getUserRealm()
.getRealmConfiguration().getAdminUserName()+"@"+tenantDomain;
}else {
username = PrivilegedCarbonContext.getThreadLocalCarbonContext().getUserRealm()
.getRealmConfiguration().getAdminUserName();
}
JWTClient jwtClient = DeviceMgtAPIUtils.getJWTClientManagerService().getJWTClient();
String authValue = AUTHORIZATION_HEADER_VALUE + " " + new String(Base64.encodeBase64(
jwtClient.getJwtToken(username).getBytes()));
List<Header> list = new ArrayList<Header>();
Header httpHeader = new Header();
httpHeader.setName(AUTHORIZATION_HEADER);
httpHeader.setValue(authValue);
list.add(httpHeader);//"https"
eventReciverOptions.setProperty(HTTPConstants.HTTP_HEADERS, list);
eventReciverOptions.setProperty(HTTPConstants.CUSTOM_PROTOCOL_HANDLER
, new Protocol(DEFAULT_HTTP_PROTOCOL
, (ProtocolSocketFactory) new SSLProtocolSocketFactory(sslContext)
, Integer.parseInt(Utils.replaceSystemProperty(DAS_PORT))));
receiverAdminServiceStub._getServiceClient().setOptions(eventReciverOptions);
List<String> receiversList = getReceiversList(deviceType);
for (String receiverContent:receiversList) {
receiverAdminServiceStub.deployEventReceiverConfiguration(receiverContent);
}
} catch (AxisFault e) {
log.error("publishing dynamic event receiver is failed due to " + e.getMessage(), e);
} catch (RemoteException e) {
log.error("publishing dynamic event receiver is failed due to " + e.getMessage(), e);
} catch (IOException e) {
log.error("publishing dynamic event receiver is failed due to " + e.getMessage(), e);
} catch (JWTClientException e) {
log.error("publishing dynamic event receiver is failed due to " + e.getMessage(), e);
} catch (UserStoreException e) {
log.error("publishing dynamic event receiver is failed due to " + e.getMessage(), e);
} finally {
PrivilegedCarbonContext.endTenantFlow();
}
}
private void publishDynamicEventStream(String deviceType, String tenantDomain){
PrivilegedCarbonContext.getThreadLocalCarbonContext().startTenantFlow();
PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(tenantDomain, true);
try {
EventStreamAdminServiceStub eventStreamAdminServiceStub = new EventStreamAdminServiceStub(Utils.replaceSystemProperty(DAS_EVENT_RECEIVER_EP));
Options eventReciverOptions = eventStreamAdminServiceStub._getServiceClient().getOptions();
if (eventReciverOptions == null) {
eventReciverOptions = new Options();
}
String username;
if(!tenantDomain.equals(MultitenantConstants.SUPER_TENANT_DOMAIN_NAME)) {
username = PrivilegedCarbonContext.getThreadLocalCarbonContext().getUserRealm()
.getRealmConfiguration().getAdminUserName()+"@"+tenantDomain;
}else {
username = PrivilegedCarbonContext.getThreadLocalCarbonContext().getUserRealm()
.getRealmConfiguration().getAdminUserName();
}
JWTClient jwtClient = DeviceMgtAPIUtils.getJWTClientManagerService().getJWTClient();
String authValue = AUTHORIZATION_HEADER_VALUE + " " + new String(Base64.encodeBase64(
jwtClient.getJwtToken(username).getBytes()));
List<Header> list = new ArrayList<Header>();
Header httpHeader = new Header();
httpHeader.setName(AUTHORIZATION_HEADER);
httpHeader.setValue(authValue);
list.add(httpHeader);//"https"
eventReciverOptions.setProperty(HTTPConstants.HTTP_HEADERS, list);
eventReciverOptions.setProperty(HTTPConstants.CUSTOM_PROTOCOL_HANDLER
, new Protocol(DEFAULT_HTTP_PROTOCOL
, (ProtocolSocketFactory) new SSLProtocolSocketFactory(sslContext)
, Integer.parseInt(Utils.replaceSystemProperty(DAS_PORT))));
eventStreamAdminServiceStub._getServiceClient().setOptions(eventReciverOptions);
List<String> streamList = getStreamsList(deviceType);
for (String streamContent:streamList) {
JSONParser jsonParser = new JSONParser();
JSONObject steamJson = (JSONObject)jsonParser.parse(streamContent);
String name = (String) steamJson.get("name");
String version = (String) steamJson.get("version");
String streamId = name +":"+version;
if(eventStreamAdminServiceStub.getStreamDefinitionAsString(streamId)==null) {
eventStreamAdminServiceStub.addEventStreamDefinitionAsString(streamContent);
}
}
} catch (AxisFault e) {
log.error("publishing dynamic event receiver is failed due to " + e.getMessage(), e);
} catch (RemoteException e) {
log.error("publishing dynamic event receiver is failed due to " + e.getMessage(), e);
} catch (IOException e) {
log.error("publishing dynamic event receiver is failed due to " + e.getMessage(), e);
} catch (JWTClientException e) {
log.error("publishing dynamic event receiver is failed due to " + e.getMessage(), e);
} catch (UserStoreException e) {
log.error("publishing dynamic event receiver is failed due to " + e.getMessage(), e);
} catch (ParseException e) {
log.error("publishing dynamic event receiver is failed due to " + e.getMessage(), e);
} finally {
PrivilegedCarbonContext.endTenantFlow();
}
}
private List<String> getReceiversList(String deviceType) throws IOException {
File directory = new File(CAR_FILE_LOCATION + File.separator + deviceType+File.separator+"receiver");
File[] receiverFiles = directory.listFiles(new FilenameFilter() {
@Override
public boolean accept(File dir, String name) {
return name.toLowerCase().endsWith(".xml");
}
});
List<String> receiverList = new ArrayList<>();
for (File receiverFile:receiverFiles) {
String receiverContent =new String(Files.readAllBytes(receiverFile.toPath()));
receiverContent.replaceAll(TENANT_DOMAIN_PROPERTY,tenantDomain.toLowerCase());
receiverList.add(receiverContent);
}
return receiverList;
}
private List<String> getStreamsList(String deviceType) throws IOException {
File directory = new File(CAR_FILE_LOCATION + File.separator + deviceType+File.separator+"streams");
File[] receiverFiles = directory.listFiles(new FilenameFilter() {
@Override
public boolean accept(File dir, String name) {
return name.toLowerCase().endsWith(".json");
}
});
List<String> streamList = new ArrayList<>();
for (File StreamFile:receiverFiles) {
String receiverContent =new String(Files.readAllBytes(StreamFile.toPath()));
receiverContent.replaceAll(TENANT_DOMAIN_PROPERTY,tenantDomain.toLowerCase());
streamList.add(receiverContent);
}
return streamList;
}
private UploadedFileItem[] loadCappFromFileSystem(String deviceType) throws IOException { private UploadedFileItem[] loadCappFromFileSystem(String deviceType) throws IOException {
File directory = new File(CAR_FILE_LOCATION + File.separator + deviceType); File directory = new File(CAR_FILE_LOCATION + File.separator + deviceType);

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

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

@ -165,7 +165,7 @@ public abstract class AbstractDeviceDAOImpl implements DeviceDAO {
stmt.setInt(paramIdx, tenantId); stmt.setInt(paramIdx, tenantId);
rs = stmt.executeQuery(); rs = stmt.executeQuery();
if (rs.next()) { if (rs.next()) {
device = DeviceManagementDAOUtil.loadMatchingDevice(rs, true); device = DeviceManagementDAOUtil.loadMatchingDevice(rs, false);
} }
} catch (SQLException e) { } catch (SQLException e) {
throw new DeviceManagementDAOException("Error occurred while listing device for type " + throw new DeviceManagementDAOException("Error occurred while listing device for type " +

@ -145,10 +145,10 @@ public class QueryBuilderImpl implements QueryBuilder {
ValueType type = new ValueType(); ValueType type = new ValueType();
if (Utils.checkColumnType(con.getKey())) { if (Utils.checkColumnType(con.getKey())) {
type.setColumnType(ValueType.columnType.STRING); type.setColumnType(ValueType.columnType.STRING);
type.setStringValue(Utils.getConvertedValue(con.getKey(), con.getValue())); type.setStringValue(con.getValue());
} else { } else {
type.setColumnType(ValueType.columnType.INTEGER); type.setColumnType(ValueType.columnType.INTEGER);
type.setIntValue(Integer.parseInt(Utils.getConvertedValue(con.getKey(), con.getValue()))); type.setIntValue(Integer.parseInt(con.getValue()));
} }
valueType[x] = type; valueType[x] = type;
x++; x++;
@ -193,10 +193,10 @@ public class QueryBuilderImpl implements QueryBuilder {
ValueType type = new ValueType(); ValueType type = new ValueType();
if (Utils.checkColumnType(con.getKey())) { if (Utils.checkColumnType(con.getKey())) {
type.setColumnType(ValueType.columnType.STRING); type.setColumnType(ValueType.columnType.STRING);
type.setStringValue(Utils.getConvertedValue(con.getKey(), con.getValue())); type.setStringValue(con.getValue());
} else { } else {
type.setColumnType(ValueType.columnType.INTEGER); type.setColumnType(ValueType.columnType.INTEGER);
type.setIntValue(Integer.parseInt(Utils.getConvertedValue(con.getKey(), con.getValue()))); type.setIntValue(Integer.parseInt(con.getValue()));
} }
valueType[x] = type; valueType[x] = type;
x++; x++;

@ -103,14 +103,6 @@ public class Utils {
return bool; return bool;
} }
public static String getConvertedValue(String column, String value) {
if (checkColumnType(column)) {
return "\'" + value + "\'";
} else return value;
}
public static Map<String, String> getDeviceDetailsColumnNames() { public static Map<String, String> getDeviceDetailsColumnNames() {
return genericColumnsMap; return genericColumnsMap;
} }

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

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

@ -62,6 +62,7 @@ if (uriMatcher.match("/{context}/api/data-tables/invoker")) {
function (backendResponse) { function (backendResponse) {
response["status"] = backendResponse["status"]; response["status"] = backendResponse["status"];
response["content"] = utility.encodeJson(backendResponse["responseText"]); response["content"] = utility.encodeJson(backendResponse["responseText"]);
response["contentType"] = "application/json";
} }
); );
} }

@ -1,7 +1,7 @@
{ {
"Logo": { "Logo": {
"name": "Cloud", "name": "Cloud",
"url": "https://<%= @cloudmgt_host %>/cloudmgt", "url": "https://cloudmgt.cloud.wso2.com/cloudmgt",
"target": "_parent" "target": "_parent"
}, },
"Main": { "Main": {
@ -12,75 +12,21 @@
"target": "_parent", "target": "_parent",
"dropDown": { "dropDown": {
"Organization": { "Organization": {
"url": "https://<%= @cloudmgt_host %>/cloudmgt/site/pages/organization.jag", "url": "https://cloudmgt.cloud.wso2.com/cloudmgt/site/pages/organization.jag",
"icon": "fw fw-organization", "icon": "fw fw-organization",
"dropDown": "false", "dropDown": "false",
"target": "_self" "target": "_self"
}, },
"Members": { "Members": {
"url": "https://<%= @cloudmgt_host %>/cloudmgt/site/pages/user.jag", "url": "https://cloudmgt.cloud.wso2.com/cloudmgt/site/pages/user.jag",
"icon": "fa fa-users", "icon": "fa fa-users",
"dropDown": "false", "dropDown": "false",
"target": "_self" "target": "_self"
} }
} }
}, },
"Account": {
"url": "https://<%= @cloudmgt_host %>/cloudmgt/site/pages/account-summary.jag",
"icon": "fw fw-resource",
"isAdminOnly": true,
"target": "_blank",
"dropDown": {
"Upgrade Now": {
"url": "https://<%= @cloudmgt_host %>/cloudmgt/site/pages/payment-plans.jag?cloud-type=api_cloud",
"icon": "fw fw-export",
"target": "_self"
},
"Monetization": {
"url": "https://<%= @cloudmgt_host %>/cloudmgt/site/pages/monetization-dashboard.jag",
"icon": "fa fa-money fa-lg",
"dropDown": "false",
"target": "_self"
},
"Request Extension": {
"url": "https://<%= @cloudmgt_host %>/cloudmgt/site/pages/contact-us.jag?cloud-type=api_cloud&request-extension=true",
"icon": "fw fw-mail",
"target": "_blank"
},
"Usage data": {
"url": "https://<%= @cloudmgt_host %>/cloudmgt/site/pages/tenant-usage.jag?cloud-type=api_cloud",
"icon": "fw fw-bar-chart",
"target": "_self"
}
}
},
"Configure": {
"url": "none",
"icon": "fw fw-settings",
"isAdminOnly": true,
"dropDown": {
"Admin Dashboard": {
"id": "admin-dashboard",
"url": "https://<%= @apimpublisher_host %>/admin-dashboard/",
"icon": "fw fw-user",
"target": "_self"
},
"Custom URL": {
"id": "custom-url",
"url": "https://<%= @cloudmgt_host %>/cloudmgt/site/pages/custom_url.jag",
"icon": "fw fw-uri",
"target": "_self"
},
"API Store Access": {
"id": "custom-url",
"url": "https://<%= @cloudmgt_host %>/cloudmgt/site/pages/selfSignup.jag",
"icon": "fw fw-store",
"target": "_self"
}
}
},
"Support": { "Support": {
"url": "https://<%= @cloudmgt_host %>/cloudmgt/site/pages/contact-us.jag", "url": "https://cloudmgt.cloud.wso2.com/cloudmgt/site/pages/contact-us.jag",
"icon": "fw fw-mail", "icon": "fw fw-mail",
"isAdminOnly": false, "isAdminOnly": false,
"target": "_self", "target": "_self",
@ -91,29 +37,11 @@
"icon": "fw fw-document", "icon": "fw fw-document",
"isAdminOnly": false, "isAdminOnly": false,
"dropDown": { "dropDown": {
"API Cloud": {
"id": "api_cloud",
"url": "https://docs.wso2.com/display/APICloud/WSO2+API+Cloud+Documentation",
"icon": "fw fw-api",
"target": "_blank"
},
"Integration Cloud": {
"id": "integration_cloud",
"url": "https://docs.wso2.com/display/IntegrationCloud/WSO2+Integration+Cloud+Documentation",
"icon": "fw fw-application",
"target": "_blank"
},
"Device Cloud": { "Device Cloud": {
"id": "device_cloud", "id": "device_cloud",
"url": "https://docs.wso2.com/display/DeviceCloud/WSO2+Device+Cloud+Documentation", "url": "https://docs.wso2.com/display/DeviceCloud/WSO2+Device+Cloud+Documentation",
"icon": "fw fw-mobile", "icon": "fw fw-mobile",
"target": "_self" "target": "_self"
},
"API Cloud Walkthrough": {
"id": "api_cloud_walkthrough",
"url": "https://<%= @apimpublisher_host %>/publisher?interactiveTutorial=true",
"icon": "fw fw-document",
"target": "_self"
} }
} }
} }
@ -123,19 +51,19 @@
"icon": "fw fw-user", "icon": "fw fw-user",
"dropDown": { "dropDown": {
"Profile": { "Profile": {
"url": "https://<%= @cloudmgt_host %>/cloudmgt/site/pages/user-profile.jag", "url": "https://cloudmgt.cloud.wso2.com/cloudmgt/site/pages/user-profile.jag",
"icon": "fw fw-user", "icon": "fw fw-user",
"dropDown": "true", "dropDown": "true",
"target": "_self" "target": "_self"
}, },
"Change Password": { "Change Password": {
"url": "https://<%= @cloudmgt_host %>/cloudmgt/site/pages/change-password.jag", "url": "https://cloudmgt.cloud.wso2.com/cloudmgt/site/pages/change-password.jag",
"icon": "fw fw-lock", "icon": "fw fw-lock",
"dropDown": "true", "dropDown": "true",
"target": "_self" "target": "_self"
}, },
"Logout": { "Logout": {
"url": "https://<%= @apimpublisher_host %>/publisher/site/pages/logout.jag", "url": "https://api.cloud.wso2.com/publisher/site/pages/logout.jag",
"icon": "fw fw-sign-out", "icon": "fw fw-sign-out",
"dropDown": "true", "dropDown": "true",
"target": "_self" "target": "_self"
@ -146,50 +74,36 @@
"Clouds": { "Clouds": {
"API Cloud": { "API Cloud": {
"id": "api_cloud", "id": "api_cloud",
"url": "https://<%= @apimpublisher_host %>/publisher", "url": "https://api.cloud.wso2.com/publisher",
"icon": "fw fw-api fw-3x", "icon": "fw fw-api fw-3x",
"dropDown": "true", "dropDown": "true",
"target": "_self" "target": "_self"
}, },
"Integration Cloud": { "Integration Cloud": {
"id": "integration_cloud", "id": "integration_cloud",
"url": "https://milestones.appfactory.wso2.com:9443/appmgt", "url": "https://integration.cloud.wso2.com/appmgt",
"icon": "fa fa-cubes fw-3x", "icon": "fw fw-service fw-3x",
"dropDown": "true", "dropDown": "true",
"target": "_self" "target": "_self"
}, },
"Identity Cloud": { "Identity Cloud": {
"id": "integration_cloud", "id": "integration_cloud",
"url": "https://identity.cloudlocal.wso2.com:9443/admin", "url": "https://identity.cloud.wso2.com/admin",
"icon": "fw fw-security fw-3x", "icon": "fw fw-security fw-3x",
"dropDown": "true", "dropDown": "true",
"target": "_self" "target": "_self"
},
"App Cloud": {
"id": "app_cloud",
"url": "https://<%= @appcloud_host %>/appmgt",
"icon": "fw fw-application fw-3x",
"dropDown": "true",
"target": "_self"
},
"Device Cloud": {
"id": "device_cloud",
"url": "https://<%= @mgt_hostname %>/devicemgt",
"icon": "fw fw-mobile fw-3x",
"dropDown": "true",
"target": "_self"
} }
}, },
"Actions": { "Actions": {
"Organization": { "Organization": {
"url": "https://<%= @cloudmgt_host %>/cloudmgt/site/pages/organization.jag", "url": "https://cloudmgt.cloud.wso2.com/cloudmgt/site/pages/organization.jag",
"icon": "fw fw-organization fw-3x", "icon": "fw fw-organization fw-3x",
"dropDown": "true", "dropDown": "true",
"target": "_self" "target": "_self"
}, },
"Members": { "Members": {
"url": "https://<%= @cloudmgt_host %>/cloudmgt/site/pages/user.jag", "url": "https://cloudmgt.cloud.wso2.com/cloudmgt/site/pages/user.jag",
"icon": "fa fa-users fw-3x", "icon": "fa fa-users fa-3x",
"dropDown": "true", "dropDown": "true",
"target": "_self" "target": "_self"
} }

@ -40,52 +40,66 @@ var operationModule = function () {
privateMethods.getOperationsFromFeatures = function (deviceType, operationType) { privateMethods.getOperationsFromFeatures = function (deviceType, operationType) {
var url = devicemgtProps["httpsURL"] + devicemgtProps["backendRestEndpoints"]["deviceMgt"] + "/device-types/" + deviceType + "/features"; var url = devicemgtProps["httpsURL"] + devicemgtProps["backendRestEndpoints"]["deviceMgt"] + "/device-types/" + deviceType + "/features";
var featuresList = serviceInvokers.XMLHttp.get(url, function (responsePayload) { var featuresList = serviceInvokers.XMLHttp.get(url, function (responsePayload) {
var features = JSON.parse(responsePayload.responseText); var features = JSON.parse(responsePayload.responseText);
var featureList = []; var featureList = [];
var feature; var feature;
for (var i = 0; i < features.length; i++) { for (var i = 0; i < features.length; i++) {
feature = {}; feature = {};
feature["operation"] = features[i].code; feature["operation"] = features[i].code;
feature["name"] = features[i].name; feature["name"] = features[i].name;
feature["description"] = features[i].description; feature["description"] = features[i].description;
feature["contentType"] = features[i].contentType; feature["contentType"] = features[i].contentType;
feature["deviceType"] = deviceType; feature["deviceType"] = deviceType;
feature["params"] = []; feature["params"] = [];
var featuresEntry = utility.getDeviceTypeConfig(deviceType)["deviceType"]["features"]; var featuresEntry = utility.getDeviceTypeConfig(deviceType)["deviceType"]["features"];
if (featuresEntry) { if (featuresEntry) {
var featureEntry = featuresEntry[features[i].code]; var featureEntry = featuresEntry[features[i].code];
if (featureEntry) { if (featureEntry) {
var permissionEntry = featureEntry["permission"]; var permissionEntry = featureEntry["permission"];
if (permissionEntry) { if (permissionEntry) {
feature["permission"] = permissionEntry feature["permission"] = permissionEntry
} }
} }
} }
var metaData = features[i].metadataEntries; var metaData = features[i].metadataEntries;
if (metaData) { if (metaData) {
for (var j = 0; j < metaData.length; j++) { for (var j = 0; j < metaData.length; j++) {
feature["params"].push(metaData[j].value); feature["params"].push(metaData[j].value);
} }
featureList.push(feature); featureList.push(feature);
} }
} }
return featureList; return featureList;
}, function (responsePayload) { }, function (responsePayload) {
var response = {}; var response = {};
response["status"] = "error"; response["status"] = "error";
return response; return response;
} }
); );
return featuresList; return featuresList;
}; };
publicMethods.getControlOperations = function (deviceType) { publicMethods.getControlOperations = function (deviceType) {
var operations = privateMethods.getOperationsFromFeatures(deviceType, "operation"); var operations = privateMethods.getOperationsFromFeatures(deviceType, "operation");
var features = utility.getDeviceTypeConfig(deviceType).deviceType.features;
for (var op in operations) { for (var op in operations) {
var iconIdentifier = operations[op].operation; var iconIdentifier = operations[op].operation;
var icon = utility.getOperationIcon(deviceType, iconIdentifier); if (features && features[iconIdentifier]) {
if (icon) { var icon = features[iconIdentifier].icon;
operations[op]["icon"] = icon; if (icon) {
operations[op]["iconFont"] = icon;
} else if (iconPath) {
var iconPath = utility.getOperationIcon(deviceType, iconIdentifier);
operations[op]["icon"] = iconPath;
}
var formParams = features[iconIdentifier].formParams;
if (formParams) {
operations[op]["uiParams"] = formParams;
}
// var icon = utility.getOperationIcon(deviceType, iconIdentifier);
// if (icon) {
// log.error("icon found : " + icon );
// operations[op]["icon"] = icon;
} }
} }
return operations; return operations;
@ -99,9 +113,9 @@ var operationModule = function () {
var user = session.get(constants.USER_SESSION_KEY); var user = session.get(constants.USER_SESSION_KEY);
var endPoint = devicemgtProps["httpsURL"] + '/' + deviceType + "/controller/" + operation; var endPoint = devicemgtProps["httpsURL"] + '/' + deviceType + "/controller/" + operation;
var header = '{"owner":"' + user.username + '","deviceId":"' + deviceId + var header = '{"owner":"' + user.username + '","deviceId":"' + deviceId +
'","protocol":"mqtt", "sessionId":"' + session.getId() + '", "' + '","protocol":"mqtt", "sessionId":"' + session.getId() + '", "' +
constants.AUTHORIZATION_HEADER + '":"' + constants.BEARER_PREFIX + constants.AUTHORIZATION_HEADER + '":"' + constants.BEARER_PREFIX +
getAccessToken(deviceType, user.username, deviceId) + '"}'; getAccessToken(deviceType, user.username, deviceId) + '"}';
return post(endPoint, params, JSON.parse(header), "json"); return post(endPoint, params, JSON.parse(header), "json");
}; };
@ -109,9 +123,9 @@ var operationModule = function () {
var user = session.get(constants.USER_SESSION_KEY); var user = session.get(constants.USER_SESSION_KEY);
var endPoint = devicemgtProps["httpsURL"] + '/' + deviceType + "/controller/" + operation; var endPoint = devicemgtProps["httpsURL"] + '/' + deviceType + "/controller/" + operation;
var header = '{"owner":"' + user.username + '","deviceId":"' + deviceId + var header = '{"owner":"' + user.username + '","deviceId":"' + deviceId +
'","protocol":"mqtt", "' + constants.AUTHORIZATION_HEADER + '":"' + '","protocol":"mqtt", "' + constants.AUTHORIZATION_HEADER + '":"' +
constants.BEARER_PREFIX + getAccessToken(deviceType, user.username, deviceId) + constants.BEARER_PREFIX + getAccessToken(deviceType, user.username, deviceId) +
'"}'; '"}';
var result = get(endPoint, {}, JSON.parse(header), "json"); var result = get(endPoint, {}, JSON.parse(header), "json");
if (result.data) { if (result.data) {
var values = result.data.sensorValue.split(','); var values = result.data.sensorValue.split(',');

@ -153,6 +153,7 @@
<!-- / result content --> <!-- / result content -->
</div> </div>
</div> </div>
</div>
<!-- /content/body --> <!-- /content/body -->
{{/zone}} {{/zone}}
{{#zone "bottomJs"}} {{#zone "bottomJs"}}

@ -288,6 +288,9 @@ function loadDevices(searchType, searchParam) {
case 'REMOVED' : case 'REMOVED' :
html = '<span><i class="fw fw-delete icon-danger"></i> Removed</span>'; html = '<span><i class="fw fw-delete icon-danger"></i> Removed</span>';
break; break;
case 'UNREACHABLE' :
html = '<span><i class="fw fw-warning icon-warning"></i> Unreachable</span>';
break;
} }
return html; return html;
} }
@ -461,11 +464,11 @@ function loadDevices(searchType, searchParam) {
attachDeviceEvents(); attachDeviceEvents();
if ($('.advance-search').length < 1) { // if ($('.advance-search').length < 1) {
$(this).closest('.dataTables_wrapper').find('div[id$=_filter] input') // $(this).closest('.dataTables_wrapper').find('div[id$=_filter] input')
.after('<a href="' + context + '/devices/search"' + // .after('<a href="' + context + '/devices/search"' +
' class="advance-search add-padding-3x">Advance Search</a>'); // ' class="advance-search add-padding-3x">Advance Search</a>');
} // }
}, { }, {
"placeholder": "Search By Device Name", "placeholder": "Search By Device Name",

@ -191,15 +191,15 @@ function loadGroups() {
'<span class="hidden-xs hidden-on-grid-view">Analytics</span></a>';*/ '<span class="hidden-xs hidden-on-grid-view">Analytics</span></a>';*/
} }
if (row.owner != "wso2.system.user") { if (row.owner != "wso2.system.user") {
// if ($.hasPermission("SHARE_GROUP")) { if ($.hasPermission("SHARE_GROUP")) {
// html += html +=
// '<a href="#" data-click-event="remove-form" class="btn padding-reduce-on-grid-view share-group-link" data-group-id="' '<a href="#" data-click-event="remove-form" class="btn padding-reduce-on-grid-view share-group-link" data-group-id="'
// + row.groupId + '" ' + + row.groupId + '" ' +
// 'data-group-owner="' + row.owner 'data-group-owner="' + row.owner
// + '" data-placement="top" data-toggle="tooltip" data-original-title="Share"><span class="fw-stack"><i class="fw fw-circle-outline fw-stack-2x"></i><i class="fw fw-share fw-stack-1x"></i></span>' + '" data-placement="top" data-toggle="tooltip" data-original-title="Share"><span class="fw-stack"><i class="fw fw-circle-outline fw-stack-2x"></i><i class="fw fw-share fw-stack-1x"></i></span>'
// + +
// '<span class="hidden-xs hidden-on-grid-view">Share</span></a>'; '<span class="hidden-xs hidden-on-grid-view">Share</span></a>';
// } }
if ($.hasPermission("UPDATE_GROUP")) { if ($.hasPermission("UPDATE_GROUP")) {
html += html +=
'<a href="#" data-click-event="remove-form" class="btn padding-reduce-on-grid-view edit-group-link" data-group-name="' '<a href="#" data-click-event="remove-form" class="btn padding-reduce-on-grid-view edit-group-link" data-group-name="'

@ -39,6 +39,8 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="password">Password *</label> <label for="password">Password *</label>
<!-- Below line is added to stop autocomplete in firefox -->
<input type="password" style="display:none">
<input type="password" name="password" class="form-control" autocomplete="off" <input type="password" name="password" class="form-control" autocomplete="off"
placeholder="Enter your password" required="required" /> placeholder="Enter your password" required="required" />
</div> </div>

@ -109,6 +109,7 @@ var operationModule = function () {
"APN_OPERATION_CODE": "APN", "APN_OPERATION_CODE": "APN",
"CELLULAR_OPERATION_CODE": "CELLULAR", "CELLULAR_OPERATION_CODE": "CELLULAR",
"PER_APP_VPN_OPERATION_CODE": "PER_APP_VPN", "PER_APP_VPN_OPERATION_CODE": "PER_APP_VPN",
"APPLICATION_OPERATION_CODE": "APP-RESTRICTION",
"APP_TO_PER_APP_VPN_MAPPING_OPERATION_CODE": "APP_TO_PER_APP_VPN_MAPPING" "APP_TO_PER_APP_VPN_MAPPING_OPERATION_CODE": "APP_TO_PER_APP_VPN_MAPPING"
}; };
@ -288,6 +289,12 @@ var operationModule = function () {
} }
}; };
break; break;
case iosOperationConstants["APPLICATION_OPERATION_CODE"]:
payload = {
"restrictionType": operationPayload["restriction-type"],
"restrictedApplications": operationPayload["restricted-applications"]
};
break;
case iosOperationConstants["WIFI_OPERATION_CODE"]: case iosOperationConstants["WIFI_OPERATION_CODE"]:
payload = { payload = {
"wifiHiddenNetwork": operationPayload["hiddenNetwork"], "wifiHiddenNetwork": operationPayload["hiddenNetwork"],
@ -579,6 +586,14 @@ var operationModule = function () {
} }
}; };
break; break;
case iosOperationConstants["APPLICATION_OPERATION_CODE"]:
payload = {
"operation": {
"restriction-type": operationData["restrictionType"],
"restricted-applications": operationData["restrictedApplications"]
}
};
break;
case iosOperationConstants["RESTRICTIONS_OPERATION_CODE"]: case iosOperationConstants["RESTRICTIONS_OPERATION_CODE"]:
operationType = operationTypeConstants["PROFILE"]; operationType = operationTypeConstants["PROFILE"];
payload = { payload = {

@ -1,7 +1,7 @@
{{#zone "content"}} {{#zone "content"}}
{{#if isAuthorized}} {{#if isAuthorized}}
<span id="logged-in-user" class="hidden" data-username="{{user.username}}" data-domain="{{user.domain}}" <span id="logged-in-user" class="hidden" data-username="{{user.username}}" data-domain="{{user.domain}}"
data-tenant-id="{{user.tenantId}}"></span> data-tenant-id="{{user.tenantId}}" data-iscloud="{{isCloud}}"></span>
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
@ -284,8 +284,8 @@
<i class="icon fw fw-error"></i><span></span> <i class="icon fw fw-error"></i><span></span>
</div> </div>
{{#unless types}} {{#unless types}}
<h3><i class="icon fw fw-warning"></i> No compatible device types have been installed. <h3><i class="icon fw fw-warning"></i> No compatible device types have been installed.
Install device types to add policies.</h3> Install device types to add policies.</h3>
{{/unless}} {{/unless}}
<div class="row wr-tile-buttons-list"> <div class="row wr-tile-buttons-list">
<div class="wr-input-control"> <div class="wr-input-control">

@ -50,17 +50,17 @@ function onRequest(context) {
var policyOperationsTemplateSrc = policyWizardSrc + "/public/templates/" + deviceType + "-policy-operations.hbs"; var policyOperationsTemplateSrc = policyWizardSrc + "/public/templates/" + deviceType + "-policy-operations.hbs";
if (new File(policyOperationsTemplateSrc).isExists()) { if (new File(policyOperationsTemplateSrc).isExists()) {
content["template"] = "/public/cdmf.unit.device.type." + deviceType + content["template"] = "/public/cdmf.unit.device.type." + deviceType +
".policy-wizard/templates/" + deviceType + "-policy-operations.hbs"; ".policy-wizard/templates/" + deviceType + "-policy-operations.hbs";
} }
var policyOperationsScriptSrc = policyWizardSrc + "/public/js/" + deviceType + "-policy-operations.js"; var policyOperationsScriptSrc = policyWizardSrc + "/public/js/" + deviceType + "-policy-operations.js";
if (new File(policyOperationsScriptSrc).isExists()) { if (new File(policyOperationsScriptSrc).isExists()) {
content["script"] = "/public/cdmf.unit.device.type." + deviceType + content["script"] = "/public/cdmf.unit.device.type." + deviceType +
".policy-wizard/js/" + deviceType + "-policy-operations.js";; ".policy-wizard/js/" + deviceType + "-policy-operations.js";;
} }
var policyOperationsStylesSrc = policyWizardSrc + "/public/css/" + deviceType + "-policy-operations.css"; var policyOperationsStylesSrc = policyWizardSrc + "/public/css/" + deviceType + "-policy-operations.css";
if (new File(policyOperationsStylesSrc).isExists()) { if (new File(policyOperationsStylesSrc).isExists()) {
content["style"] = "/public/cdmf.unit.device.type." + deviceType + content["style"] = "/public/cdmf.unit.device.type." + deviceType +
".policy-wizard/css/" + deviceType + "-policy-operations.css";; ".policy-wizard/css/" + deviceType + "-policy-operations.css";;
} }
types["types"].push(content); types["types"].push(content);
} }
@ -74,6 +74,8 @@ function onRequest(context) {
types["roles"] = roles["content"]; types["roles"] = roles["content"];
} }
types["groups"] = groupModule.getGroups(); types["groups"] = groupModule.getGroups();
var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"];
types["isCloud"] = devicemgtProps.isCloud;
return types; return types;
} }

@ -146,7 +146,7 @@ stepForwardFrom["policy-platform"] = function (actionButton) {
if (policyOperationsTemplateSrc) { if (policyOperationsTemplateSrc) {
$.template(policyOperationsTemplateCacheKey, context + policyOperationsTemplateSrc, function (template) { $.template(policyOperationsTemplateCacheKey, context + policyOperationsTemplateSrc, function (template) {
var content = template(); var content = template({"iscloud" : $("#logged-in-user").data("iscloud")});
$("#device-type-policy-operations").html(content).removeClass("hidden"); $("#device-type-policy-operations").html(content).removeClass("hidden");
$(".policy-platform").addClass("hidden"); $(".policy-platform").addClass("hidden");
}); });

@ -17,5 +17,9 @@
}} }}
{{#zone "title"}} {{#zone "title"}}
{{@unit.params.pageTitle}} | {{@app.conf.appName}} {{#if isCloud}}
{{@unit.params.pageTitle}} | WSO2 Device Cloud
{{else}}
{{@unit.params.pageTitle}} | {{@app.conf.appName}}
{{/if}}
{{/zone}} {{/zone}}

@ -0,0 +1,8 @@
function onRequest(context) {
var deviceMgtProps = require("/app/modules/conf-reader/main.js")["conf"];
var viewModel = {};
viewModel.isCloud = deviceMgtProps.isCloud;
return viewModel;
}

@ -16,5 +16,9 @@
under the License. under the License.
}} }}
{{#zone "favicon"}} {{#zone "favicon"}}
<link rel="shortcut icon" href="{{@unit.publicUri}}/img/favicon.png" /> {{#if isCloud}}
<link rel="shortcut icon" href="{{@unit.publicUri}}/img/cloud-favicon.png" />
{{else}}
<link rel="shortcut icon" href="{{@unit.publicUri}}/img/favicon.png" />
{{/if}}
{{/zone}} {{/zone}}

@ -0,0 +1,8 @@
function onRequest(context) {
var deviceMgtProps = require("/app/modules/conf-reader/main.js")["conf"];
var viewModel = {};
viewModel.isCloud = deviceMgtProps.isCloud;
return viewModel;
}

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

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

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

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

@ -21,7 +21,7 @@
<parent> <parent>
<artifactId>dynamic-client-registration</artifactId> <artifactId>dynamic-client-registration</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>2.0.39-SNAPSHOT</version> <version>2.0.50-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -21,7 +21,7 @@
<parent> <parent>
<artifactId>dynamic-client-registration</artifactId> <artifactId>dynamic-client-registration</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>2.0.39-SNAPSHOT</version> <version>2.0.50-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -21,13 +21,13 @@
<parent> <parent>
<artifactId>dynamic-client-registration</artifactId> <artifactId>dynamic-client-registration</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>2.0.39-SNAPSHOT</version> <version>2.0.50-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.dynamic.client.registration</artifactId> <artifactId>org.wso2.carbon.dynamic.client.registration</artifactId>
<version>2.0.39-SNAPSHOT</version> <version>2.0.50-SNAPSHOT</version>
<packaging>bundle</packaging> <packaging>bundle</packaging>
<name>WSO2 Carbon - Dynamic client registration service</name> <name>WSO2 Carbon - Dynamic client registration service</name>
<description>WSO2 Carbon - Dynamic Client Registration Service</description> <description>WSO2 Carbon - Dynamic Client Registration Service</description>

@ -21,13 +21,13 @@
<parent> <parent>
<artifactId>dynamic-client-registration</artifactId> <artifactId>dynamic-client-registration</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>2.0.39-SNAPSHOT</version> <version>2.0.50-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.dynamic.client.web.app.registration</artifactId> <artifactId>org.wso2.carbon.dynamic.client.web.app.registration</artifactId>
<version>2.0.39-SNAPSHOT</version> <version>2.0.50-SNAPSHOT</version>
<packaging>bundle</packaging> <packaging>bundle</packaging>
<name>WSO2 Carbon - Dynamic client web app registration</name> <name>WSO2 Carbon - Dynamic client web app registration</name>
<description>WSO2 Carbon - Dynamic Client Web-app Registration Service</description> <description>WSO2 Carbon - Dynamic Client Web-app Registration Service</description>

@ -22,14 +22,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>identity-extensions</artifactId> <artifactId>identity-extensions</artifactId>
<version>2.0.39-SNAPSHOT</version> <version>2.0.50-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>dynamic-client-registration</artifactId> <artifactId>dynamic-client-registration</artifactId>
<version>2.0.39-SNAPSHOT</version> <version>2.0.50-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>WSO2 Carbon - Dynamic client registration</name> <name>WSO2 Carbon - Dynamic client registration</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>

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

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

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

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

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

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

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

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

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

@ -144,33 +144,35 @@ public class PolicyAdministratorPointImpl implements PolicyAdministratorPoint {
//Check whether the TaskType is already registered. If not we'll register it here. //Check whether the TaskType is already registered. If not we'll register it here.
if (!registeredTaskTypes.contains(PolicyManagementConstants.DELEGATION_TASK_TYPE)) { if (!registeredTaskTypes.contains(PolicyManagementConstants.DELEGATION_TASK_TYPE)) {
taskService.registerTaskType(PolicyManagementConstants.DELEGATION_TASK_TYPE); taskService.registerTaskType(PolicyManagementConstants.DELEGATION_TASK_TYPE);
TaskInfo registeredTaskInfo = null; }
// getTask method will throw a TaskException if the task is not registered. Hence we'll handle the
// exception and register the task. TaskInfo registeredTaskInfo = null;
try { // getTask method will throw a TaskException if the task is not registered. Hence we'll handle the
registeredTaskInfo = taskManager.getTask(taskName); // exception and register the task.
} catch (TaskException e) { try {
registeredTaskInfo = taskManager.getTask(taskName);
} catch (TaskException e) {
// No need of any specific logic to handle this exception as it is thrown if the task is not registered. // No need of any specific logic to handle this exception as it is thrown if the task is not registered.
} finally { } finally {
// If registeredTaskInfo is null that means there's no registered delegation-task. // If registeredTaskInfo is null that means there's no registered delegation-task.
if (registeredTaskInfo == null) { if (registeredTaskInfo == null) {
TaskInfo taskInfo = new TaskInfo(taskName, PolicyManagementConstants.DELEGATION_TASK_CLAZZ,
properties, triggerInfo);
taskManager.registerTask(taskInfo);
taskManager.scheduleTask(taskInfo.getName());
}
}
} else {
if (!taskManager.isTaskScheduled(taskName)) {
TaskInfo taskInfo = new TaskInfo(taskName, PolicyManagementConstants.DELEGATION_TASK_CLAZZ, TaskInfo taskInfo = new TaskInfo(taskName, PolicyManagementConstants.DELEGATION_TASK_CLAZZ,
properties, triggerInfo); properties, triggerInfo);
taskManager.registerTask(taskInfo);
taskManager.scheduleTask(taskInfo.getName()); taskManager.scheduleTask(taskInfo.getName());
} else { } else {
throw new PolicyManagementException("There is a task already running for policy changes. Please try " + if (!taskManager.isTaskScheduled(taskName)) {
"to apply " + TaskInfo taskInfo = new TaskInfo(taskName, PolicyManagementConstants.DELEGATION_TASK_CLAZZ,
"changes after few minutes."); properties, triggerInfo);
taskManager.scheduleTask(taskInfo.getName());
} else {
throw new PolicyManagementException("There is a task already running for policy changes. Please try " +
"to apply " +
"changes after few minutes.");
}
} }
} }
} catch (TaskException e) { } catch (TaskException e) {
String msg = "Error occurred while creating the policy delegation task for tenant " + String msg = "Error occurred while creating the policy delegation task for tenant " +
PrivilegedCarbonContext. PrivilegedCarbonContext.

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

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

@ -49,6 +49,9 @@ public class BasicAuthAuthenticator implements WebappAuthenticator {
@Override @Override
public boolean canHandle(Request request) { public boolean canHandle(Request request) {
if (!isAuthenticationSupported(request)) {
return false;
}
MessageBytes authorization = MessageBytes authorization =
request.getCoyoteRequest().getMimeHeaders().getValue(Constants.HTTPHeaders.HEADER_HTTP_AUTHORIZATION); request.getCoyoteRequest().getMimeHeaders().getValue(Constants.HTTPHeaders.HEADER_HTTP_AUTHORIZATION);
if (authorization != null) { if (authorization != null) {
@ -156,4 +159,9 @@ public class BasicAuthAuthenticator implements WebappAuthenticator {
} }
} }
private boolean isAuthenticationSupported(Request request) {
String param = request.getContext().findParameter("basicAuth");
return (param == null || !Boolean.parseBoolean(param));
}
} }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -22,14 +22,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>device-mgt-feature</artifactId> <artifactId>device-mgt-feature</artifactId>
<version>2.0.39-SNAPSHOT</version> <version>2.0.50-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.mgt.server.feature</artifactId> <artifactId>org.wso2.carbon.device.mgt.server.feature</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>2.0.39-SNAPSHOT</version> <version>2.0.50-SNAPSHOT</version>
<name>WSO2 Carbon - Device Management Server Feature</name> <name>WSO2 Carbon - Device Management Server Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>
<description>This feature contains the core bundles required for Back-end Device Management functionality <description>This feature contains the core bundles required for Back-end Device Management functionality
@ -61,6 +61,10 @@
<groupId>org.wso2.carbon.registry</groupId> <groupId>org.wso2.carbon.registry</groupId>
<artifactId>org.wso2.carbon.registry.indexing</artifactId> <artifactId>org.wso2.carbon.registry.indexing</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.wso2.carbon.analytics-common</groupId>
<artifactId>org.wso2.carbon.event.receiver.stub</artifactId>
</dependency>
</dependencies> </dependencies>
<build> <build>
@ -134,6 +138,9 @@
<bundleDef> <bundleDef>
org.wso2.orbit.com.fasterxml.jackson.core:jackson-annotations:${jackson-annotations.version} org.wso2.orbit.com.fasterxml.jackson.core:jackson-annotations:${jackson-annotations.version}
</bundleDef> </bundleDef>
<bundleDef>
org.wso2.carbon.analytics-common:org.wso2.carbon.event.receiver.stub:${carbon.analytics.common.version}
</bundleDef>
<!-- Below should be bundled with the email verification --> <!-- Below should be bundled with the email verification -->
</bundles> </bundles>
<importBundles> <importBundles>

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

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

@ -23,14 +23,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>dynamic-client-registration-feature</artifactId> <artifactId>dynamic-client-registration-feature</artifactId>
<version>2.0.39-SNAPSHOT</version> <version>2.0.50-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.dynamic.client.registration.server.feature</artifactId> <artifactId>org.wso2.carbon.dynamic.client.registration.server.feature</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>2.0.39-SNAPSHOT</version> <version>2.0.50-SNAPSHOT</version>
<name>WSO2 Carbon - Dynamic Client Registration Server Feature</name> <name>WSO2 Carbon - Dynamic Client Registration Server Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>
<description>This feature contains dynamic client registration features</description> <description>This feature contains dynamic client registration features</description>

@ -23,14 +23,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId> <artifactId>carbon-devicemgt</artifactId>
<version>2.0.39-SNAPSHOT</version> <version>2.0.50-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>dynamic-client-registration-feature</artifactId> <artifactId>dynamic-client-registration-feature</artifactId>
<version>2.0.39-SNAPSHOT</version> <version>2.0.50-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>WSO2 Carbon - Dynamic Client Registration Feature</name> <name>WSO2 Carbon - Dynamic Client Registration Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save