revert-70aa11f8
warunalakshitha 8 years ago
commit ff31ac3cbb

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

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

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

@ -26,6 +26,12 @@ import org.wso2.carbon.apimgt.application.extension.exception.APIManagerExceptio
*/
public interface APIManagementProviderService {
/**
* Check whether the tier is loaded for the tenant.
* @return
*/
boolean isTierLoaded();
/**
* Generate and retreive application keys. if the application does exist then
* create it and subscribe to apis that are grouped with the tags.

@ -45,8 +45,22 @@ public class APIManagementProviderServiceImpl implements APIManagementProviderSe
private static final String CONTENT_TYPE = "application/json";
private static final int MAX_API_PER_TAG = 200;
private static final String APP_TIER_TYPE = "application";
private static final Map<String, String> tiersMap = new HashMap<>();
private static final int MAX_ATTEMPTS = 20;
public boolean isTierLoaded() {
StoreClient storeClient = APIApplicationManagerExtensionDataHolder.getInstance().getIntegrationClientService()
.getStoreClient();
String tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext()
.getTenantDomain();
try {
storeClient.getIndividualTier().tiersTierLevelTierNameGet(ApiApplicationConstants.DEFAULT_TIER,
APP_TIER_TYPE,
tenantDomain, CONTENT_TYPE, null, null);
return true;
} catch (FeignException e) {
return false;
}
}
@Override
public void removeAPIApplication(String applicationName, String username) throws APIManagerException {
@ -72,31 +86,8 @@ public class APIManagementProviderServiceImpl implements APIManagementProviderSe
throws APIManagerException {
StoreClient storeClient = APIApplicationManagerExtensionDataHolder.getInstance().getIntegrationClientService()
.getStoreClient();
//This is a fix to avoid race condition and trying to load tenant related tiers before invocation.
String tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext()
.getTenantDomain();
String tiersLoadedForTenant = tiersMap.get(tenantDomain);
if (tiersLoadedForTenant == null) {
boolean tierLoaded = false;
int attempts = 0;
do {
try {
storeClient.getIndividualTier()
.tiersTierLevelTierNameGet(ApiApplicationConstants.DEFAULT_TIER, APP_TIER_TYPE,
tenantDomain, CONTENT_TYPE, null, null);
tiersMap.put(tenantDomain, "exist");
tierLoaded = true;
} catch (FeignException e) {
attempts++;
try {
Thread.sleep(500);
} catch (InterruptedException ex) {
log.warn("Interrupted the waiting for tier availability.");
}
}
} while ((!tierLoaded) && attempts < MAX_ATTEMPTS);
}
ApplicationList applicationList = storeClient.getApplications()
.applicationsGet("", applicationName, 1, 0, CONTENT_TYPE, null);

@ -21,13 +21,13 @@
<parent>
<artifactId>apimgt-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId>
<version>2.0.55-SNAPSHOT</version>
<version>2.0.65-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.apimgt.handlers</artifactId>
<version>2.0.55-SNAPSHOT</version>
<version>2.0.65-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>WSO2 Carbon - API Security Handler Component</name>
<description>WSO2 Carbon - API Management Security Handler Module</description>
@ -76,6 +76,7 @@
<Bundle-Description>WSO2 Carbon - API Security Handler Component</Bundle-Description>
<Import-Package>
org.apache.axiom.*,
javax.security.cert.*,
javax.xml.parsers;version="${javax.xml.parsers.import.pkg.version}";resolution:=optional,
javax.xml.*,
org.apache.axis2.*,
@ -90,7 +91,8 @@
org.w3c.dom,
org.apache.synapse,
org.apache.synapse.core.axis2,
org.apache.synapse.rest
org.apache.synapse.rest,
org.wso2.carbon.certificate.mgt.core.impl
</Import-Package>
</instructions>
</configuration>

@ -31,11 +31,17 @@ import org.wso2.carbon.apimgt.handlers.invoker.RESTInvoker;
import org.wso2.carbon.apimgt.handlers.invoker.RESTResponse;
import org.wso2.carbon.apimgt.handlers.utils.AuthConstants;
import org.wso2.carbon.apimgt.handlers.utils.Utils;
import org.wso2.carbon.certificate.mgt.core.impl.CertificateGenerator;
import org.wso2.carbon.context.PrivilegedCarbonContext;
import javax.security.cert.CertificateEncodingException;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.security.cert.CertificateException;
import java.security.cert.CertificateFactory;
import java.security.cert.X509Certificate;
import java.util.HashMap;
import java.util.Map;
import java.util.StringTokenizer;
@ -140,6 +146,21 @@ public class AuthenticationHandler extends AbstractHandler {
if (log.isDebugEnabled()) {
log.debug("Verify response:" + response.getContent());
}
} else if (headers.containsKey(AuthConstants.MUTUAL_AUTH_HEADER)) {
javax.security.cert.X509Certificate[] certs =
(javax.security.cert.X509Certificate[]) axisMC.getProperty(AuthConstants.CLIENT_CERTIFICATE);
CertificateFactory cf = CertificateFactory.getInstance("X.509");
ByteArrayInputStream bais = new ByteArrayInputStream(certs[0].getEncoded());
X509Certificate x509 = (X509Certificate) cf.generateCertificate(bais);
if (bais != null) {
bais.close();
}
if (x509 != null) {
headers.put(AuthConstants.PROXY_MUTUAL_AUTH_HEADER, CertificateGenerator.getCommonName(x509));
return true;
} else {
response = null;
}
} else if (headers.containsKey(AuthConstants.ENCODED_PEM)) {
String encodedPem = headers.get(AuthConstants.ENCODED_PEM).toString();
if (log.isDebugEnabled()) {
@ -178,8 +199,13 @@ public class AuthenticationHandler extends AbstractHandler {
} catch (APIMCertificateMGTException e) {
log.error("Error while processing certificate.", e);
return false;
} catch (CertificateException e) {
log.error("Certificate issue occurred when generating converting PEM to x509Certificate", e);
return false;
} catch (CertificateEncodingException e) {
log.error("Error while attempting to encode certificate.", e);
return false;
}
}
@Override
@ -205,4 +231,4 @@ public class AuthenticationHandler extends AbstractHandler {
map.put(CONTENT_TYPE, "application/json");
return map;
}
}
}

@ -35,6 +35,7 @@ public class AuthConstants {
// public static final String ANDROID_VERIFY_ENDPOINT = "android-verify-endpoint";
public static final String MDM_SIGNATURE = "mdm-signature";
public static final String PROXY_MUTUAL_AUTH_HEADER = "proxy-mutual-auth-header";
public static final String MUTUAL_AUTH_HEADER = "mutual-auth-header";
public static final String ENCODED_PEM = "encoded-pem";
public static final String CALLBACK_URL = "";
public static final String CLIENT_NAME = "IOT-API-MANAGER";
@ -46,4 +47,5 @@ public class AuthConstants {
public static final String BASIC_AUTH_PREFIX = "Basic ";
public static final String CLIENT_ID = "clientId";
public static final String CLIENT_SECRET = "clientSecret";
public static final String CLIENT_CERTIFICATE = "ssl.client.auth.cert.X509";
}

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

@ -19,7 +19,9 @@ package org.wso2.carbon.apimgt.integration.client.store;
import feign.Feign;
import feign.Logger;
import feign.Request;
import feign.RequestInterceptor;
import feign.Retryer;
import feign.gson.GsonDecoder;
import feign.gson.GsonEncoder;
import feign.slf4j.Slf4jLogger;
@ -28,6 +30,8 @@ import org.wso2.carbon.apimgt.integration.client.configs.APIMConfigReader;
import org.wso2.carbon.apimgt.integration.generated.client.store.api.*;
import org.wso2.carbon.core.util.Utils;
import java.util.concurrent.TimeUnit;
/**
* API Store client, created using swagger gen.
*/
@ -62,8 +66,10 @@ public class StoreClient {
individualSubscription = builder.target(SubscriptionIndividualApi.class, basePath);
subscriptionMultitpleApi = builder.target(SubscriptionMultitpleApi.class, basePath);
tags = builder.target(TagCollectionApi.class, basePath);
tiers = builder.target(ThrottlingTierCollectionApi.class, basePath);
individualTier = builder.target(ThrottlingTierIndividualApi.class, basePath);
tiers = builder.retryer(new Retryer.Default(100L, TimeUnit.SECONDS.toMillis(1L), 1))
.options(new Request.Options(10000, 5000))
.target(ThrottlingTierCollectionApi.class, basePath);
}

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

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

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

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

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

@ -30,6 +30,7 @@ import org.wso2.carbon.certificate.mgt.cert.jaxrs.api.util.RequestValidationUtil
import org.wso2.carbon.certificate.mgt.core.dto.CertificateResponse;
import org.wso2.carbon.certificate.mgt.core.exception.CertificateManagementException;
import org.wso2.carbon.certificate.mgt.core.exception.KeystoreException;
import org.wso2.carbon.certificate.mgt.core.impl.CertificateGenerator;
import org.wso2.carbon.certificate.mgt.core.scep.SCEPException;
import org.wso2.carbon.certificate.mgt.core.scep.SCEPManager;
import org.wso2.carbon.certificate.mgt.core.scep.TenantedDeviceWrapper;

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

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

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

@ -20,6 +20,7 @@ package org.wso2.carbon.device.mgt.extensions.device.type.deployer.template;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.w3c.dom.Document;
import org.wso2.carbon.context.PrivilegedCarbonContext;
import org.wso2.carbon.device.mgt.common.Device;
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
@ -42,12 +43,14 @@ import org.wso2.carbon.device.mgt.extensions.device.type.deployer.template.util.
import org.wso2.carbon.device.mgt.extensions.license.mgt.registry.RegistryBasedLicenseManager;
import org.wso2.carbon.registry.api.RegistryException;
import org.wso2.carbon.registry.api.Resource;
import org.wso2.carbon.utils.CarbonUtils;
import org.wso2.carbon.utils.multitenancy.MultitenantConstants;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;
import javax.xml.bind.Unmarshaller;
import java.io.File;
import java.io.StringReader;
import java.io.StringWriter;
import java.nio.charset.Charset;
@ -63,10 +66,15 @@ public class DeviceTypeManager implements DeviceManager {
private String deviceType;
private DeviceTypePluginDAOManager deviceTypePluginDAOManager;
private LicenseManager licenseManager;
private PlatformConfiguration defaultPlatformConfiguration;
private boolean propertiesExist;
private boolean requiredDeviceTypeAuthorization;
private boolean claimable;
private static final String PATH_MOBILE_PLUGIN_CONF_DIR =
CarbonUtils.getEtcCarbonConfigDirPath() + File.separator + "device-mgt-plugin-configs" + File.separator
+ "mobile";
private FeatureManager featureManager;
public DeviceTypeManager(DeviceTypeConfigIdentifier deviceTypeConfigIdentifier,
@ -107,6 +115,14 @@ public class DeviceTypeManager implements DeviceManager {
claimable = deviceTypeConfiguration.getClaimable().isEnabled();
}
// Loading default platform configuration
try {
defaultPlatformConfiguration = this.getDefaultConfiguration();
} catch (DeviceManagementException e) {
String msg = "Error occurred while default platform configuration";
throw new DeviceTypeDeployerFileException(msg, e);
}
DeviceDetails deviceDetails = deviceTypeConfiguration.getDeviceDetails();
if (deviceDetails != null) {
@ -205,6 +221,8 @@ public class DeviceTypeManager implements DeviceManager {
return (PlatformConfiguration) unmarshaller.unmarshal(
new StringReader(new String((byte[]) resource.getContent(), Charset.
forName(DeviceTypePluginConstants.CHARSET_UTF8))));
} else if (defaultPlatformConfiguration != null) {
return defaultPlatformConfiguration;
}
return null;
} catch (DeviceTypeMgtPluginException e) {
@ -371,6 +389,39 @@ public class DeviceTypeManager implements DeviceManager {
return requiredDeviceTypeAuthorization;
}
@Override
public PlatformConfiguration getDefaultConfiguration() throws DeviceManagementException {
if (log.isDebugEnabled()) {
log.debug("Loading default " + deviceType + " platform configuration from " + deviceType +
"-default-platform-configuration.xml");
}
try {
String platformConfigurationPath =
PATH_MOBILE_PLUGIN_CONF_DIR + File.separator + deviceType + "-default-platform-configuration.xml";
File platformConfig = new File(platformConfigurationPath);
if (platformConfig.exists()) {
Document doc = DeviceTypeUtils.convertToDocument(platformConfig);
JAXBContext context = JAXBContext.newInstance(PlatformConfiguration.class);
Unmarshaller unmarshaller = context.createUnmarshaller();
return (PlatformConfiguration) unmarshaller.unmarshal(doc);
} else {
log.warn(deviceType + "-default-platform-configuration.xml is not available, hence default " +
deviceType + "platform configuration cannot be loaded.");
}
return null;
} catch (JAXBException e) {
throw new DeviceManagementException(
"Error occurred while parsing the " + deviceType + " default platform configuration : " + e
.getMessage(), e);
} catch (DeviceTypeMgtPluginException e) {
throw new DeviceManagementException(
"Error occurred while parsing the " + deviceType + " default platform configuration : " + e
.getMessage(), e);
}
}
@Override
public boolean updateDeviceInfo(DeviceIdentifier deviceIdentifier, Device device)
throws DeviceManagementException {

@ -32,6 +32,7 @@ import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration
import org.wso2.carbon.device.mgt.common.policy.mgt.PolicyMonitoringManager;
import org.wso2.carbon.device.mgt.common.push.notification.PushNotificationConfig;
import org.wso2.carbon.device.mgt.common.spi.DeviceManagementService;
import org.wso2.carbon.device.mgt.extensions.device.type.deployer.config.ConfigProperties;
import org.wso2.carbon.device.mgt.extensions.device.type.deployer.config.DeviceTypeConfiguration;
import org.wso2.carbon.device.mgt.extensions.device.type.deployer.config.Property;
import org.wso2.carbon.device.mgt.extensions.device.type.deployer.config.PushNotificationProvider;
@ -59,7 +60,6 @@ public class DeviceTypeManagerService implements DeviceManagementService {
private List<MonitoringOperation> monitoringOperations;
private PolicyMonitoringManager policyMonitoringManager;
private InitialOperationConfig initialOperationConfig;
private List<String> operations;
public DeviceTypeManagerService(DeviceTypeConfigIdentifier deviceTypeConfigIdentifier,
DeviceTypeConfiguration deviceTypeConfiguration) {
@ -69,6 +69,7 @@ public class DeviceTypeManagerService implements DeviceManagementService {
this.populatePushNotificationConfig(deviceTypeConfiguration.getPushNotificationProvider());
this.operationMonitoringConfigs = new OperationMonitoringTaskConfig();
this.setOperationMonitoringConfig(deviceTypeConfiguration);
this.initialOperationConfig = new InitialOperationConfig();
this.setInitialOperationConfig(deviceTypeConfiguration);
if (deviceTypeConfiguration.getPolicyMonitoring() != null ) {
this.policyMonitoringManager = new DefaultPolicyMonitoringManager();
@ -113,8 +114,14 @@ public class DeviceTypeManagerService implements DeviceManagementService {
if (pushNotificationProvider != null) {
if (pushNotificationProvider.isFileBasedProperties()) {
Map<String, String> staticProps = new HashMap<>();
for (Property property : pushNotificationProvider.getConfigProperties().getProperty()) {
staticProps.put(property.getName(), property.getValue());
ConfigProperties configProperties = pushNotificationProvider.getConfigProperties();
if (configProperties != null) {
List<Property> properties = configProperties.getProperty();
if (properties != null && properties.size() > 0) {
for (Property property : properties) {
staticProps.put(property.getName(), property.getValue());
}
}
}
pushNotificationConfig = new PushNotificationConfig(pushNotificationProvider.getType(),
pushNotificationProvider.isScheduled(), staticProps);

@ -20,6 +20,7 @@ package org.wso2.carbon.device.mgt.extensions.device.type.deployer.template.util
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.w3c.dom.Document;
import org.wso2.carbon.context.PrivilegedCarbonContext;
import org.wso2.carbon.device.mgt.extensions.device.type.deployer.exception.DeviceTypeMgtPluginException;
import org.wso2.carbon.device.mgt.extensions.device.type.deployer.internal.DeviceTypeManagementDataHolder;
@ -30,6 +31,10 @@ import org.wso2.carbon.registry.core.Registry;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.sql.DataSource;
import javax.xml.XMLConstants;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import java.io.File;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
@ -128,4 +133,18 @@ public class DeviceTypeUtils {
}
}
public static Document convertToDocument(File file) throws DeviceTypeMgtPluginException {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setNamespaceAware(true);
try {
factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
DocumentBuilder docBuilder = factory.newDocumentBuilder();
return docBuilder.parse(file);
} catch (Exception e) {
throw new DeviceTypeMgtPluginException("Error occurred while parsing file '" + file.getName() + "' to" +
" a org.w3c.dom.Document", e);
}
}
}

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

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

@ -46,36 +46,52 @@ public class MQTTNotificationStrategy implements NotificationStrategy {
private String mqttAdapterName;
private static final Log log = LogFactory.getLog(MQTTNotificationStrategy.class);
private final PushNotificationConfig config;
private final String providerTenantDomain;
private static final Object lockObj = new Object();
public MQTTNotificationStrategy(PushNotificationConfig config) {
this.config = config;
OutputEventAdapterConfiguration adapterConfig = new OutputEventAdapterConfiguration();
adapterConfig.setType(MQTTAdapterConstants.MQTT_ADAPTER_TYPE);
mqttAdapterName = config.getProperty(MQTTAdapterConstants.MQTT_ADAPTER_PROPERTY_NAME);
adapterConfig.setName(mqttAdapterName);
adapterConfig.setMessageFormat(MessageType.TEXT);
Map<String, String> configProperties = new HashMap<String, String>();
String brokerUrl = config.getProperty(MQTTAdapterConstants.MQTT_ADAPTER_PROPERTY_BROKER_URL);
if (brokerUrl != null && !brokerUrl.isEmpty()) {
configProperties.put(MQTTAdapterConstants.MQTT_ADAPTER_PROPERTY_BROKER_URL, brokerUrl);
if (config.getProperties() != null && config.getProperties().size() > 0) {
String brokerUrl = config.getProperty(MQTTAdapterConstants.MQTT_ADAPTER_PROPERTY_BROKER_URL);
if (brokerUrl != null && !brokerUrl.isEmpty()) {
configProperties.put(MQTTAdapterConstants.MQTT_ADAPTER_PROPERTY_BROKER_URL, brokerUrl);
}
mqttAdapterName = config.getProperty(MQTTAdapterConstants.MQTT_ADAPTER_PROPERTY_NAME);
configProperties.put(MQTTAdapterConstants.MQTT_ADAPTER_PROPERTY_USERNAME,
config.getProperty(MQTTAdapterConstants.MQTT_ADAPTER_PROPERTY_USERNAME));
configProperties.put(MQTTAdapterConstants.MQTT_ADAPTER_PROPERTY_PASSWORD,
config.getProperty(MQTTAdapterConstants.MQTT_ADAPTER_PROPERTY_PASSWORD));
configProperties.put(MQTTAdapterConstants.MQTT_ADAPTER_PROPERTY_CLEAR_SESSION,
config.getProperty(MQTTAdapterConstants.MQTT_ADAPTER_PROPERTY_CLEAR_SESSION));
configProperties.put(MQTTAdapterConstants.MQTT_ADAPTER_PROPERTY_SCOPES,
config.getProperty(MQTTAdapterConstants.MQTT_ADAPTER_PROPERTY_SCOPES));
configProperties.put(MQTTAdapterConstants.MQTT_ADAPTER_PROPERTY_MESSAGE_QOS,
config.getProperty(MQTTAdapterConstants.MQTT_ADAPTER_PROPERTY_MESSAGE_QOS));
} else {
mqttAdapterName = "mqtt.adapter." + PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain()
.toLowerCase();
}
configProperties.put(MQTTAdapterConstants.MQTT_ADAPTER_PROPERTY_USERNAME,
config.getProperty(MQTTAdapterConstants.MQTT_ADAPTER_PROPERTY_USERNAME));
configProperties.put(MQTTAdapterConstants.MQTT_ADAPTER_PROPERTY_PASSWORD,
config.getProperty(MQTTAdapterConstants.MQTT_ADAPTER_PROPERTY_PASSWORD));
configProperties.put(MQTTAdapterConstants.MQTT_ADAPTER_PROPERTY_CLEAR_SESSION,
config.getProperty(MQTTAdapterConstants.MQTT_ADAPTER_PROPERTY_CLEAR_SESSION));
configProperties.put(MQTTAdapterConstants.MQTT_ADAPTER_PROPERTY_SCOPES,
config.getProperty(MQTTAdapterConstants.MQTT_ADAPTER_PROPERTY_SCOPES));
configProperties.put(MQTTAdapterConstants.MQTT_ADAPTER_PROPERTY_MESSAGE_QOS,
config.getProperty(MQTTAdapterConstants.MQTT_ADAPTER_PROPERTY_MESSAGE_QOS));
adapterConfig.setName(mqttAdapterName);
adapterConfig.setStaticProperties(configProperties);
try {
MQTTDataHolder.getInstance().getOutputEventAdapterService().create(adapterConfig);
synchronized (lockObj) {
try {
MQTTDataHolder.getInstance().getOutputEventAdapterService().isPolled(mqttAdapterName);
} catch (OutputEventAdapterException e) {
//event adapter not created
MQTTDataHolder.getInstance().getOutputEventAdapterService().create(adapterConfig);
}
}
} catch (OutputEventAdapterException e) {
throw new InvalidConfigurationException("Error occurred while initializing MQTT output event adapter", e);
}
providerTenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain()
.toLowerCase();
}
@Override
@ -85,19 +101,47 @@ public class MQTTNotificationStrategy implements NotificationStrategy {
@Override
public void execute(NotificationContext ctx) throws PushNotificationExecutionFailedException {
String adapterName = mqttAdapterName;
String tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain(true);
if (!providerTenantDomain.equals(tenantDomain)) {
//this is to handle the device type shared with all tenant mode.
adapterName = "mqtt.adapter." + PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain()
.toLowerCase();
try {
MQTTDataHolder.getInstance().getOutputEventAdapterService().isPolled(adapterName);
} catch (OutputEventAdapterException e) {
//event adapter not created
synchronized (lockObj) {
OutputEventAdapterConfiguration adapterConfig = new OutputEventAdapterConfiguration();
adapterConfig.setType(MQTTAdapterConstants.MQTT_ADAPTER_TYPE);
adapterConfig.setMessageFormat(MessageType.TEXT);
adapterConfig.setName(adapterName);
Map<String, String> configProperties = new HashMap<String, String>();
adapterConfig.setStaticProperties(configProperties);
try {
MQTTDataHolder.getInstance().getOutputEventAdapterService().create(adapterConfig);
} catch (OutputEventAdapterException e1) {
throw new PushNotificationExecutionFailedException
("Error occurred while initializing MQTT output event adapter for shared tenant: "
+ tenantDomain, e);
}
}
}
}
Operation operation = ctx.getOperation();
Properties properties = operation.getProperties();
if (properties != null && properties.get(MQTT_ADAPTER_TOPIC) != null) {
Map<String, String> dynamicProperties = new HashMap<>();
dynamicProperties.put("topic", (String) properties.get(MQTT_ADAPTER_TOPIC));
MQTTDataHolder.getInstance().getOutputEventAdapterService().publish(mqttAdapterName, dynamicProperties,
MQTTDataHolder.getInstance().getOutputEventAdapterService().publish(adapterName, dynamicProperties,
operation.getPayLoad());
} else {
if (PolicyOperation.POLICY_OPERATION_CODE.equals(operation.getCode())) {
PolicyOperation policyOperation = (PolicyOperation) operation;
List<ProfileOperation> profileOperations = policyOperation.getProfileOperations();
String tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain(true);
String deviceType = ctx.getDeviceId().getType();
String deviceId = ctx.getDeviceId().getId();
for (ProfileOperation profileOperation : profileOperations) {
@ -106,7 +150,7 @@ public class MQTTNotificationStrategy implements NotificationStrategy {
+ deviceType + "/" + deviceId + "/" + profileOperation.getType()
.toString().toLowerCase() + "/" + profileOperation.getCode().toLowerCase();
dynamicProperties.put("topic", topic);
MQTTDataHolder.getInstance().getOutputEventAdapterService().publish(mqttAdapterName, dynamicProperties,
MQTTDataHolder.getInstance().getOutputEventAdapterService().publish(adapterName, dynamicProperties,
profileOperation.getPayLoad());
}
@ -119,7 +163,7 @@ public class MQTTNotificationStrategy implements NotificationStrategy {
if (operation.getPayLoad() == null) {
operation.setPayLoad("");
}
MQTTDataHolder.getInstance().getOutputEventAdapterService().publish(mqttAdapterName, dynamicProperties,
MQTTDataHolder.getInstance().getOutputEventAdapterService().publish(adapterName, dynamicProperties,
operation.getPayLoad());
}

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

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

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

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

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

@ -115,4 +115,43 @@ public interface DeviceAccessAuthorizationAdminService {
response = ErrorResponse.class)
})
Response isAuthorized(AuthorizationRequest authorizationRequest);
@POST
@Path("/stat")
@ApiOperation(
consumes = MediaType.APPLICATION_JSON,
produces = MediaType.APPLICATION_JSON,
httpMethod = "POST",
value = "Check for device access authorization for stat\n",
notes = "This is an internal API that can be used to check for authorization.",
response = DeviceAuthorizationResult.class,
tags = "Authorization Administrative Service",
extensions = {
@Extension(properties = {
@ExtensionProperty(name = Constants.SCOPE, value = "perm:authorization:verify")
})
})
@ApiResponses(value = {
@ApiResponse(
code = 200,
message = "OK. \n Authorized device list will be delivered to the requested services",
response = DeviceAuthorizationResult.class),
@ApiResponse(
code = 400,
message = "Bad Request. \n Invalid request or validation error.",
response = ErrorResponse.class),
@ApiResponse(
code = 404,
message = "Not Found. \n The specified resource does not exist."),
@ApiResponse(
code = 415,
message = "Unsupported media type. \n The entity of the request was in a not supported format."),
@ApiResponse(
code = 500,
message = "Internal Server Error. \n Server error occurred while checking the authorization" +
" for a specified set of devices.",
response = ErrorResponse.class)
})
Response isAuthorizedForStat(AuthorizationRequest authorizationRequest);
}

@ -38,7 +38,7 @@ import javax.ws.rs.core.Response;
title = "",
extensions = {
@Extension(properties = {
@ExtensionProperty(name = "name", value = "DeviceTypePublisherAdminService"),
@ExtensionProperty(name = "name", value = "DeviceAnalyticsArtifactUploaderAdminService"),
@ExtensionProperty(name = "context", value = "/api/device-mgt/v1.0/admin/devicetype"),
})
}
@ -62,7 +62,7 @@ import javax.ws.rs.core.Response;
}
)
public interface DeviceTypePublisherAdminService {
public interface DeviceAnalyticsArtifactUploaderAdminService {
@POST
@Path("/deploy/{type}")
@ -107,42 +107,4 @@ public interface DeviceTypePublisherAdminService {
required = true)
@PathParam("type") String type);
@GET
@Path("/deploy/{type}/status")
@ApiOperation(
httpMethod = "GET",
value = "Check the status of device type artifact\n",
notes = "This is an API that can be used to check the status of the artifact",
response = Response.class,
tags = "Devicetype Status Service",
extensions = {
@Extension(properties = {
@ExtensionProperty(name = Constants.SCOPE, value = "perm:devicetype:deployment")
})
})
@ApiResponses(value = {
@ApiResponse(
code = 201,
message = "OK. \n Successfully deployed the artifacts.",
response = Response.class),
@ApiResponse(
code = 400,
message = "Bad Request. \n Invalid request or validation error.",
response = ErrorResponse.class),
@ApiResponse(
code = 404,
message = "Not Found. \n The specified resource does not exist."),
@ApiResponse(
code = 415,
message = "Unsupported media type. \n The entity of the request was in a not supported format."),
@ApiResponse(
code = 500,
message = "Internal Server Error. \n Server error occurred while checking the authorization" +
" for a specified set of devices.",
response = ErrorResponse.class)
})
Response getStatus(@PathParam("type") String deviceType);
}

@ -550,7 +550,6 @@ public class DeviceManagementServiceImpl implements DeviceManagementService {
if (policy == null) {
deviceCompliance.setDeviceID(id);
deviceCompliance.setComplianceData(null);
//deviceCompliance.setCode(0001l); //code 0001 means no compliance data related to the device
return Response.status(Response.Status.OK).entity(deviceCompliance).build();
} else {
try {
@ -559,7 +558,6 @@ public class DeviceManagementServiceImpl implements DeviceManagementService {
new DeviceIdentifier(id, type));
deviceCompliance.setDeviceID(id);
deviceCompliance.setComplianceData(complianceData);
//deviceCompliance.setCode(0002l); //code 0002 means there are compliance data related to the device
return Response.status(Response.Status.OK).entity(deviceCompliance).build();
} catch (PolicyComplianceException e) {
String error = "Error occurred while getting the compliance data.";

@ -36,6 +36,8 @@ import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import java.util.ArrayList;
import java.util.List;
@Path("/admin/authorization")
@Produces(MediaType.APPLICATION_JSON)
@ -43,6 +45,7 @@ import javax.ws.rs.core.Response;
public class DeviceAccessAuthorizationAdminServiceImpl implements DeviceAccessAuthorizationAdminService {
private static final Log log = LogFactory.getLog(DeviceAccessAuthorizationAdminServiceImpl.class);
private static final String DEFAULT_STAT_PERMISSION = "/permission/admin/device-mgt/device/realtime_analytics";
@POST
@Override
@ -90,4 +93,14 @@ public class DeviceAccessAuthorizationAdminServiceImpl implements DeviceAccessAu
}
}
@POST
@Path("/stat")
@Override
public Response isAuthorizedForStat(AuthorizationRequest authorizationRequest) {
List<String> permissions = new ArrayList<>();
permissions.add(DEFAULT_STAT_PERMISSION);
authorizationRequest.setPermissions(permissions);
return isAuthorized(authorizationRequest);
}
}

@ -37,13 +37,10 @@ import org.wso2.carbon.application.mgt.stub.upload.types.carbon.UploadedFileItem
import org.wso2.carbon.base.ServerConfiguration;
import org.wso2.carbon.context.PrivilegedCarbonContext;
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.DeviceAnalyticsArtifactUploaderAdminService;
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.exception.JWTClientException;
import org.wso2.carbon.registry.core.Registry;
import org.wso2.carbon.registry.core.Resource;
import org.wso2.carbon.registry.core.ResourceImpl;
import org.wso2.carbon.registry.core.exceptions.RegistryException;
import org.wso2.carbon.user.api.UserStoreException;
import org.wso2.carbon.utils.CarbonUtils;
@ -55,7 +52,6 @@ import javax.activation.DataHandler;
import javax.net.ssl.KeyManagerFactory;
import javax.net.ssl.SSLContext;
import javax.net.ssl.TrustManagerFactory;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
@ -73,7 +69,7 @@ import java.util.ArrayList;
import java.util.List;
@Path("/admin/devicetype")
public class DeviceTypePublisherAdminServiceImpl implements DeviceTypePublisherAdminService {
public class DeviceAnalyticsArtifactUploaderAdminServiceImpl implements DeviceAnalyticsArtifactUploaderAdminService {
/**
* required soap header for authorization
@ -110,7 +106,7 @@ public class DeviceTypePublisherAdminServiceImpl implements DeviceTypePublisherA
private String tenantDomain;
private static final Log log = LogFactory.getLog(DeviceTypePublisherAdminServiceImpl.class);
private static final Log log = LogFactory.getLog(DeviceAnalyticsArtifactUploaderAdminServiceImpl.class);
private static final String DEFAULT_RESOURCE_LOCATION = "/resources/devicetypes";
private static final String CAR_FILE_LOCATION = CarbonUtils.getCarbonHome() + File.separator + "repository" +
File.separator + "resources" + File.separator + "devicetypes";
@ -178,6 +174,9 @@ public class DeviceTypePublisherAdminServiceImpl implements DeviceTypePublisherA
publishDynamicEventReceivers(type, MultitenantConstants.SUPER_TENANT_DOMAIN_NAME, receiverFileList);
}
}
if (streamFileList != null) {
publishDynamicEventStream(type, tenantDomain, streamFileList);
}
if (deployAnalyticsCapp(type, list)){
return Response.status(Response.Status.BAD_REQUEST)
.entity("\"Error, Artifact does not exist.\"").build();
@ -185,14 +184,6 @@ public class DeviceTypePublisherAdminServiceImpl implements DeviceTypePublisherA
if (receiverFileList != null) {
publishDynamicEventReceivers(type, tenantDomain, receiverFileList);
}
int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId();
Registry registry = DeviceMgtAPIUtils.getRegistryService().getConfigSystemRegistry(tenantId);
if (!registry.resourceExists(DEFAULT_RESOURCE_LOCATION + type + ".exist")) {
Resource resource = new ResourceImpl();
resource.setContent("</exist>");
resource.setMediaType(MEDIA_TYPE_XML);
registry.put(DEFAULT_RESOURCE_LOCATION + type + ".exist", resource);
}
return Response.status(Response.Status.CREATED).entity("\"OK. \\n Successfully uploaded the artifacts.\"")
.build();
} catch (AxisFault e) {
@ -227,23 +218,25 @@ public class DeviceTypePublisherAdminServiceImpl implements DeviceTypePublisherA
if (directory.isDirectory() && directory.exists()) {
UploadedFileItem[] uploadedFileItems = loadCappFromFileSystem(type);
if (uploadedFileItems.length > 0) {
carbonAppUploaderStub = new CarbonAppUploaderStub(Utils.replaceSystemProperty(
IOT_MGT_URL));
Options appUploaderOptions = carbonAppUploaderStub._getServiceClient().getOptions();
if (appUploaderOptions == null) {
appUploaderOptions = new Options();
}
appUploaderOptions.setProperty(HTTPConstants.HTTP_HEADERS, list);
appUploaderOptions.setProperty(HTTPConstants.CUSTOM_PROTOCOL_HANDLER
, new Protocol(DEFAULT_HTTP_PROTOCOL, (ProtocolSocketFactory) new SSLProtocolSocketFactory
(sslContext), Integer.parseInt(Utils.replaceSystemProperty(IOT_MGT_PORT))));
carbonAppUploaderStub._getServiceClient().setOptions(appUploaderOptions);
carbonAppUploaderStub.uploadApp(uploadedFileItems);
if (DEVICE_MANAGEMENT_TYPE.equals(type.toLowerCase())) {
carbonAppUploaderStub = new CarbonAppUploaderStub(Utils.replaceSystemProperty(
IOT_MGT_URL));
Options appUploaderOptions = carbonAppUploaderStub._getServiceClient().getOptions();
if (appUploaderOptions == null) {
appUploaderOptions = new Options();
}
appUploaderOptions.setProperty(HTTPConstants.HTTP_HEADERS, list);
appUploaderOptions.setProperty(HTTPConstants.CUSTOM_PROTOCOL_HANDLER
, new Protocol(DEFAULT_HTTP_PROTOCOL,
(ProtocolSocketFactory) new SSLProtocolSocketFactory
(sslContext), Integer.parseInt(Utils.replaceSystemProperty(
IOT_MGT_PORT))));
if (!DEVICE_MANAGEMENT_TYPE.equals(type.toLowerCase())) {
carbonAppUploaderStub._getServiceClient().setOptions(appUploaderOptions);
carbonAppUploaderStub.uploadApp(uploadedFileItems);
} else {
carbonAppUploaderStub = new CarbonAppUploaderStub(Utils.replaceSystemProperty(DAS_URL));
appUploaderOptions = carbonAppUploaderStub._getServiceClient().getOptions();
Options appUploaderOptions = carbonAppUploaderStub._getServiceClient().getOptions();
if (appUploaderOptions == null) {
appUploaderOptions = new Options();
}
@ -266,27 +259,6 @@ public class DeviceTypePublisherAdminServiceImpl implements DeviceTypePublisherA
}
}
@GET
@Path("/deploy/{type}/status")
@Override
public Response getStatus(@PathParam("type") String deviceType) {
int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId();
Registry registry;
try {
registry = DeviceMgtAPIUtils.getRegistryService().getConfigSystemRegistry(tenantId);
if (registry.resourceExists(DEFAULT_RESOURCE_LOCATION + deviceType + ".exist")) {
return Response.status(Response.Status.OK).entity("Exist").build();
} else {
return Response.status(Response.Status.NO_CONTENT).entity("Does not Exist").build();
}
} catch (RegistryException e) {
log.error("Registry failed to load." + e.getMessage(), e);
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(
"\"Error, Artifact status check has failed\"").build();
}
}
private void publishDynamicEventReceivers(String deviceType, String tenantDomain, List<String> receiversList)
throws IOException, UserStoreException, JWTClientException {

@ -40,7 +40,7 @@
<ref bean="applicationManagementAdminService"/>
<ref bean="deviceTypeManagementAdminService"/>
<ref bean="deviceTypeManagementAdminService"/>
<ref bean="deviceTypePublisherAdminServiceImpl"/>
<ref bean="deviceAnalyticsArtifactUploaderAdminService"/>
<ref bean="swaggerResource"/>
</jaxrs:serviceBeans>
<jaxrs:providers>
@ -82,7 +82,7 @@
<bean id="userManagementAdminService" class="org.wso2.carbon.device.mgt.jaxrs.service.impl.admin.UserManagementAdminServiceImpl"/>
<bean id="deviceTypeManagementAdminService" class="org.wso2.carbon.device.mgt.jaxrs.service.impl.DeviceTypeManagementServiceImpl"/>
<bean id="deviceAccessAuthorizationAdminService" class="org.wso2.carbon.device.mgt.jaxrs.service.impl.admin.DeviceAccessAuthorizationAdminServiceImpl"/>
<bean id="deviceTypePublisherAdminServiceImpl" class="org.wso2.carbon.device.mgt.jaxrs.service.impl.admin.DeviceTypePublisherAdminServiceImpl"/>
<bean id="deviceAnalyticsArtifactUploaderAdminService" class="org.wso2.carbon.device.mgt.jaxrs.service.impl.admin.DeviceAnalyticsArtifactUploaderAdminServiceImpl"/>
<bean id="jsonProvider" class="org.wso2.carbon.device.mgt.jaxrs.common.GsonMessageBodyHandler"/>

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

@ -157,4 +157,13 @@ public interface DeviceManager {
*/
boolean requireDeviceAuthorization();
/**
* This method returns the default configuration values which is stored in the configuration file
* rather than fetching from the registry.
*
* @return Returns Default PlatformConfiguration
* @throws DeviceManagementException
*/
PlatformConfiguration getDefaultConfiguration() throws DeviceManagementException;
}

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

@ -2114,22 +2114,21 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
deviceIdentifiers.add(deviceIdentifier);
if (init != null) {
List<String> initialOperations = init.getOperations();
for (String str : initialOperations) {
CommandOperation operation = new CommandOperation();
operation.setEnabled(true);
operation.setType(Operation.Type.COMMAND);
operation.setCode(str);
try {
deviceManagementProviderService.
addOperation(deviceType,
operation, deviceIdentifiers);
} catch (OperationManagementException e) {
throw new DeviceManagementException("Unable to find the device with the id: '" + deviceIdentifier.getId(),
e);
} catch (InvalidDeviceException e) {
throw new DeviceManagementException("Unable to find the device with the id: '" + deviceIdentifier.getId(),
e);
if (initialOperations != null) {
for (String str : initialOperations) {
CommandOperation operation = new CommandOperation();
operation.setEnabled(true);
operation.setType(Operation.Type.COMMAND);
operation.setCode(str);
try {
deviceManagementProviderService.addOperation(deviceType, operation, deviceIdentifiers);
} catch (OperationManagementException e) {
throw new DeviceManagementException("Unable to add the operation for the device with the id: '"
+ deviceIdentifier.getId(), e);
} catch (InvalidDeviceException e) {
throw new DeviceManagementException("Unable to find the device with the id: '"
+ deviceIdentifier.getId(), e);
}
}
}
}

@ -121,4 +121,9 @@ public class TestDeviceManager implements DeviceManager {
return false;
}
@Override
public PlatformConfiguration getDefaultConfiguration() throws DeviceManagementException {
return null;
}
}

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

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

@ -176,6 +176,27 @@ if (uriMatcher.match("/{context}/api/user/authenticate")) {
}
} else if (uriMatcher.match("/{context}/api/user/all")) {
result = userModule.getUsers();
} else if (uriMatcher.match("/{context}/api/user/environment-loaded")) {
try {
var carbonUser = session.get(constants.USER_SESSION_KEY);
if (!carbonUser) {
response.sendRedirect("/devicemgt/login?#login-required");
exit();
}
utility.startTenantFlow(carbonUser);
var APIManagementProviderService = utility.getAPIManagementProviderService();
var isLoaded = APIManagementProviderService.isTierLoaded();
result = {"isLoaded": isLoaded};
if (isLoaded) {
var samlToken = session.get(constants.SAML_TOKEN_KEY);
if (samlToken) {
apiWrapperUtil.setupTokenPairByJWTGrantType(carbonUser.username + '@' + carbonUser.domain, samlToken);
}
}
response.contentType = 'application/json';
} finally {
utility.endTenantFlow();
}
}
// returning the result.

@ -11,7 +11,7 @@
"login": {
"onSuccess": {
"script": "/app/modules/login.js",
"page": "cdmf.page.dashboard"
"page": "cdmf.page.processing"
},
"onFail": {
"script": "/app/modules/login.js",

@ -0,0 +1,57 @@
{{!-- Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
WSO2 Inc. licenses this file to you under the Apache License,
Version 2.0 (the "License"); you may not use this file except
in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the License for the
specific language governing permissions and limitations
under the License. --}}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{{defineZone "favicon"}}
<title>
{{defineZone "title"}}
</title>
{{defineZone "topLibCss"}}
{{defineZone "topCss"}}
{{defineZone "topJs"}}
</head>
<body>
<!--modal-->
<div class="modal fade" tabindex="-1" role="dialog" aria-labelledby="modalDemo">
<div class="modal-dialog" role="document">
<div class="modal-content clearfix">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><i class="fw fw-cancel"></i></button>
</div>
<div class="modal-body add-margin-top-2x add-margin-bottom-2x">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!--modal-->
{{defineZone "content"}}
{{defineZone "bottomModalContent"}}
{{defineZone "bottomLibJs"}}
{{defineZone "bottomJs"}}
</body>
</html>

@ -612,6 +612,9 @@ var userModule = function () {
if (publicMethods.isAuthorized("/permission/admin/device-mgt/devices/change-status")) {
permissions["CHANGE_DEVICE_STATUS"] = true;
}
if (publicMethods.isAuthorized("/permission/admin/device-mgt")) {
permissions["IS_ADMIN"] = true;
}
return permissions;
};

@ -81,3 +81,6 @@ var CACHED_CREDENTIALS = "tenantBasedCredentials";
var CACHED_CREDENTIALS_FOR_WEBSOCKET_APP = "tenantBasedWebSocketClientCredentials";
var ALLOWED_SCOPES = "scopes";
var SAML_TOKEN_KEY = "samlToken";
var SKIP_WELCOME_SCREEN ="skipWelcomeScreen";

@ -25,6 +25,19 @@ var onFail;
onSuccess = function (context) {
var utility = require("/app/modules/utility.js").utility;
var apiWrapperUtil = require("/app/modules/oauth/token-handlers.js")["handlers"];
try {
utility.startTenantFlow(context.user);
var APIManagementProviderService = utility.getAPIManagementProviderService();
var isLoaded = APIManagementProviderService.isTierLoaded();
if(!isLoaded && context.input.samlToken) {
session.put(constants.SKIP_WELCOME_SCREEN, false);
session.put(constants.SAML_TOKEN_KEY, context.input.samlToken);
return;
}
} finally {
utility.endTenantFlow();
}
session.put(constants.SKIP_WELCOME_SCREEN, true);
if (context.input.samlToken) {
//apiWrapperUtil.setupTokenPairBySamlGrantType(context.user.username + '@' + context.user.domain, context.input.samlToken);
/**

@ -53,6 +53,10 @@ utility = function () {
return getOsgiService('org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService');
};
publicMethods.getAPIManagementProviderService = function () {
return getOsgiService('org.wso2.carbon.apimgt.application.extension.APIManagementProviderService');
};
publicMethods.getUserManagementService = function () {
return getOsgiService("org.wso2.carbon.device.mgt.user.core.UserManager");
};

@ -16,7 +16,7 @@
* under the License.
*/
function onRequest() {
function onRequest(context) {
var constants = require("/app/modules/constants.js");
var userModule = require("/app/modules/business-controllers/user.js")["userModule"];
var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"];
@ -24,6 +24,11 @@ function onRequest() {
var groupModule = require("/app/modules/business-controllers/group.js")["groupModule"];
var policyModule = require("/app/modules/business-controllers/policy.js")["policyModule"];
if(!session.get(constants["TOKEN_PAIR"])){
response.sendRedirect(context.app.context + "/welcome");
return;
}
var user = session.get(constants["USER_SESSION_KEY"]);
var permissions = userModule.getUIPermissions();

@ -40,6 +40,20 @@
</li>
{{/zone}}
{{#zone "navbarActions"}}
{{#if isCloud}}
<li>
<a href="{{contact_form_url}}" class="cu-btn">
<span class="icon fw-stack">
<i class="fw fw-mail fw-stack-1x"></i>
<i class="fw fw-circle-outline fw-stack-2x"></i>
</span>
Request new device type
</a>
</li>
{{/if}}
{{/zone}}
{{#zone "content"}}
<div class="wr-device-list row">
<div class="wr-hidden-operations wr-advance-operations"></div>

@ -0,0 +1,31 @@
/*
* Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/**
* Returns the dynamic state to be populated by device-enrollment page.
*
* @param context Object that gets updated with the dynamic state of this page to be presented
* @returns {*} A context object that returns the dynamic state of this page to be presented
*/
function onRequest(context) {
var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"];
var page = {};
page["isCloud"] = devicemgtProps.isCloud;
page["contact_form_url"] = "https://cloudmgt.cloud.wso2.com/cloudmgt/site/pages/contact-us.jag?cloud-type=device_cloud&subject=Requesting for a new device type";
return page;
}

@ -519,7 +519,7 @@
{{/zone}}
{{#zone "bottomJs"}}
<script id="device-listing" data-analitics-url="{{analiticsURL}}" data-current-user="{{@user.username}}" data-device-types="{{deviceTypes}}"
<script id="device-listing" data-analitics-url="{{analyticsURL}}" data-current-user="{{@user.username}}" data-device-types="{{deviceTypes}}"
type="text/x-handlebars-template"></script>
{{js "js/listing.js"}}
{{/zone}}

@ -80,10 +80,9 @@ function onRequest(context) {
}
var mdmProps = require("/app/modules/conf-reader/main.js")["conf"];
var cUser = userModule.getUser();
var analiticsServer = mdmProps["dashboardServerURL"];
var analiticsURL = analiticsServer + "/portal/t/" + cUser.userDomain + "/dashboards/android-iot/battery?owner=" + cUser.username + "&deviceId=";
viewModel.analiticsURL = analiticsURL;
var analyticsServer = mdmProps["dashboardServerURL"];
var analyticsURL = analyticsServer + "/portal/t/" + context.user.userDomain + "/dashboards/android-iot/battery?owner=" + context.user.username + "&deviceId=";
viewModel.analyticsURL = analyticsURL;
return viewModel;
}

@ -0,0 +1,57 @@
{{!
Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
WSO2 Inc. licenses this file to you under the Apache License,
Version 2.0 (the "License"); you may not use this file except
in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
}}
{{unit "cdmf.unit.ui.title" pageTitle="Home"}}
{{#zone "breadcrumbs"}}
<li>
<a href="{{@app.context}}/">
<i class="icon fw fw-home"></i>
</a>
</li>
{{/zone}}
{{#zone "content"}}
<div class="row">
<div class="col-md-12">
Loading...Please Wait
</div>
</div>
{{/zone}}
{{#zone "bottomJs"}}
<script type="text/javascript">
$('body').attr("data-toggle", "loading")
.attr("data-loading-style", "overlay")
.attr("data-loading-text", "SETTING UP YOUR ENVIRONMENT . . .");
$('[data-toggle="loading"]').loading('show');
</script>
{{js "/js/script.js"}}
{{/zone}}
{{#zone "topCss"}}
<style>
.loading[data-loading-style=overlay] .loading-bg{
background: #11375B;
opacity: 1;
filter: alpha(opacity=100);
}
.loading .loading-animation{
width : 200px;
}
</style>
{{/zone}}

@ -0,0 +1,27 @@
/*
* Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
function onRequest(context) {
var constants = require("/app/modules/constants.js");
var skipWelcomeScreen = session.get(constants.SKIP_WELCOME_SCREEN);
if (skipWelcomeScreen) {
response.sendRedirect(context.app.context + "/");
exit();
}
return {};
}

@ -0,0 +1,30 @@
var pollingCount = 24;
function poll() {
$.ajax({
url: context + "/api/user/environment-loaded",
type: "GET",
success: function (data) {
if (data.isLoaded) {
window.location = context + "/";
}
},
dataType: "json",
complete: setTimeout(function () {
pollingCount = pollingCount - 1;
if (pollingCount > 0) {
poll();
} else {
$(".loading-animation .logo").hide();
$(".loading-animation").prepend(
'<i class="fw fw-error fw-inverse fw-2x" style="float: left;"></i>');
$(".loading-animation p").css("width", "150%")
.html("Ops... it seems something went wrong.<br/> Refresh the page to retry!");
}
}, 5000),
timeout: 5000
});
}
$(document).ready(function () {
poll();
});

@ -17,8 +17,8 @@
}}
{{#zone "footer"}}
<p>
<span class="hidden-xs">WSO2 IoT Server 3.1.0</span>
<span class="visible-xs-inline">WSO2 IoT Server 3.1.0</span> | &copy; <script>document.write(new Date().getFullYear());</script>,
<span class="hidden-xs">WSO2 IoT Server{{#unless isCloud}} 3.1.0{{/unless}}</span>
<span class="visible-xs-inline">WSO2 IoT Server{{#unless isCloud}} 3.1.0{{/unless}}</span> | &copy; <script>document.write(new Date().getFullYear());</script>,
<a href="http://wso2.com/" target="_blank"><i class="icon fw fw-wso2"></i> Inc</a>. All Rights Reserved.
</p>
{{/zone}}

@ -0,0 +1,24 @@
/*
* Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
function onRequest(context) {
var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"];
var page = {};
page["isCloud"] = devicemgtProps.isCloud;
return page;
}

@ -87,7 +87,6 @@
<li><a href="{{@app.context}}/policies"><i class="fw fw-policy"></i>Policy Management</a></li>
{{/if}}
{{#unless isCloud}}
{{#if permissions.TENANT_CONFIGURATION}}
<li><a><i class="fw fw-settings"></i>Configuration Management</a>
<ul>
@ -99,7 +98,6 @@
</ul>
</li>
{{/if}}
{{/unless}}

@ -456,15 +456,18 @@ $(document).ready(function () {
function statisticLoad(redirectUrl) {
var contentType = "application/json";
var uri = backendEndBasePath + "/admin/devicetype/deploy/device_management/status";
var defaultStatusClasses = "fw fw-stack-1x";
var content = $("#statistic-response-template").find(".content");
var title = content.find("#title");
var statusIcon = content.find("#status-icon");
invokerUtil.get(uri, function (data, textStatus, jqXHR) {
if (jqXHR.status == 204) {
$.ajax({
url: redirectUrl,
type: "GET",
success: function () {
window.location.href = redirectUrl;
},
error: function() {
var urix = backendEndBasePath + "/admin/devicetype/deploy/device_management";
var device = {};
invokerUtil.post(urix, device, function (data) {
@ -472,25 +475,39 @@ function statisticLoad(redirectUrl) {
statusIcon.attr("class", defaultStatusClasses + " fw-check");
$(modalPopupContent).html(content.html());
showPopup();
setTimeout(function () {
hidePopup();
// location.reload(true);
location.href = redirectUrl;
}, 20000);
poll(redirectUrl);
}, function (jqXHR) {
title.html("Failed to deploy artifacts, Please contact administrator.");
statusIcon.attr("class", defaultStatusClasses + " fw-error");
$(modalPopupContent).html(content.html());
showPopup();
}, contentType);
} else {
location.href = redirectUrl;
}
}, function (jqXHR) {
title.html("Failed to connect with server, Please contact administrator.");
statusIcon.attr("class", defaultStatusClasses + " fw-error");
$(modalPopupContent).html(content.html());
showPopup();
}, contentType);
});
}
var pollingCount = 15;
function poll(portalUrl) {
var content = $("#statistic-response-template").find(".content");
var title = content.find("#title");
var defaultStatusClasses = "fw fw-stack-1x";
var statusIcon = content.find("#status-icon");
$.ajax({
url: portalUrl,
type: "GET",
success: function (data) {
window.location.href = portalUrl;
},
dataType: "json",
error: setTimeout(function () {
pollingCount = pollingCount - 1;
if (pollingCount > 0) {
poll(portalUrl);
} else {
window.location.href = portalUrl;
}
}, 5000),
timeout: 5000
});
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save