Fix merge conflicts

feature/appm-store/pbac
lasanthaDLPDS 6 years ago
commit 84e3beb6f6

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

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

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

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

@ -94,11 +94,7 @@ public class AuthenticationHandler extends AbstractHandler {
if (log.isDebugEnabled()) {
log.debug("Verify Cert:\n" + mdmSignature);
}
String deviceType = this.getDeviceType(messageContext.getTo().getAddress().trim());
if (deviceType == null) {
return false;
}
URI certVerifyUrl = new URI(iotServerConfiguration.getVerificationEndpoint() + deviceType);
URI certVerifyUrl = new URI(iotServerConfiguration.getVerificationEndpoint() + "ios");
Map<String, String> certVerifyHeaders = this.setHeaders(this.restInvoker);
Certificate certificate = new Certificate();
@ -209,7 +205,7 @@ public class AuthenticationHandler extends AbstractHandler {
private String getDeviceType(String url) {
StringTokenizer parts = new StringTokenizer(url, "/");
while (parts.hasMoreElements()) {
if (parts.nextElement().equals("api")) {
if (parts.nextElement().equals("device-mgt")) {
return (String) parts.nextElement();
}
}

@ -96,7 +96,7 @@ public class AuthenticationHandlerTest extends BaseAPIHandlerTest {
this.mockClient.setResponse(getAccessTokenReponse());
this.mockClient.setResponse(getValidationResponse());
boolean response = this.handler.handleRequest(createSynapseMessageContext("<empty/>", this.synapseConfiguration,
transportHeaders, "https://test.com/testservice/api/testdevice"));
transportHeaders, "https://test.com/testservice/device-mgt/testdevice"));
Assert.assertTrue(response);
this.mockClient.reset();
}
@ -110,7 +110,7 @@ public class AuthenticationHandlerTest extends BaseAPIHandlerTest {
this.mockClient.setResponse(getAccessTokenReponse());
this.mockClient.setResponse(getValidationResponse());
boolean response = this.handler.handleRequest(createSynapseMessageContext("<empty/>", this.synapseConfiguration,
transportHeaders, "https://test.com/testservice/api/testdevice"));
transportHeaders, "https://test.com/testservice/device-mgt/testdevice"));
Assert.assertTrue(response);
this.mockClient.reset();
}
@ -124,7 +124,7 @@ public class AuthenticationHandlerTest extends BaseAPIHandlerTest {
this.mockClient.setResponse(getAccessTokenReponse());
this.mockClient.setResponse(getValidationResponse());
MessageContext messageContext = createSynapseMessageContext("<empty/>", this.synapseConfiguration,
transportHeaders, "https://test.com/testservice/api/testdevice");
transportHeaders, "https://test.com/testservice/device-mgt/testdevice");
org.apache.axis2.context.MessageContext axisMC = ((Axis2MessageContext) messageContext).getAxis2MessageContext();
String certStr = getContent(TestUtils.getAbsolutePathOfConfig("ra_cert.pem"));
X509Certificate cert = X509Certificate.getInstance(new ByteArrayInputStream(certStr.
@ -144,7 +144,7 @@ public class AuthenticationHandlerTest extends BaseAPIHandlerTest {
this.mockClient.setResponse(getAccessTokenReponse());
this.mockClient.setResponse(getValidationResponse());
MessageContext messageContext = createSynapseMessageContext("<empty/>", this.synapseConfiguration,
transportHeaders, "https://test.com/testservice/api/testdevice");
transportHeaders, "https://test.com/testservice/device-mgt/testdevice");
boolean response = this.handler.handleRequest(messageContext);
Assert.assertTrue(response);
this.mockClient.reset();
@ -159,7 +159,7 @@ public class AuthenticationHandlerTest extends BaseAPIHandlerTest {
this.mockClient.setResponse(getAccessTokenReponse());
this.mockClient.setResponse(getInvalidResponse());
MessageContext messageContext = createSynapseMessageContext("<empty/>", this.synapseConfiguration,
transportHeaders, "https://test.com/testservice/api/testdevice");
transportHeaders, "https://test.com/testservice/device-mgt/testdevice");
boolean response = this.handler.handleRequest(messageContext);
Assert.assertFalse(response);
this.mockClient.reset();
@ -173,7 +173,7 @@ public class AuthenticationHandlerTest extends BaseAPIHandlerTest {
setMockClient();
this.mockClient.setResponse(null);
MessageContext messageContext = createSynapseMessageContext("<empty/>", this.synapseConfiguration,
transportHeaders, "https://test.com/testservice/api/testdevice");
transportHeaders, "https://test.com/testservice/device-mgt/testdevice");
boolean response = this.handler.handleRequest(messageContext);
Assert.assertFalse(response);
this.mockClient.reset();
@ -188,7 +188,7 @@ public class AuthenticationHandlerTest extends BaseAPIHandlerTest {
this.mockClient.setResponse(getAccessTokenReponse());
this.mockClient.setResponse(null);
MessageContext messageContext = createSynapseMessageContext("<empty/>", this.synapseConfiguration,
transportHeaders, "https://test.com/testservice/api/testdevice");
transportHeaders, "https://test.com/testservice/device-mgt/testdevice");
boolean response = this.handler.handleRequest(messageContext);
Assert.assertFalse(response);
this.mockClient.reset();
@ -202,7 +202,7 @@ public class AuthenticationHandlerTest extends BaseAPIHandlerTest {
transportHeaders.put(AuthConstants.MDM_SIGNATURE, "some cert");
AuthenticationHandler handler = new AuthenticationHandler();
boolean response = handler.handleRequest(createSynapseMessageContext("<empty/>", this.synapseConfiguration,
transportHeaders, "https://test.com/testservice/api/testdevice"));
transportHeaders, "https://test.com/testservice/device-mgt/testdevice"));
Assert.assertFalse(response);
TestUtils.setSystemProperties();
}

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

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

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

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

@ -22,7 +22,7 @@
<parent>
<artifactId>application-mgt</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.2.2-SNAPSHOT</version>
<version>3.2.5-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -22,7 +22,7 @@
<parent>
<artifactId>application-mgt</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.2.2-SNAPSHOT</version>
<version>3.2.5-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

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

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

@ -1,221 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ /*
~ * 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.
~ */
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>certificate-mgt</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.2.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.certificate.mgt.cert.admin.v09.api</artifactId>
<packaging>war</packaging>
<name>WSO2 Carbon - Admin Certificate Management v09 API</name>
<description>WSO2 Carbon - Admin Certificate Management v09 API</description>
<url>http://wso2.org</url>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<packagingExcludes>WEB-INF/lib/*cxf*.jar</packagingExcludes>
<warName>api#certificate-mgt#v0.9</warName>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<configuration>
<destFile>${basedir}/target/coverage-reports/jacoco-unit.exec</destFile>
</configuration>
<executions>
<execution>
<id>jacoco-initialize</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>jacoco-site</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
<configuration>
<dataFile>${basedir}/target/coverage-reports/jacoco-unit.exec</dataFile>
<outputDirectory>${basedir}/target/coverage-reports/site</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>deploy</id>
<build>
<defaultGoal>compile</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<copy todir="${basedir}/../../../repository/deployment/server/webapps" overwrite="true">
<fileset dir="${basedir}/target">
<include name="api#certificate-mgt#v0.9.war" />
</fileset>
</copy>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>client</id>
<build>
<defaultGoal>test</defaultGoal>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
</dependency>
<dependency>
<groupId>commons-codec.wso2</groupId>
<artifactId>commons-codec</artifactId>
<exclusions>
<exclusion>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxrs</artifactId>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.logging</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.certificate.mgt.core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.identity.jwt.client.extension</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-core</artifactId>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-jaxrs</artifactId>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.apimgt.annotations</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

@ -1,417 +0,0 @@
/*
*
* 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.
* /
*/
package org.wso2.carbon.certificate.mgt.cert.jaxrs.api;
import io.swagger.annotations.SwaggerDefinition;
import io.swagger.annotations.Info;
import io.swagger.annotations.ExtensionProperty;
import io.swagger.annotations.Extension;
import io.swagger.annotations.Tag;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import io.swagger.annotations.ResponseHeader;
import org.wso2.carbon.apimgt.annotations.api.Scope;
import org.wso2.carbon.apimgt.annotations.api.Scopes;
import org.wso2.carbon.certificate.mgt.cert.jaxrs.api.beans.CertificateList;
import org.wso2.carbon.certificate.mgt.cert.jaxrs.api.beans.EnrollmentCertificate;
import org.wso2.carbon.certificate.mgt.cert.jaxrs.api.beans.ErrorResponse;
import org.wso2.carbon.certificate.mgt.core.dto.CertificateResponse;
import javax.validation.constraints.Size;
import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
@SwaggerDefinition(
info = @Info(
version = "0.9.0",
title = "",
extensions = {
@Extension(properties = {
@ExtensionProperty(name = "name", value = "Certificate Management"),
@ExtensionProperty(name = "context", value = "/api/certificate-mgt/v0.9/admin/certificates"),
})
}
),
tags = {
@Tag(name = "device_management", description = "")
}
)
@Api(value = "Certificate Management", description = "This API includes all the certificate management related operations")
@Path("/admin/certificates")
@Scopes(scopes = {
@Scope(
name = "Adding a new SSL certificate",
description = "Adding a new SSL certificate",
key = "perm:admin:certificates:add",
permissions = {"/device-mgt/admin/certificates/add"}
),
@Scope(
name = "Getting Details of an SSL Certificate",
description = "Getting Details of an SSL Certificate",
key = "perm:admin:certificates:details",
permissions = {"/device-mgt/admin/certificates/details"}
),
@Scope(
name = "Getting Details of Certificates",
description = "Getting Details of Certificates",
key = "perm:admin:certificates:view",
permissions = {"/device-mgt/admin/certificates/view"}
),
@Scope(
name = "Deleting an SSL Certificate",
description = "Deleting an SSL Certificate",
key = "perm:admin:certificates:delete",
permissions = {"/device-mgt/admin/certificates/delete"}
),
@Scope(
name = "Verify SSL certificate",
description = "Verify SSL certificate",
key = "perm:admin:certificates:verify",
permissions = {"/device-mgt/admin/certificates/verify"}
)
}
)
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
public interface CertificateManagementAdminService {
String SCOPE = "scope";
/**
* Save a list of certificates and relevant information in the database.
*
* @param enrollmentCertificates List of all the certificates which includes the tenant id, certificate as
* a pem and a serial number.
* @return Status of the data persist operation.
*/
@POST
@ApiOperation(
consumes = MediaType.APPLICATION_JSON,
produces = MediaType.APPLICATION_JSON,
httpMethod = "POST",
value = "Adding a new SSL certificate",
notes = "Add a new SSL certificate to the client end database.\n",
tags = "Certificate Management",
extensions = {
@Extension(properties = {
@ExtensionProperty(name = SCOPE, value = "perm:admin:certificates:add")
})
}
)
@ApiResponses(
value = {
@ApiResponse(
code = 201,
message = "Created. \n Successfully added the certificate.",
responseHeaders = {
@ResponseHeader(
name = "Content-Location",
description = "The URL of the added certificates."),
@ResponseHeader(
name = "Content-Type",
description = "The content type of the body"),
@ResponseHeader(
name = "ETag",
description = "Entity Tag of the response resource.\n" +
"Used by caches, or in conditional requests."),
@ResponseHeader(
name = "Last-Modified",
description = "Date and time the resource was last modified.\n" +
"Used by caches, or in conditional requests.")}),
@ApiResponse(
code = 303,
message = "See Other. \n The source can be retrieved from the URL specified in the location header.",
responseHeaders = {
@ResponseHeader(
name = "Content-Location",
description = "The Source URL of the document.")}),
@ApiResponse(
code = 400,
message = "Bad Request. \n Invalid request or validation error.",
response = ErrorResponse.class),
@ApiResponse(
code = 415,
message = "Unsupported Media Type. \n The format of the requested entity was not supported."),
@ApiResponse(
code = 500,
message = "Internal Server Error. \n Server error occurred while adding certificates.",
response = ErrorResponse.class)
})
Response addCertificate(
@ApiParam(
name = "enrollmentCertificates",
value = "The properties to add a new certificate. It includes the following: \n" +
"serial: The unique ID of the certificate. \n" +
"pem: Convert the OpenSSL certificate to the .pem format and base 64 encode the file. \n" +
"INFO: Upload the .pem file and base 64 encode it using a tool, such as the base64encode.in tool.",
required = true) EnrollmentCertificate[] enrollmentCertificates);
/**
* Get a certificate when the serial number is given.
*
* @param serialNumber serial of the certificate needed.
* @return certificate response.
*/
@GET
@Path("/{serialNumber}")
@ApiOperation(
consumes = MediaType.APPLICATION_JSON,
produces = MediaType.APPLICATION_JSON,
httpMethod = "GET",
value = "Getting Details of an SSL Certificate",
notes = "Get the client side SSL certificate details.",
tags = "Certificate Management",
extensions = {
@Extension(properties = {
@ExtensionProperty(name = SCOPE, value = "perm:admin:certificates:details")
})
}
)
@ApiResponses(value = {
@ApiResponse(
code = 200,
message = "OK. \n Successfully fetched the certificate details.",
response = CertificateResponse.class,
responseHeaders = {
@ResponseHeader(
name = "Content-Type",
description = "The content type of the body"),
@ResponseHeader(
name = "ETag",
description = "Entity Tag of the response resource.\n" +
"Used by caches, or in conditional requests."),
@ResponseHeader(
name = "Last-Modified",
description = "Date and time the resource was last modified.\n" +
"Used by caches, or in conditional requests."),
}),
@ApiResponse(
code = 304,
message = "Not Modified. \n " +
"Empty body because the client already has the latest version of the requested resource."),
@ApiResponse(
code = 400,
message = "Bad Request. \n Invalid request or validation error.",
response = ErrorResponse.class),
@ApiResponse(
code = 404,
message = "Not Found. \n The specified certificate does not exist."),
@ApiResponse(
code = 500,
message = "Internal Server Error. \n " +
"Server error occurred while retrieving the requested certificate information.",
response = ErrorResponse.class)
})
Response getCertificate(
@ApiParam(name = "serialNumber",
value = "The serial number of the certificate.",
required = true,
defaultValue = "124380353155528759302")
@PathParam("serialNumber") String serialNumber,
@ApiParam(
name = "If-Modified-Since",
value = "Checks if the requested variant was modified, since the specified date-time.\n" +
"Provide the value in the following format: EEE, d MMM yyyy HH:mm:ss Z.\n" +
"Example: Mon, 05 Jan 2014 15:10:00 +0200",
required = false)
@HeaderParam("If-Modified-Since") String ifModifiedSince
);
/**
* Get all certificates in a paginated manner.
*
* @return paginated result of certificate.
*/
@GET
@ApiOperation(
consumes = MediaType.APPLICATION_JSON,
produces = MediaType.APPLICATION_JSON,
httpMethod = "GET",
value = "Getting Details of Certificates",
notes = "Get all the details of the certificates you have used for mutual SSL. In a situation where you wish to "
+ "view all the certificate details, it is not feasible to show all the details on one "
+ "page. Therefore, the details are paginated.",
tags = "Certificate Management",
extensions = {
@Extension(properties = {
@ExtensionProperty(name = SCOPE, value = "perm:admin:certificates:view")
})
}
)
@ApiResponses(value = {
@ApiResponse(
code = 200,
message = "OK. \n Successfully fetched the list of certificates.",
response = CertificateList.class,
responseContainer = "List",
responseHeaders = {
@ResponseHeader(
name = "Content-Type",
description = "The content type of the body"),
@ResponseHeader(
name = "ETag",
description = "Entity Tag of the response resource.\n" +
"Used by caches, or in conditional requests."),
@ResponseHeader(
name = "Last-Modified",
description = "Date and time the resource was last modified.\n" +
"Used by caches, or in conditional requests.")}),
@ApiResponse(
code = 303,
message = "See Other. \n " +
"The source can be retrieved from the URL specified in the location header.\n",
responseHeaders = {
@ResponseHeader(
name = "Content-Location",
description = "The Source URL of the document.")}),
@ApiResponse(
code = 304,
message = "Not Modified. \n " +
"Empty body because the client already has the latest version of the requested resource."),
@ApiResponse(
code = 400,
message = "Bad Request. \n Invalid request or validation error.",
response = ErrorResponse.class),
@ApiResponse(
code = 406,
message = "Not Acceptable. \n The requested media type is not supported."),
@ApiResponse(
code = 500,
message = "Internal Server Error. \n " +
"Server error occurred while retrieving the certificate details.",
response = ErrorResponse.class)
})
Response getAllCertificates(
@ApiParam(
name = "offset",
value = "The starting pagination index for the complete list of qualified items.",
required = false,
defaultValue = "0")
@QueryParam("offset") int offset,
@ApiParam(
name = "limit",
value = "Provide how many certificate details you require from the starting pagination index/offset.",
required = false,
defaultValue = "5")
@QueryParam("limit") int limit,
@ApiParam(
name = "If-Modified-Since",
value = "Checks if the requested variant was modified, since the specified date-time. \n" +
"Provide the value in the following format: EEE, d MMM yyyy HH:mm:ss Z.\n" +
"Example: Mon, 05 Jan 2014 15:10:00 +0200",
required = false)
@HeaderParam("If-Modified-Since") String ifModifiedSince);
@DELETE
@Path("/{serialNumber}")
@ApiOperation(
consumes = MediaType.APPLICATION_JSON,
produces = MediaType.APPLICATION_JSON,
httpMethod = "DELETE",
value = "Deleting an SSL Certificate",
notes = "Delete an SSL certificate that's on the client end.",
tags = "Certificate Management",
extensions = {
@Extension(properties = {
@ExtensionProperty(name = SCOPE, value = "perm:admin:certificates:delete")
})
}
)
@ApiResponses(value = {
@ApiResponse(
code = 200,
message = "OK. \n Successfully removed the certificate."),
@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 = 500,
message = "Internal Server Error. \n " +
"Server error occurred while removing the certificate.",
response = ErrorResponse.class)})
Response removeCertificate(
@ApiParam(
name = "serialNumber",
value = "The serial number of the certificate.\n" +
"NOTE: Make sure that a certificate with the serial number you provide exists in the server. If not, first add a certificate.",
required = true,
defaultValue = "12438035315552875930")
@PathParam("serialNumber") String serialNumber);
/**
* Verify Certificate for the API security filter
*
* @param certificate to be verified as a String
* @return Status of the certificate verification.
*/
@POST
@Path("/verify/{type}")
@ApiOperation(
consumes = MediaType.APPLICATION_JSON,
produces = MediaType.APPLICATION_JSON,
httpMethod = "POST",
value = "Verify SSL certificate",
notes = "Verify Certificate for the API security filter.\n",
tags = "Certificate Management",
extensions = {
@Extension(properties = {
@ExtensionProperty(name = SCOPE, value = "perm:admin:certificates:verify")
})
}
)
@ApiResponses(
value = {
@ApiResponse(
code = 200,
message = "Return the status of the certificate verification.",
responseHeaders = {
@ResponseHeader(
name = "Content-Type",
description = "The content type of the body")}),
@ApiResponse(
code = 400,
message = "Bad Request. \n Invalid request or validation error.",
response = ErrorResponse.class)
})
Response verifyCertificate(
@ApiParam(
name = "type",
value = "The device type, such as ios, android or windows.",
required = true,
allowableValues = "android, ios, windows")
@PathParam("type")
@Size(max = 45)
String type,
@ApiParam(
name = "certificate",
value = "The properties to verify certificate. It includes the following: \n" +
"serial: The unique ID of the certificate. (optional) \n" +
"pem: pem String of the certificate",
required = true) EnrollmentCertificate certificate);
}

@ -1,35 +0,0 @@
/*
* 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.
*
*/
package org.wso2.carbon.certificate.mgt.cert.jaxrs.api;
import org.wso2.carbon.certificate.mgt.cert.jaxrs.api.beans.ErrorResponse;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.Response;
import java.io.Serializable;
public class InputValidationException extends WebApplicationException implements Serializable {
private static final long serialVersionUID = 147843589458906890L;
public InputValidationException(ErrorResponse error) {
super(Response.status(Response.Status.BAD_REQUEST).entity(error).build());
}
}

@ -1,34 +0,0 @@
/*
* 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.
*
*/
package org.wso2.carbon.certificate.mgt.cert.jaxrs.api;
import org.wso2.carbon.certificate.mgt.cert.jaxrs.api.beans.ErrorResponse;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.Response;
public class UnexpectedServerErrorException extends WebApplicationException {
private static final long serialVersionUID = 147943679458906890L;
public UnexpectedServerErrorException(ErrorResponse error) {
super(Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(error).build());
}
}

@ -1,73 +0,0 @@
/*
* 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.
*
*/
package org.wso2.carbon.certificate.mgt.cert.jaxrs.api.beans;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
public class BasePaginatedResult {
private int count;
private String next;
private String previous;
/**
* Number of Devices returned.
*/
@ApiModelProperty(value = "Number of resources returned.")
@JsonProperty("count")
public int getCount() {
return count;
}
public void setCount(int count) {
this.count = count;
}
/**
* Link to the next subset of resources qualified. \nEmpty if no more resources are to be returned.
*/
@ApiModelProperty(value = "Link to the next subset of resources qualified. \n " +
"Empty if no more resources are to be returned.")
@JsonProperty("next")
public String getNext() {
return next;
}
public void setNext(String next) {
this.next = next;
}
/**
* Link to the previous subset of resources qualified. \nEmpty if current subset is the first subset returned.
*/
@ApiModelProperty(value = "Link to the previous subset of resources qualified. \n" +
"Empty if current subset is the first subset returned.")
@JsonProperty("previous")
public String getPrevious() {
return previous;
}
public void setPrevious(String previous) {
this.previous = previous;
}
}

@ -1,55 +0,0 @@
/*
* 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.
*
*/
package org.wso2.carbon.certificate.mgt.cert.jaxrs.api.beans;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import org.wso2.carbon.certificate.mgt.core.dto.CertificateResponse;
import java.util.ArrayList;
import java.util.List;
public class CertificateList extends BasePaginatedResult {
private List<CertificateResponse> certificates = new ArrayList<>();
@ApiModelProperty(value = "List of certificates returned")
@JsonProperty("certificates")
public List<CertificateResponse> getList() {
return certificates;
}
public void setList(List<CertificateResponse> certificates) {
this.certificates = certificates;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{\n");
sb.append(" count: ").append(getCount()).append(",\n");
sb.append(" next: ").append(getNext()).append(",\n");
sb.append(" previous: ").append(getPrevious()).append(",\n");
sb.append(" certificates: [").append(certificates).append("\n");
sb.append("]}\n");
return sb.toString();
}
}

@ -1,49 +0,0 @@
/*
* 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.
*/
package org.wso2.carbon.certificate.mgt.cert.jaxrs.api.beans;
public class EnrollmentCertificate {
String serial;
String pem;
int tenantId;
public int getTenantId() {
return tenantId;
}
public void setTenantId(int tenantId) {
this.tenantId = tenantId;
}
public String getSerial() {
return serial;
}
public void setSerial(String serial) {
this.serial = serial;
}
public String getPem() {
return pem;
}
public void setPem(String pem) {
this.pem = pem;
}
}

@ -1,80 +0,0 @@
/*
* 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.
*
*/
package org.wso2.carbon.certificate.mgt.cert.jaxrs.api.beans;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotNull;
@ApiModel(description = "Error List Item")
public class ErrorListItem {
@NotNull
private String code = null;
@NotNull
private String message = null;
@ApiModelProperty(required = true, value = "")
@JsonProperty("code")
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public ErrorListItem() {
}
public ErrorListItem(String code, String msg) {
this.code = code;
this.message = msg;
}
/**
* Description about individual errors occurred
*/
@ApiModelProperty(required = true, value = "Description about individual errors occurred")
@JsonProperty("message")
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("errorItem {\n");
sb.append(" code: ").append(code).append("\n");
sb.append(" message: ").append(message).append("\n");
sb.append("}\n");
return sb.toString();
}
}

@ -1,194 +0,0 @@
/*
* 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.
*
*/
package org.wso2.carbon.certificate.mgt.cert.jaxrs.api.beans;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
@ApiModel(description = "Error Response")
public class ErrorResponse {
private Long code = null;
private String message = null;
private String description = null;
private String moreInfo = null;
private List<ErrorListItem> errorItems = new ArrayList<>();
private ErrorResponse() {
}
@JsonProperty(value = "code")
@ApiModelProperty(required = true, value = "")
public Long getCode() {
return code;
}
public void setCode(Long code) {
this.code = code;
}
@JsonProperty(value = "message")
@ApiModelProperty(required = true, value = "ErrorResponse message.")
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
@JsonProperty(value = "description")
@ApiModelProperty(value = "A detail description about the error message.")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
@JsonProperty(value = "moreInfo")
@ApiModelProperty(value = "Preferably an url with more details about the error.")
public String getMoreInfo() {
return moreInfo;
}
public void setMoreInfo(String moreInfo) {
this.moreInfo = moreInfo;
}
public void addErrorListItem(ErrorListItem item) {
this.errorItems.add(item);
}
/**
* If there are more than one error list them out. \nFor example, list out validation errors by each field.
*/
@JsonProperty(value = "errorItems")
@ApiModelProperty(value = "If there are more than one error list them out. \n" +
"For example, list out validation errors by each field.")
public List<ErrorListItem> getErrorItems() {
return errorItems;
}
public void setErrorItems(List<ErrorListItem> error) {
this.errorItems = error;
}
@Override
public String toString() {
// StringBuilder sb = new StringBuilder();
// sb.append("{");
// boolean cont = false;
// if (code != null) {
// cont = true;
// sb.append(" \"code\": ").append(code);
// }
// if (message != null) {
// if (cont) {
// sb.append(",");
// }
// cont = true;
// sb.append(" \"message\": \"").append(message).append("\"");
// }
// if (description != null) {
// if (cont) {
// sb.append(",");
// }
// cont = true;
// sb.append(" \"description\": ").append(description).append("\"");
// }
// if (moreInfo != null) {
// if (cont) {
// sb.append(",");
// }
// cont = true;
// sb.append(" \"moreInfo\": \"").append(moreInfo).append("\"");
// }
// if (error != null && error.size() > 0) {
// if (cont) {
// sb.append(",");
// }
// sb.append(" \"errorItems\": ").append(error);
// }
// sb.append("}");
// return sb.toString();
return null;
}
public static class ErrorResponseBuilder {
private Long code = null;
private String message = null;
private String description = null;
private String moreInfo = null;
private List<ErrorListItem> error;
public ErrorResponseBuilder() {
this.error = new ArrayList<>();
}
public ErrorResponseBuilder setCode(long code) {
this.code = code;
return this;
}
public ErrorResponseBuilder setMessage(String message) {
this.message = message;
return this;
}
public ErrorResponseBuilder setDescription(String description) {
this.description = description;
return this;
}
public ErrorResponseBuilder setMoreInfo(String moreInfo) {
this.moreInfo = moreInfo;
return this;
}
public ErrorResponseBuilder addErrorItem(String code, String msg) {
ErrorListItem item = new ErrorListItem();
item.setCode(code);
item.setMessage(msg);
this.error.add(item);
return this;
}
public ErrorResponse build() {
ErrorResponse errorResponse = new ErrorResponse();
errorResponse.setCode(code);
errorResponse.setMessage(message);
errorResponse.setErrorItems(error);
errorResponse.setDescription(description);
errorResponse.setMoreInfo(moreInfo);
return errorResponse;
}
}
}

@ -1,60 +0,0 @@
/*
* 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.
*/
package org.wso2.carbon.certificate.mgt.cert.jaxrs.api.beans;
public class ValidationResponse {
private String JWTToken; // X-JWT-Assertion
private String deviceId;
private String deviceType;
private int tenantId;
public String getJWTToken() {
return JWTToken;
}
public void setJWTToken(String JWTToken) {
this.JWTToken = JWTToken;
}
public String getDeviceId() {
return deviceId;
}
public void setDeviceId(String deviceId) {
this.deviceId = deviceId;
}
public String getDeviceType() {
return deviceType;
}
public void setDeviceType(String deviceType) {
this.deviceType = deviceType;
}
public int getTenantId() {
return tenantId;
}
public void setTenantId(int tenantId) {
this.tenantId = tenantId;
}
}

@ -1,33 +0,0 @@
/*
* 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.
*/
package org.wso2.carbon.certificate.mgt.cert.jaxrs.api.common;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Response;
import javax.ws.rs.ext.ExceptionMapper;
@Produces({ "application/json", "application/xml" })
public class ErrorHandler implements ExceptionMapper<MDMAPIException> {
public Response toResponse(MDMAPIException exception) {
ErrorMessage errorMessage = new ErrorMessage();
errorMessage.setErrorMessage(exception.getErrorMessage());
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(errorMessage).build();
}
}

@ -1,42 +0,0 @@
/*
* 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.
*/
package org.wso2.carbon.certificate.mgt.cert.jaxrs.api.common;
public class ErrorMessage {
private String errorMessage;
private String errorCode;
public String getErrorMessage() {
return errorMessage;
}
public void setErrorMessage(String errorMessage) {
this.errorMessage = errorMessage;
}
public String getErrorCode() {
return errorCode;
}
public void setErrorCode(String errorCode) {
this.errorCode = errorCode;
}
}

@ -1,91 +0,0 @@
/*
* 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.
*/
package org.wso2.carbon.certificate.mgt.cert.jaxrs.api.common;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import javax.ws.rs.Consumes;
import javax.ws.rs.Produces;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.MultivaluedMap;
import javax.ws.rs.ext.MessageBodyReader;
import javax.ws.rs.ext.MessageBodyWriter;
import javax.ws.rs.ext.Provider;
import java.io.*;
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
import static javax.ws.rs.core.MediaType.APPLICATION_JSON;
@Provider
@Produces(APPLICATION_JSON)
@Consumes(APPLICATION_JSON)
public class GsonMessageBodyHandler implements MessageBodyWriter<Object>, MessageBodyReader<Object> {
private Gson gson;
private static final String UTF_8 = "UTF-8";
public boolean isReadable(Class<?> aClass, Type type, Annotation[] annotations, MediaType mediaType) {
return true;
}
private Gson getGson() {
if (gson == null) {
final GsonBuilder gsonBuilder = new GsonBuilder();
gson = gsonBuilder.create();
}
return gson;
}
public Object readFrom(Class<Object> objectClass, Type type, Annotation[] annotations, MediaType mediaType,
MultivaluedMap<String, String> stringStringMultivaluedMap, InputStream entityStream)
throws IOException, WebApplicationException {
InputStreamReader reader = new InputStreamReader(entityStream, "UTF-8");
try {
return getGson().fromJson(reader, type);
} finally {
reader.close();
}
}
public boolean isWriteable(Class<?> aClass, Type type, Annotation[] annotations, MediaType mediaType) {
return true;
}
public long getSize(Object o, Class<?> aClass, Type type, Annotation[] annotations, MediaType mediaType) {
return -1;
}
public void writeTo(Object object, Class<?> aClass, Type type, Annotation[] annotations, MediaType mediaType,
MultivaluedMap<String, Object> stringObjectMultivaluedMap, OutputStream entityStream)
throws IOException, WebApplicationException {
OutputStreamWriter writer = new OutputStreamWriter(entityStream, UTF_8);
try {
getGson().toJson(object, type, writer);
} finally {
writer.close();
}
}
}

@ -1,59 +0,0 @@
/*
* 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.
*/
package org.wso2.carbon.certificate.mgt.cert.jaxrs.api.common;
/**
* Custom exception class for handling CDM API related exceptions.
*/
public class MDMAPIException extends Exception {
private static final long serialVersionUID = 7950151650447893900L;
private String errorMessage;
public String getErrorMessage() {
return errorMessage;
}
public void setErrorMessage(String errorMessage) {
this.errorMessage = errorMessage;
}
public MDMAPIException(String msg, Exception e) {
super(msg, e);
setErrorMessage(msg);
}
public MDMAPIException(String msg, Throwable cause) {
super(msg, cause);
setErrorMessage(msg);
}
public MDMAPIException(String msg) {
super(msg);
setErrorMessage(msg);
}
public MDMAPIException() {
super();
}
public MDMAPIException(Throwable cause) {
super(cause);
}
}

@ -1,31 +0,0 @@
/*
* 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.
*/
package org.wso2.carbon.certificate.mgt.cert.jaxrs.api.exception;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
public class BadRequestException extends WebApplicationException {
public BadRequestException(Message message, MediaType mediaType) {
super(Response.status(Response.Status.BAD_REQUEST).entity(message).type(mediaType).build());
}
}

@ -1,41 +0,0 @@
/*
* 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.
*/
package org.wso2.carbon.certificate.mgt.cert.jaxrs.api.exception;
public class Message {
private String errorMessage;
private String discription;
public String getErrorMessage() {
return errorMessage;
}
public void setErrorMessage(String errorMessage) {
this.errorMessage = errorMessage;
}
public String getDiscription() {
return discription;
}
public void setDiscription(String discription) {
this.discription = discription;
}
}

@ -1,318 +0,0 @@
/*
* Copyright (c) 2016-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.
*/
package org.wso2.carbon.certificate.mgt.cert.jaxrs.api.impl;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.certificate.mgt.cert.jaxrs.api.CertificateManagementAdminService;
import org.wso2.carbon.certificate.mgt.cert.jaxrs.api.beans.CertificateList;
import org.wso2.carbon.certificate.mgt.cert.jaxrs.api.beans.EnrollmentCertificate;
import org.wso2.carbon.certificate.mgt.cert.jaxrs.api.beans.ErrorResponse;
import org.wso2.carbon.certificate.mgt.cert.jaxrs.api.beans.ValidationResponse;
import org.wso2.carbon.certificate.mgt.cert.jaxrs.api.util.CertificateMgtAPIUtils;
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.scep.SCEPException;
import org.wso2.carbon.certificate.mgt.core.scep.SCEPManager;
import org.wso2.carbon.certificate.mgt.core.scep.TenantedDeviceWrapper;
import org.wso2.carbon.certificate.mgt.core.service.CertificateManagementService;
import org.wso2.carbon.certificate.mgt.core.service.PaginationResult;
import org.wso2.carbon.context.PrivilegedCarbonContext;
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
import org.wso2.carbon.device.mgt.common.DeviceManagementConstants;
import org.wso2.carbon.identity.jwt.client.extension.exception.JWTClientException;
import org.wso2.carbon.identity.jwt.client.extension.service.JWTClientManagerService;
import javax.ws.rs.*;
import javax.ws.rs.core.Response;
import java.security.cert.X509Certificate;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Path("/admin/certificates")
public class CertificateManagementAdminServiceImpl implements CertificateManagementAdminService {
private static Log log = LogFactory.getLog(CertificateManagementAdminServiceImpl.class);
private static final String PROXY_AUTH_MUTUAL_HEADER = "proxy-mutual-auth-header";
/**
* Save a list of certificates and relevant information in the database.
*
* @param enrollmentCertificates List of all the certificates which includes the tenant id, certificate as
* a pem and a serial number.
* @return Status of the data persist operation.
*/
@POST
public Response addCertificate(EnrollmentCertificate[] enrollmentCertificates) {
CertificateManagementService certificateService;
List<org.wso2.carbon.certificate.mgt.core.bean.Certificate> certificates = new ArrayList<>();
org.wso2.carbon.certificate.mgt.core.bean.Certificate certificate;
certificateService = CertificateMgtAPIUtils.getCertificateManagementService();
try {
for (EnrollmentCertificate enrollmentCertificate : enrollmentCertificates) {
certificate = new org.wso2.carbon.certificate.mgt.core.bean.Certificate();
certificate.setTenantId(PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId());
certificate.setSerial(enrollmentCertificate.getSerial());
certificate.setCertificate(certificateService.pemToX509Certificate(enrollmentCertificate.getPem()));
certificates.add(certificate);
}
certificateService.saveCertificate(certificates);
return Response.status(Response.Status.CREATED).entity("Added successfully.").build();
} catch (KeystoreException e) {
String msg = "Error occurred while converting PEM file to X509Certificate.";
log.error(msg, e);
return Response.serverError().entity(
new ErrorResponse.ErrorResponseBuilder().setCode(500l).setMessage(msg).build()).build();
}
}
/**
* Get a certificate when the serial number is given.
*
* @param serialNumber serial of the certificate needed.
* @return certificate response.
*/
@GET
@Path("/{serialNumber}")
public Response getCertificate(
@PathParam("serialNumber") String serialNumber,
@HeaderParam("If-Modified-Since") String ifModifiedSince) {
RequestValidationUtil.validateSerialNumber(serialNumber);
CertificateManagementService certificateService = CertificateMgtAPIUtils.getCertificateManagementService();
List<CertificateResponse> certificateResponse;
try {
certificateResponse = certificateService.searchCertificates(serialNumber);
return Response.status(Response.Status.OK).entity(certificateResponse).build();
} catch (CertificateManagementException e) {
String msg = "Error occurred while converting PEM file to X509Certificate";
log.error(msg, e);
return Response.serverError().entity(
new ErrorResponse.ErrorResponseBuilder().setCode(500l).setMessage(msg).build()).build();
}
}
/**
* Get all certificates in a paginated manner.
*
* @param offset index of the first record to be fetched
* @param limit number of records to be fetched starting from the start index.
* @return paginated result of certificate.
*/
@GET
public Response getAllCertificates(
@QueryParam("offset") int offset,
@QueryParam("limit") int limit,
@HeaderParam("If-Modified-Since") String ifModifiedSince) {
RequestValidationUtil.validatePaginationInfo(offset, limit);
CertificateManagementService certificateService = CertificateMgtAPIUtils.getCertificateManagementService();
try {
PaginationResult result = certificateService.getAllCertificates(offset, limit);
CertificateList certificates = new CertificateList();
certificates.setCount(result.getRecordsTotal());
certificates.setList((List<CertificateResponse>) result.getData());
return Response.status(Response.Status.OK).entity(certificates).build();
} catch (CertificateManagementException e) {
String msg = "Error occurred while fetching all certificates.";
log.error(msg, e);
return Response.serverError().entity(
new ErrorResponse.ErrorResponseBuilder().setMessage(msg).build()).build();
}
}
@DELETE
@Deprecated
@Path("/{serialNumber}")
public Response removeCertificate(@PathParam("serialNumber") String serialNumber) {
RequestValidationUtil.validateSerialNumber(serialNumber);
CertificateManagementService certificateService = CertificateMgtAPIUtils.getCertificateManagementService();
try {
certificateService.removeCertificate(serialNumber);
return Response.status(Response.Status.OK).entity(
"Certificate that carries the serial number '" +
serialNumber + "' has been removed").build();
} catch (CertificateManagementException e) {
String msg = "Error occurred while converting PEM file to X509Certificate";
log.error(msg, e);
return Response.serverError().entity(
new ErrorResponse.ErrorResponseBuilder().setMessage(msg).build()).build();
}
}
// @POST
// @Path("/verify/ios")
// public Response verifyIOSCertificate(@ApiParam(name = "certificate", value = "Mdm-Signature of the " +
// "certificate that needs to be verified", required = true) EnrollmentCertificate certificate) {
// try {
// CertificateManagementService certMgtService = CertificateMgtAPIUtils.getCertificateManagementService();
// X509Certificate cert = certMgtService.extractCertificateFromSignature(certificate.getPem());
// String challengeToken = certMgtService.extractChallengeToken(cert);
//
// if (challengeToken != null) {
// challengeToken = challengeToken.substring(challengeToken.indexOf("(") + 1).trim();
//
// SCEPManager scepManager = CertificateMgtAPIUtils.getSCEPManagerService();
// DeviceIdentifier deviceIdentifier = new DeviceIdentifier();
// deviceIdentifier.setId(challengeToken);
// deviceIdentifier.setType(DeviceManagementConstants.MobileDeviceTypes.MOBILE_DEVICE_TYPE_IOS);
// TenantedDeviceWrapper tenantedDeviceWrapper = scepManager.getValidatedDevice(deviceIdentifier);
//
// if (tenantedDeviceWrapper != null) {
// return Response.status(Response.Status.OK).entity("valid").build();
// }
// }
// } catch (SCEPException e) {
// String msg = "Error occurred while extracting information from certificate.";
// log.error(msg, e);
// return Response.serverError().entity(
// new ErrorResponse.ErrorResponseBuilder().setCode(500l).setMessage(msg).build()).build();
// } catch (KeystoreException e) {
// String msg = "Error occurred while converting PEM file to X509Certificate.";
// log.error(msg, e);
// return Response.serverError().entity(
// new ErrorResponse.ErrorResponseBuilder().setCode(500l).setMessage(msg).build()).build();
// }
// return Response.status(Response.Status.OK).entity("invalid").build();
// }
//
// @POST
// @Path("/verify/android")
// public Response verifyAndroidCertificate(@ApiParam(name = "certificate", value = "Base64 encoded .pem file of the " +
// "certificate that needs to be verified", required = true) EnrollmentCertificate certificate) {
// CertificateResponse certificateResponse = null;
// try {
// CertificateManagementService certMgtService = CertificateMgtAPIUtils.getCertificateManagementService();
// if (certificate.getSerial().toLowerCase().contains(PROXY_AUTH_MUTUAL_HEADER)) {
// certificateResponse = certMgtService.verifySubjectDN(certificate.getPem());
// } else {
// X509Certificate clientCertificate = certMgtService.pemToX509Certificate(certificate.getPem());
// if (clientCertificate != null) {
// certificateResponse = certMgtService.verifyPEMSignature(clientCertificate);
// }
// }
//
// if (certificateResponse != null && certificateResponse.getCommonName() != null && !certificateResponse
// .getCommonName().isEmpty()) {
// return Response.status(Response.Status.OK).entity("valid").build();
// }
// } catch (KeystoreException e) {
// String msg = "Error occurred while converting PEM file to X509Certificate.";
// log.error(msg, e);
// return Response.serverError().entity(
// new ErrorResponse.ErrorResponseBuilder().setCode(500l).setMessage(msg).build()).build();
// }
// return Response.status(Response.Status.OK).entity("invalid").build();
// }
@POST
@Path("/verify/{type}")
public Response verifyCertificate(@PathParam("type") String type, EnrollmentCertificate certificate) {
try {
CertificateManagementService certMgtService = CertificateMgtAPIUtils.getCertificateManagementService();
if (DeviceManagementConstants.MobileDeviceTypes.MOBILE_DEVICE_TYPE_IOS.equalsIgnoreCase(type)) {
X509Certificate cert = certMgtService.extractCertificateFromSignature(certificate.getPem());
String challengeToken = certMgtService.extractChallengeToken(cert);
if (challengeToken != null) {
challengeToken = challengeToken.substring(challengeToken.indexOf("(") + 1).trim();
SCEPManager scepManager = CertificateMgtAPIUtils.getSCEPManagerService();
DeviceIdentifier deviceIdentifier = new DeviceIdentifier();
deviceIdentifier.setId(challengeToken);
deviceIdentifier.setType(DeviceManagementConstants.MobileDeviceTypes.MOBILE_DEVICE_TYPE_IOS);
TenantedDeviceWrapper tenantedDeviceWrapper = scepManager.getValidatedDevice(deviceIdentifier);
Map<String, String> claims = new HashMap<>();
claims.put("http://wso2.org/claims/enduserTenantId",
String.valueOf(tenantedDeviceWrapper.getTenantId()));
claims.put("http://wso2.org/claims/enduser",
tenantedDeviceWrapper.getDevice().getEnrolmentInfo().getOwner() + "@"
+ tenantedDeviceWrapper.getTenantDomain());
claims.put("http://wso2.org/claims/deviceIdentifier",
tenantedDeviceWrapper.getDevice().getDeviceIdentifier());
claims.put("http://wso2.org/claims/deviceIdType", tenantedDeviceWrapper.getDevice().getType());
String jwdToken;
try {
PrivilegedCarbonContext.startTenantFlow();
PrivilegedCarbonContext.getThreadLocalCarbonContext()
.setTenantId(tenantedDeviceWrapper.getTenantId());
PrivilegedCarbonContext.getThreadLocalCarbonContext()
.setTenantDomain(tenantedDeviceWrapper.getTenantDomain());
JWTClientManagerService jwtClientManagerService = CertificateMgtAPIUtils
.getJwtClientManagerService();
jwdToken = jwtClientManagerService.getJWTClient()
.getJwtToken(tenantedDeviceWrapper.getDevice().getEnrolmentInfo().getOwner(), claims,
true);
} finally {
PrivilegedCarbonContext.endTenantFlow();
}
ValidationResponse validationResponse = new ValidationResponse();
validationResponse.setDeviceId(challengeToken);
validationResponse.setDeviceType(DeviceManagementConstants.MobileDeviceTypes.MOBILE_DEVICE_TYPE_IOS);
validationResponse.setJWTToken(jwdToken);
validationResponse.setTenantId(tenantedDeviceWrapper.getTenantId());
return Response.status(Response.Status.OK).entity(validationResponse).build();
}
}
if (DeviceManagementConstants.MobileDeviceTypes.MOBILE_DEVICE_TYPE_ANDROID.equalsIgnoreCase(type)) {
CertificateResponse certificateResponse = null;
if (certificate.getSerial().toLowerCase().contains(PROXY_AUTH_MUTUAL_HEADER)) {
certificateResponse = certMgtService.verifySubjectDN(certificate.getPem());
} else {
X509Certificate clientCertificate = certMgtService.pemToX509Certificate(certificate.getPem());
if (clientCertificate != null) {
certificateResponse = certMgtService.verifyPEMSignature(clientCertificate);
}
}
if (certificateResponse != null && certificateResponse.getCommonName() != null && !certificateResponse
.getCommonName().isEmpty()) {
return Response.status(Response.Status.OK).entity("valid").build();
}
}
} catch (SCEPException e) {
String msg = "Error occurred while extracting information from certificate.";
log.error(msg, e);
return Response.serverError().entity(
new ErrorResponse.ErrorResponseBuilder().setCode(500l).setMessage(msg).build()).build();
} catch (KeystoreException e) {
String msg = "Error occurred while converting PEM file to X509Certificate.";
log.error(msg, e);
return Response.serverError().entity(
new ErrorResponse.ErrorResponseBuilder().setCode(500l).setMessage(msg).build()).build();
} catch (JWTClientException e) {
String msg = "Error occurred while converting PEM file to X509Certificate.";
log.error(msg, e);
return Response.serverError().entity(
new ErrorResponse.ErrorResponseBuilder().setCode(500l).setMessage(msg).build()).build();
}
return Response.status(Response.Status.OK).entity("invalid").build();
}
}

@ -1,62 +0,0 @@
/*
*
* 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.
* /
*/
package org.wso2.carbon.certificate.mgt.cert.jaxrs.api.swagger.extension;
import io.swagger.annotations.SwaggerDefinition;
import io.swagger.jaxrs.Reader;
import io.swagger.jaxrs.config.ReaderListener;
import io.swagger.models.Swagger;
import io.swagger.models.auth.OAuth2Definition;
import io.swagger.models.auth.SecuritySchemeDefinition;
import java.util.HashMap;
import java.util.Map;
@SwaggerDefinition(
basePath = "/api/certificate-mgt/v0.9",
host = "localhost:9443"
)
public class SecurityDefinitionConfigurator implements ReaderListener {
public static final String TOKEN_AUTH_SCHEME = "swagger_auth";
@Override
public void beforeScan(Reader reader, Swagger swagger) {
}
@Override
public void afterScan(Reader reader, Swagger swagger) {
OAuth2Definition tokenScheme = new OAuth2Definition();
tokenScheme.setType("oauth2");
tokenScheme.setFlow("application");
tokenScheme.setTokenUrl("https://" + swagger.getHost() + "/oauth2/token");
tokenScheme.setAuthorizationUrl("https://" + swagger.getHost() + "/oauth2/authorize");
tokenScheme.addScope("write:everything", "Full access");
Map<String, SecuritySchemeDefinition> schemes = new HashMap<>();
schemes.put(TOKEN_AUTH_SCHEME, tokenScheme);
swagger.setSecurityDefinitions(schemes);
}
}

@ -1,45 +0,0 @@
/*
* 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.
*
*/
package org.wso2.carbon.certificate.mgt.cert.jaxrs.api.util;
import javax.servlet.*;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
public class ApiOriginFilter implements Filter {
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain) throws IOException, ServletException {
HttpServletResponse res = (HttpServletResponse) response;
res.addHeader("Access-Control-Allow-Origin", "*");
res.addHeader("Access-Control-Allow-Methods", "GET, POST, DELETE, PUT");
res.addHeader("Access-Control-Allow-Headers", "Content-Type");
chain.doFilter(request, response);
}
public void destroy() {
//do nothing
}
public void init(FilterConfig filterConfig) throws ServletException {
//do nothing
}
}

@ -1,108 +0,0 @@
/*
* 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.
*/
package org.wso2.carbon.certificate.mgt.cert.jaxrs.api.util;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.certificate.mgt.core.scep.SCEPManager;
import org.wso2.carbon.certificate.mgt.core.service.CertificateManagementService;
import org.wso2.carbon.context.PrivilegedCarbonContext;
import org.wso2.carbon.device.mgt.core.search.mgt.SearchManagerService;
import org.wso2.carbon.identity.jwt.client.extension.service.JWTClientManagerService;
import javax.ws.rs.core.MediaType;
/**
* CertificateMgtAPIUtils class provides utility functions used by Certificate Mgt REST-API classes.
*/
public class CertificateMgtAPIUtils {
public static final MediaType DEFAULT_CONTENT_TYPE = MediaType.APPLICATION_JSON_TYPE;
private static Log log = LogFactory.getLog(CertificateMgtAPIUtils.class);
public static CertificateManagementService getCertificateManagementService() {
PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
CertificateManagementService certificateManagementService = (CertificateManagementService)
ctx.getOSGiService(CertificateManagementService.class, null);
if (certificateManagementService == null) {
String msg = "CertificateManagementAdminServiceImpl Management service not initialized.";
log.error(msg);
throw new IllegalStateException(msg);
}
return certificateManagementService;
}
public static JWTClientManagerService getJwtClientManagerService() {
PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
JWTClientManagerService jwtClientManagerService = (JWTClientManagerService)
ctx.getOSGiService(JWTClientManagerService.class, null);
if (jwtClientManagerService == null) {
String msg = "JWTClientManagerService Management service not initialized.";
log.error(msg);
throw new IllegalStateException(msg);
}
return jwtClientManagerService;
}
public static SCEPManager getSCEPManagerService() {
PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
SCEPManager scepManagerService = (SCEPManager)
ctx.getOSGiService(SCEPManager.class, null);
if (scepManagerService == null) {
String msg = "SCEPManagerImpl Management service not initialized.";
log.error(msg);
throw new IllegalStateException(msg);
}
return scepManagerService;
}
public static MediaType getResponseMediaType(String acceptHeader) {
MediaType responseMediaType;
if (acceptHeader == null || MediaType.WILDCARD.equals(acceptHeader)) {
responseMediaType = DEFAULT_CONTENT_TYPE;
} else {
responseMediaType = MediaType.valueOf(acceptHeader);
}
return responseMediaType;
}
public static SearchManagerService getSearchManagerService() {
PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
SearchManagerService searchManagerService =
(SearchManagerService) ctx.getOSGiService(SearchManagerService.class, null);
if (searchManagerService == null) {
String msg = "DeviceImpl search manager service has not initialized.";
log.error(msg);
throw new IllegalStateException(msg);
}
return searchManagerService;
}
}

@ -1,49 +0,0 @@
/*
* 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.
*
*/
package org.wso2.carbon.certificate.mgt.cert.jaxrs.api.util;
import org.wso2.carbon.certificate.mgt.cert.jaxrs.api.beans.ErrorResponse;
import org.wso2.carbon.certificate.mgt.cert.jaxrs.api.InputValidationException;
public class RequestValidationUtil {
public static void validateSerialNumber(String serialNumber) {
if (serialNumber == null || serialNumber.isEmpty()) {
throw new InputValidationException(
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(
"Serial number cannot be null or empty").build());
}
}
public static void validatePaginationInfo(int offset, int limit) {
if (offset < 0) {
throw new InputValidationException(
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(
"Offset number cannot be negative").build());
}
if (limit < 0) {
throw new InputValidationException(
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(
"Limit number cannot be negative").build());
}
}
}

@ -1,107 +0,0 @@
/*
* 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.
*/
package org.wso2.carbon.certificate.mgt.cert.jaxrs.api.util;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement
public class ResponsePayload {
private int statusCode;
private String messageFromServer;
private Object responseContent;
@XmlElement
public int getStatusCode() {
return statusCode;
}
public void setStatusCode(int statusCode) {
this.statusCode = statusCode;
}
@XmlElement
public String getMessageFromServer() {
return messageFromServer;
}
public void setMessageFromServer(String messageFromServer) {
this.messageFromServer = messageFromServer;
}
@XmlElement
public Object getResponseContent() {
return responseContent;
}
public void setResponseContent(Object responseContent) {
this.responseContent = responseContent;
}
private ResponsePayloadBuilder getBuilder() {
return new ResponsePayloadBuilder();
}
public static ResponsePayloadBuilder statusCode(int statusCode) {
ResponsePayload message = new ResponsePayload();
return message.getBuilder().statusCode(statusCode);
}
public static ResponsePayloadBuilder messageFromServer(String messageFromServer) {
ResponsePayload message = new ResponsePayload();
return message.getBuilder().messageFromServer(messageFromServer);
}
public static ResponsePayloadBuilder responseContent(String responseContent) {
ResponsePayload message = new ResponsePayload();
return message.getBuilder().responseContent(responseContent);
}
public class ResponsePayloadBuilder {
private int statusCode;
private String messageFromServer;
private Object responseContent;
public ResponsePayloadBuilder statusCode(int statusCode) {
this.statusCode = statusCode;
return this;
}
public ResponsePayloadBuilder messageFromServer(String messageFromServer) {
this.messageFromServer = messageFromServer;
return this;
}
public ResponsePayloadBuilder responseContent(String responseContent) {
this.responseContent = responseContent;
return this;
}
public ResponsePayload build() {
ResponsePayload payload = new ResponsePayload();
payload.setStatusCode(statusCode);
payload.setMessageFromServer(messageFromServer);
payload.setResponseContent(responseContent);
return payload;
}
}
}

@ -1,59 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ 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.
-->
<!-- This file contains the list of permissions that are associated with URL end points
of the web app. Each permission should contain the name, permission path ,API path
(URL) , HTTP method and OAUTH2 authorization scope (not-required).
When defining dynamic paths for APIs, path variables are denoted by '*' notation.
For ex:
Actual API endpoint: devicemgt_admin/1.0.0/devices/{device-id}
URL to be represented here: /devices/*
NOTE: All the endpoints of the web app should be available in this file. Otherwise
it will result 403 error at the runtime.
-->
<PermissionConfiguration>
<APIVersion></APIVersion>
<!-- CertificateManagementAdminService related APIs -->
<Permission>
<name>View all certificates</name>
<path>/device-mgt/admin/certificate/GetAll</path>
<url>/admin/certificates</url>
<method>GET</method>
</Permission>
<Permission>
<name>Add certificate</name>
<path>/device-mgt/admin/certificate/Add</path>
<url>/admin/certificates</url>
<method>POST</method>
</Permission>
<Permission>
<name>Remove certificate</name>
<path>/device-mgt/admin/certificate/Remove</path>
<url>/admin/certificates/*</url>
<method>DELETE</method>
</Permission>
<Permission>
<name>View certificate</name>
<path>/device-mgt/admin/certificate/View</path>
<url>/admin/certificates/*</url>
<method>GET</method>
</Permission>
<!-- End of CertificateManagementAdminService related APIs -->
</PermissionConfiguration>

@ -1,35 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
~ 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.
-->
<!--
This file defines class loading policy of the whole container. But this behaviour can be overridden by individual webapps by putting this file into the META-INF/ directory.
-->
<Classloading xmlns="http://wso2.org/projects/as/classloading">
<!-- Parent-first or child-first. Default behaviour is child-first.-->
<ParentFirst>false</ParentFirst>
<!--
Default environments that contains provides to all the webapps. This can be overridden by individual webapps by specifing required environments
Tomcat environment is the default and every webapps gets it even if they didn't specify it.
e.g. If a webapps requires CXF, they will get both Tomcat and CXF.
-->
<Environments>CXF,Carbon</Environments>
</Classloading>

@ -1,62 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ /*
~ * 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.
~ */
-->
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jaxrs="http://cxf.apache.org/jaxrs"
xmlns="http://www.springframework.org/schema/beans"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd">
<jaxrs:server id="services" address="/">
<jaxrs:serviceBeans>
<ref bean="certificateServiceBean"/>
<ref bean="swaggerResource"/>
</jaxrs:serviceBeans>
<jaxrs:providers>
<ref bean="jsonProvider"/>
<ref bean="errorHandler"/>
<ref bean="swaggerWriter"/>
</jaxrs:providers>
</jaxrs:server>
<bean id="swaggerWriter" class="io.swagger.jaxrs.listing.SwaggerSerializers"/>
<bean id="swaggerResource" class="io.swagger.jaxrs.listing.ApiListingResource"/>
<bean id="swaggerConfig" class="io.swagger.jaxrs.config.BeanConfig">
<property name="resourcePackage" value="org.wso2.carbon.certificate.mgt.cert.jaxrs.api"/>
<property name="version" value="0.9.0"/>
<property name="host" value="localhost:9443"/>
<property name="schemes" value="https" />
<property name="basePath" value="/api-certificate-mgt-v0.9"/>
<property name="title" value="Certificate Management Admin Service API Definitions"/>
<property name="contact" value="dev@wso2.org"/>
<property name="license" value="Apache 2.0"/>
<property name="licenseUrl" value="http://www.apache.org/licenses/LICENSE-2.0.html"/>
<property name="scan" value="true"/>
</bean>
<bean id="certificateServiceBean" class="org.wso2.carbon.certificate.mgt.cert.jaxrs.api.impl.CertificateManagementAdminServiceImpl"/>
<bean id="jsonProvider" class="org.wso2.carbon.certificate.mgt.cert.jaxrs.api.common.GsonMessageBodyHandler"/>
<bean id="errorHandler" class="org.wso2.carbon.certificate.mgt.cert.jaxrs.api.common.ErrorHandler"/>
</beans>

@ -1,123 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ 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.
-->
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5">
<display-name>Certificate-Webapp</display-name>
<servlet>
<description>JAX-WS/JAX-RS Certificate Management Endpoint</description>
<display-name>JAX-WS/JAX-RS Servlet</display-name>
<servlet-name>CXFServlet</servlet-name>
<servlet-class>
org.apache.cxf.transport.servlet.CXFServlet
</servlet-class>
<init-param>
<param-name>swagger.security.filter</param-name>
<param-value>ApiAuthorizationFilterImpl</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>CXFServlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>60</session-timeout>
</session-config>
<context-param>
<param-name>doAuthentication</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>isDefault</param-name>
<param-value>false</param-value>
</context-param>
<!--publish to apim-->
<context-param>
<param-name>managed-api-enabled</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>managed-api-owner</param-name>
<param-value>admin</param-value>
</context-param>
<context-param>
<param-name>isSharedWithAllTenants</param-name>
<param-value>true</param-value>
</context-param>
<security-constraint>
<web-resource-collection>
<web-resource-name>CertificateMgt-Admin</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
<filter>
<filter-name>ApiOriginFilter</filter-name>
<filter-class>org.wso2.carbon.certificate.mgt.cert.jaxrs.api.util.ApiOriginFilter</filter-class>
</filter>
<filter>
<filter-name>HttpHeaderSecurityFilter</filter-name>
<filter-class>org.apache.catalina.filters.HttpHeaderSecurityFilter</filter-class>
<init-param>
<param-name>hstsEnabled</param-name>
<param-value>false</param-value>
</init-param>
</filter>
<filter>
<filter-name>ContentTypeBasedCachePreventionFilter</filter-name>
<filter-class>org.wso2.carbon.ui.filters.cache.ContentTypeBasedCachePreventionFilter</filter-class>
<init-param>
<param-name>patterns</param-name>
<param-value>text/html" ,application/json" ,text/plain</param-value>
</init-param>
<init-param>
<param-name>filterAction</param-name>
<param-value>enforce</param-value>
</init-param>
<init-param>
<param-name>httpHeaders</param-name>
<param-value>Cache-Control: no-store, no-cache, must-revalidate, private</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>HttpHeaderSecurityFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>ContentTypeBasedCachePreventionFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>ApiOriginFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>

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

@ -22,14 +22,14 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId>
<version>3.2.2-SNAPSHOT</version>
<version>3.2.5-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>certificate-mgt</artifactId>
<version>3.2.2-SNAPSHOT</version>
<version>3.2.5-SNAPSHOT</version>
<packaging>pom</packaging>
<name>WSO2 Carbon - Certificate Management Component</name>
<url>http://wso2.org</url>
@ -38,7 +38,6 @@
<module>org.wso2.carbon.certificate.mgt.core</module>
<module>org.wso2.carbon.certificate.mgt.api</module>
<module>org.wso2.carbon.certificate.mgt.cert.admin.api</module>
<module>org.wso2.carbon.certificate.mgt.cert.admin.v09.api</module>
</modules>
<build>

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

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

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

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

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

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

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

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

@ -20,7 +20,7 @@
<parent>
<artifactId>device-mgt</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.2.2-SNAPSHOT</version>
<version>3.2.5-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

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

@ -48,6 +48,7 @@ import io.swagger.annotations.ResponseHeader;
import org.apache.axis2.transport.http.HTTPConstants;
import org.wso2.carbon.apimgt.annotations.api.Scopes;
import org.wso2.carbon.apimgt.annotations.api.Scope;
import org.wso2.carbon.device.mgt.jaxrs.beans.ActivityList;
import org.wso2.carbon.device.mgt.jaxrs.beans.BasicUserInfo;
import org.wso2.carbon.device.mgt.jaxrs.beans.BasicUserInfoList;
import org.wso2.carbon.device.mgt.jaxrs.beans.Credential;
@ -155,6 +156,12 @@ import java.util.List;
description = "Sending Enrollment Invitations to Users",
key = "perm:users:send-invitation",
permissions = {"/device-mgt/users/manage"}
),
@Scope(
name = "Get activities",
description = "Get activities",
key = "perm:get-activity",
permissions = {"/device-mgt/devices/owning-device/view"}
)
}
)
@ -924,4 +931,80 @@ public interface UserManagementService {
@POST
@Path("/validate")
Response validateUser(Credential credential);
@GET
@Path("/device/activities")
@ApiOperation(
produces = MediaType.APPLICATION_JSON,
httpMethod = "GET",
value = "Getting Activity Details",
notes = "Get the details of the operations/activities executed by the server on the devices registered" +
" with WSO2 EMM, during a defined time period.",
tags = "Activity Info Provider",
extensions = {
@Extension(properties = {
@ExtensionProperty(name = Constants.SCOPE, value = "perm:get-activity")
})
}
)
@ApiResponses(value = {
@ApiResponse(
code = 200,
message = "OK. \n Successfully fetched the activity details.",
response = ActivityList.class,
responseHeaders = {
@ResponseHeader(
name = "Content-Type",
description = "The content type of the body"),
@ResponseHeader(
name = "ETag",
description = "Entity Tag of the response resource.\n" +
"Used by caches, or in conditional requests."),
@ResponseHeader(
name = "Last-Modified",
description = "Date and time the resource was last modified.\n" +
"Used by caches, or in conditional requests."),
}),
@ApiResponse(
code = 304,
message = "Not Modified. \n Empty body because the client already has the latest version of the" +
" requested resource.\n"),
@ApiResponse(
code = 401,
message = "Unauthorized. \n Unauthorized request."),
@ApiResponse(
code = 404,
message = "Not Found. \n No activities found.",
response = ErrorResponse.class),
@ApiResponse(
code = 406,
message = "Not Acceptable.\n The requested media type is not supported"),
@ApiResponse(
code = 500,
message = "Internal Server Error. \n Server error occurred while fetching the activity data.",
response = ErrorResponse.class)
})
Response getActivities(
@ApiParam(
name = "since",
value = "Checks if the requested variant was created since the specified date-time.\n" +
"Provide the value in the following format: EEE, d MMM yyyy HH:mm:ss Z.\n" +
"Example: Mon, 05 Jan 2014 15:10:00 +0200")
@QueryParam("since") String since,
@ApiParam(
name = "offset",
value = "The starting pagination index for the complete list of qualified items.",
defaultValue = "0")
@QueryParam("offset") int offset,
@ApiParam(
name = "limit",
value = "Provide how many activity details you require from the starting pagination index/offset.",
defaultValue = "5")
@QueryParam("limit") int limit,
@ApiParam(
name = "If-Modified-Since",
value = "Checks if the requested variant was modified, since the specified date-time\n." +
"Provide the value in the following format: EEE, d MMM yyyy HH:mm:ss Z\n." +
"Example: Mon, 05 Jan 2014 15:10:00 +0200")
@HeaderParam("If-Modified-Since") String ifModifiedSince);
}

@ -32,6 +32,7 @@ import io.swagger.annotations.ResponseHeader;
import org.wso2.carbon.apimgt.annotations.api.Scope;
import org.wso2.carbon.apimgt.annotations.api.Scopes;
import org.wso2.carbon.device.mgt.common.Device;
import org.wso2.carbon.device.mgt.jaxrs.beans.DeviceList;
import org.wso2.carbon.device.mgt.jaxrs.beans.ErrorResponse;
import org.wso2.carbon.device.mgt.jaxrs.util.Constants;
@ -39,6 +40,7 @@ import javax.validation.constraints.Size;
import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import java.util.List;
@SwaggerDefinition(
info = @Info(
@ -68,6 +70,12 @@ import javax.ws.rs.core.Response;
description = "Getting Details of a Device",
key = "perm:admin:devices:view",
permissions = {"/device-mgt/devices/owning-device/view"}
),
@Scope(
name = "Update the Device Owner",
description = "Update the ownership of the device",
key = "perm:admin:devices:update-enrollment",
permissions = {"/device-mgt/admin/devices/update-enrollment"}
)
}
)
@ -167,4 +175,54 @@ public interface DeviceManagementAdminService {
required = false,
defaultValue = "5")
@QueryParam("limit") int limit);
@PUT
@Path("/device-owner")
@ApiOperation(
produces = MediaType.APPLICATION_JSON,
httpMethod = "PUT",
value = "Update the device owner",
notes = "Update enrollment owner for given device Identifiers.",
tags = "Device Management",
extensions = {
@Extension(properties = {
@ExtensionProperty(name = Constants.SCOPE, value = "perm:admin:devices:update-enrollment")
})
}
)
@ApiResponses(value = {
@ApiResponse(code = 200, message = "OK. \n Successfully update the owner of devices.",
response = DeviceList.class,
responseHeaders = {
@ResponseHeader(
name = "Content-Type",
description = "The content type of the body"),
@ResponseHeader(
name = "ETag",
description = "Entity Tag of the response resource.\n" +
"Used by caches, or in conditional requests."),
@ResponseHeader(
name = "Last-Modified",
description = "Date and time the resource was last modified.\n" +
"Used by caches, or in conditional requests."),
}),
@ApiResponse(
code = 400,
message = "The incoming request has more than one selection criteria defined via the query parameters.",
response = ErrorResponse.class),
@ApiResponse(
code = 500,
message = "Internal Server Error. \n Server error occurred while fetching the device list.",
response = ErrorResponse.class)
}) Response updateEnrollOwner(
@ApiParam(
name = "Device Owner",
value = "The username that is going to use for the new device owner of given devices.",
required = true)
@QueryParam("owner") String owner,
@ApiParam(
name = "Device Identifiers",
value = "List of device identifiers.",
required = true)
List<String> deviceIdentifiers);
}

@ -39,12 +39,16 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.http.HttpStatus;
import org.eclipse.wst.common.uriresolver.internal.util.URIEncoder;
import org.wso2.carbon.context.PrivilegedCarbonContext;
import org.wso2.carbon.device.mgt.common.DeviceManagementException;
import org.wso2.carbon.device.mgt.common.EnrolmentInfo;
import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationManagementException;
import org.wso2.carbon.device.mgt.common.operation.mgt.Activity;
import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException;
import org.wso2.carbon.device.mgt.core.DeviceManagementConstants;
import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService;
import org.wso2.carbon.device.mgt.core.service.EmailMetaInfo;
import org.wso2.carbon.device.mgt.jaxrs.beans.ActivityList;
import org.wso2.carbon.device.mgt.jaxrs.beans.BasicUserInfo;
import org.wso2.carbon.device.mgt.jaxrs.beans.BasicUserInfoList;
import org.wso2.carbon.device.mgt.jaxrs.beans.BasicUserInfoWrapper;
@ -88,8 +92,11 @@ import java.io.UnsupportedEncodingException;
import java.net.URI;
import java.net.URISyntaxException;
import java.security.SecureRandom;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
@ -793,8 +800,96 @@ public class UserManagementServiceImpl implements UserManagementService {
} catch (UserStoreException e) {
String msg = "Error occurred while retrieving user store to validate user";
log.error(msg, e);
return Response.serverError().entity(
new ErrorResponse.ErrorResponseBuilder().setMessage(msg).build()).build();
return Response.serverError().entity(new ErrorResponse.ErrorResponseBuilder().setMessage(msg).build())
.build();
}
}
@GET
@Override
@Path("/device/activities")
public Response getActivities(
@QueryParam("since") String since,
@QueryParam("offset") int offset,
@QueryParam("limit") int limit,
@HeaderParam("If-Modified-Since") String ifModifiedSince) {
long ifModifiedSinceTimestamp;
long sinceTimestamp;
long timestamp = 0;
boolean isIfModifiedSinceSet = false;
String initiatedBy;
if (log.isDebugEnabled()) {
log.debug("getActivities since: " + since + " , offset: " + offset + " ,limit: " + limit + " ,"
+ "ifModifiedSince: " + ifModifiedSince);
}
RequestValidationUtil.validatePaginationParameters(offset, limit);
if (ifModifiedSince != null && !ifModifiedSince.isEmpty()) {
Date ifSinceDate;
SimpleDateFormat format = new SimpleDateFormat(Constants.DEFAULT_SIMPLE_DATE_FORMAT);
try {
ifSinceDate = format.parse(ifModifiedSince);
} catch (ParseException e) {
return Response.status(400).entity(new ErrorResponse.ErrorResponseBuilder()
.setMessage("Invalid date string is provided in 'If-Modified-Since' header").build()).build();
}
ifModifiedSinceTimestamp = ifSinceDate.getTime();
isIfModifiedSinceSet = true;
timestamp = ifModifiedSinceTimestamp / 1000;
} else if (since != null && !since.isEmpty()) {
Date sinceDate;
SimpleDateFormat format = new SimpleDateFormat(Constants.DEFAULT_SIMPLE_DATE_FORMAT);
try {
sinceDate = format.parse(since);
} catch (ParseException e) {
return Response.status(400).entity(new ErrorResponse.ErrorResponseBuilder()
.setMessage("Invalid date string is provided in 'since' filter").build()).build();
}
sinceTimestamp = sinceDate.getTime();
timestamp = sinceTimestamp / 1000;
}
if (timestamp == 0) {
//If timestamp is not sent by the user, a default value is set, that is equal to current time-12 hours.
long time = System.currentTimeMillis() / 1000;
timestamp = time - 42300;
}
if (log.isDebugEnabled()) {
log.debug("getActivities final timestamp " + timestamp);
}
List<Activity> activities;
int count;
ActivityList activityList = new ActivityList();
DeviceManagementProviderService dmService;
initiatedBy = PrivilegedCarbonContext.getThreadLocalCarbonContext().getUsername();
try {
if (log.isDebugEnabled()) {
log.debug("Calling database to get activities.");
}
dmService = DeviceMgtAPIUtils.getDeviceManagementService();
activities = dmService.getActivitiesUpdatedAfterByUser(timestamp, initiatedBy, limit, offset);
if (log.isDebugEnabled()) {
log.debug("Calling database to get activity count with timestamp and user.");
}
count = dmService.getActivityCountUpdatedAfterByUser(timestamp, initiatedBy);
if (log.isDebugEnabled()) {
log.debug("Activity count: " + count);
}
activityList.setList(activities);
activityList.setCount(count);
if ((activities == null || activities.isEmpty()) && isIfModifiedSinceSet) {
return Response.notModified().build();
}
return Response.ok().entity(activityList).build();
} catch (OperationManagementException e) {
String msg =
"Error Response occurred while fetching the activities updated after given time stamp for the user "
+ initiatedBy + ".";
log.error(msg, e);
return Response.serverError().entity(new ErrorResponse.ErrorResponseBuilder().setMessage(msg).build())
.build();
}
}

@ -20,18 +20,23 @@ package org.wso2.carbon.device.mgt.jaxrs.service.impl.admin;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.solr.common.StringUtils;
import org.wso2.carbon.apimgt.integration.generated.client.publisher.StringUtil;
import org.wso2.carbon.base.MultitenantConstants;
import org.wso2.carbon.context.CarbonContext;
import org.wso2.carbon.context.PrivilegedCarbonContext;
import org.wso2.carbon.device.mgt.common.Device;
import org.wso2.carbon.device.mgt.common.DeviceManagementException;
import org.wso2.carbon.device.mgt.common.InvalidDeviceException;
import org.wso2.carbon.device.mgt.common.PaginationRequest;
import org.wso2.carbon.device.mgt.common.UserNotFoundException;
import org.wso2.carbon.device.mgt.jaxrs.beans.DeviceList;
import org.wso2.carbon.device.mgt.jaxrs.beans.ErrorResponse;
import org.wso2.carbon.device.mgt.jaxrs.service.api.admin.DeviceManagementAdminService;
import org.wso2.carbon.device.mgt.jaxrs.service.impl.util.RequestValidationUtil;
import org.wso2.carbon.device.mgt.jaxrs.util.DeviceMgtAPIUtils;
import javax.validation.constraints.Past;
import javax.validation.constraints.Size;
import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
@ -87,4 +92,32 @@ public class DeviceManagementAdminServiceImpl implements DeviceManagementAdminSe
}
}
@PUT
@Override
@Path("/device-owner")
public Response updateEnrollOwner(
@QueryParam("owner") String owner,
List<String> deviceIdentifiers){
try {
if (DeviceMgtAPIUtils.getDeviceManagementService().updateEnrollment(owner, deviceIdentifiers)){
String msg = "Device owner is updated successfully.";
return Response.status(Response.Status.OK).entity(msg).build();
}
String msg = "Device owner updating is failed.";
log.error(msg);
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build();
} catch(InvalidDeviceException e){
String msg = "Invalid device identifiers are found with the request.";
log.error(msg);
return Response.status(Response.Status.BAD_REQUEST).entity(msg).build();
}catch (DeviceManagementException e) {
String msg = "Error occurred when updating device owners.";
log.error(msg);
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build();
} catch (UserNotFoundException e) {
String msg = "Couldn't found the owner in user store to update the owner of devices.";
log.error(msg);
return Response.status(Response.Status.BAD_REQUEST).entity(msg).build();
}
}
}

@ -30,6 +30,7 @@ public class Constants {
public static final String DEFAULT_STREAM_VERSION = "1.0.0";
public static final String SCOPE = "scope";
public static final String JDBC_USERSTOREMANAGER = "org.wso2.carbon.user.core.jdbc.JDBCUserStoreManager";
public static final String DEFAULT_SIMPLE_DATE_FORMAT = "EEE, d MMM yyyy HH:mm:ss Z";
public static final int DEFAULT_PAGE_LIMIT = 50;

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

@ -0,0 +1,44 @@
package org.wso2.carbon.device.mgt.common;
/*
* Copyright (c) 2019, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
*
* Entgra (Pvt) Ltd. 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.
*/
public class UserNotFoundException extends Exception {
private static final long serialVersionUID = -5705727414452641634L;
public UserNotFoundException(String msg, Exception nestedEx) {
super(msg, nestedEx);
}
public UserNotFoundException(String message, Throwable cause) {
super(message, cause);
}
public UserNotFoundException(String msg) {
super(msg);
}
public UserNotFoundException() {
super();
}
public UserNotFoundException(Throwable cause) {
super(cause);
}
}

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

@ -426,5 +426,16 @@ public interface DeviceDAO {
*/
List<GeoCluster> findGeoClusters(String deviceType, GeoCoordinate southWest, GeoCoordinate northEast,
int geohashLength,int tenantId) throws DeviceManagementDAOException;
/***
* This method is used to identify whether given device ids are exist or not.
*
* @param deviceIdentifiers List of device identifiers.
* @param tenantId tenant id.
* @return returns list of device ids that matches with device identifiers.
* @throws DeviceManagementDAOException throws {@link DeviceManagementDAOException} if connections establishment
* fails.
*/
List<Device> getDevicesByIdentifiers(List<String> deviceIdentifiers, int tenantId) throws DeviceManagementDAOException;
}

@ -18,6 +18,7 @@
*/
package org.wso2.carbon.device.mgt.core.dao;
import org.wso2.carbon.device.mgt.common.Device;
import org.wso2.carbon.device.mgt.common.EnrolmentInfo;
import org.wso2.carbon.device.mgt.common.EnrolmentInfo.Status;
@ -50,4 +51,16 @@ public interface EnrollmentDAO {
List<EnrolmentInfo> getEnrollmentsOfUser(int deviceId, String user, int tenantId) throws
DeviceManagementDAOException;
/***
*This method is used to update the owner of the enrollment for given set of devices to given user.
*
* @param devices List of devices.
* @param owner Username of the new device owner.
* @param tenantId tenant id.
* @return either (1) true, if device owner updating is succeed or false.
* @throws DeviceManagementDAOException if an error occurs when updating device owner.
*/
boolean updateOwnerOfEnrollment(List<Device> devices, String owner, int tenantId)
throws DeviceManagementDAOException;
}

@ -40,6 +40,7 @@ import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.StringJoiner;
public abstract class AbstractDeviceDAOImpl implements DeviceDAO {
@ -1245,4 +1246,53 @@ public abstract class AbstractDeviceDAOImpl implements DeviceDAO {
}
return geoClusters;
}
@Override
public List<Device> getDevicesByIdentifiers(List<String> deviceIdentifiers, int tenantId)
throws DeviceManagementDAOException {
try {
Connection conn = this.getConnection();
int index = 1;
int counter = 0;
List<Device> devices = new ArrayList<>();
StringJoiner joiner = new StringJoiner(",",
"SELECT "
+ "d1.ID AS DEVICE_ID, d1.DESCRIPTION, d1.NAME AS DEVICE_NAME, d1.DEVICE_TYPE, "
+ "d1.DEVICE_IDENTIFICATION, e.OWNER, e.OWNERSHIP, e.STATUS, e.DATE_OF_LAST_UPDATE, "
+ "e.DATE_OF_ENROLMENT, e.ID AS ENROLMENT_ID "
+ "FROM "
+ "DM_ENROLMENT e, "
+ "(SELECT d.ID, d.DESCRIPTION, d.NAME, t.NAME AS DEVICE_TYPE, d.DEVICE_IDENTIFICATION "
+ "FROM DM_DEVICE d, DM_DEVICE_TYPE t "
+ "WHERE "
+ "t.ID = d.DEVICE_TYPE_ID AND d.DEVICE_IDENTIFICATION IN (",
") AND d.TENANT_ID = ?) d1 "
+ "WHERE d1.ID = e.DEVICE_ID AND TENANT_ID = ? "
+ "ORDER BY e.DATE_OF_LAST_UPDATE DESC, e.STATUS ASC");
while (counter < deviceIdentifiers.size()) {
joiner.add("?");
counter++;
}
String query = joiner.toString();
try (PreparedStatement ps = conn.prepareStatement(query)) {
for (String identifier : deviceIdentifiers) {
ps.setObject(index++, identifier);
}
ps.setInt(index++, tenantId);
ps.setInt(index, tenantId);
try (ResultSet rs = ps.executeQuery()) {
if (rs.next()) {
Device device = DeviceManagementDAOUtil.loadDevice(rs);
devices.add(device);
}
}
}
return devices;
} catch (SQLException e) {
throw new DeviceManagementDAOException("Error occurred while obtaining the DB connection when adding tags",
e);
}
}
}

@ -18,6 +18,7 @@
*/
package org.wso2.carbon.device.mgt.core.dao.impl;
import org.wso2.carbon.device.mgt.common.Device;
import org.wso2.carbon.device.mgt.common.EnrolmentInfo;
import org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOException;
import org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOFactory;
@ -28,6 +29,7 @@ import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Date;
@ -361,6 +363,44 @@ public class EnrollmentDAOImpl implements EnrollmentDAO {
}
}
@Override
public boolean updateOwnerOfEnrollment(List<Device> devices, String owner, int tenantId)
throws DeviceManagementDAOException {
try {
Connection conn = this.getConnection();
boolean updateStatus = true;
String sql = "UPDATE DM_ENROLMENT SET OWNER = ? WHERE ID = ? AND TENANT_ID = ?";
try (PreparedStatement ps = conn.prepareStatement(sql)) {
if (conn.getMetaData().supportsBatchUpdates()) {
for (Device device : devices) {
ps.setString(1, owner);
ps.setInt(2, device.getId());
ps.setInt(3, tenantId);
ps.addBatch();
}
for (int i : ps.executeBatch()) {
if (i == 0 || i == Statement.SUCCESS_NO_INFO || i == Statement.EXECUTE_FAILED) {
updateStatus = false;
}
}
} else {
for (Device device : devices) {
ps.setString(1, owner);
ps.setInt(2, device.getId());
ps.setInt(3, tenantId);
if (ps.executeUpdate() == 0) {
updateStatus = false;
}
}
}
}
return updateStatus;
} catch (SQLException e) {
throw new DeviceManagementDAOException("Error occurred while obtaining the DB connection when adding tags",
e);
}
}
private Connection getConnection() throws SQLException {
return DeviceManagementDAOFactory.getConnection();
}

@ -67,11 +67,27 @@ public class DeviceInformationManagerImpl implements DeviceInformationManager {
getDeviceManagementProvider().getDevice(deviceId, false);
DeviceManagementDAOFactory.beginTransaction();
DeviceInfo newDeviceInfo;
DeviceInfo previousDeviceInfo = deviceDetailsDAO.getDeviceInformation(device.getId(),
device.getEnrolmentInfo().getId());
Map<String, String> previousDeviceProperties = deviceDetailsDAO.getDeviceProperties(device.getId(),
device.getEnrolmentInfo().getId());
if (previousDeviceInfo != null && previousDeviceProperties != null) {
previousDeviceInfo.setDeviceDetailsMap(previousDeviceProperties);
newDeviceInfo = processDeviceInfo(previousDeviceInfo, deviceInfo);
} else if (previousDeviceInfo == null && previousDeviceProperties != null) {
previousDeviceInfo = new DeviceInfo();
previousDeviceInfo.setDeviceDetailsMap(previousDeviceProperties);
newDeviceInfo = processDeviceInfo(previousDeviceInfo, deviceInfo);
} else {
newDeviceInfo = deviceInfo;
}
deviceDAO.updateDevice(device, CarbonContext.getThreadLocalCarbonContext().getTenantId());
deviceDetailsDAO.deleteDeviceInformation(device.getId(), device.getEnrolmentInfo().getId());
deviceDetailsDAO.deleteDeviceProperties(device.getId(), device.getEnrolmentInfo().getId());
deviceDetailsDAO.addDeviceInformation(device.getId(), device.getEnrolmentInfo().getId(), deviceInfo);
deviceDetailsDAO.addDeviceProperties(deviceInfo.getDeviceDetailsMap(), device.getId(),
deviceDetailsDAO.addDeviceInformation(device.getId(), device.getEnrolmentInfo().getId(), newDeviceInfo);
deviceDetailsDAO.addDeviceProperties(newDeviceInfo.getDeviceDetailsMap(), device.getId(),
device.getEnrolmentInfo().getId());
DeviceManagementDAOFactory.commitTransaction();
@ -291,5 +307,67 @@ public class DeviceInformationManagerImpl implements DeviceInformationManager {
}
}
private DeviceInfo processDeviceInfo(DeviceInfo previousDeviceInfo, DeviceInfo newDeviceInfo) {
if (newDeviceInfo.getDeviceModel().isEmpty()) {
newDeviceInfo.setDeviceModel(previousDeviceInfo.getDeviceModel());
}
if (newDeviceInfo.getVendor().isEmpty()) {
newDeviceInfo.setVendor(previousDeviceInfo.getVendor());
}
if (newDeviceInfo.getOsBuildDate().isEmpty()) {
newDeviceInfo.setOsBuildDate(previousDeviceInfo.getOsBuildDate());
}
if (newDeviceInfo.getOsVersion().isEmpty()) {
newDeviceInfo.setOsVersion(previousDeviceInfo.getOsVersion());
}
if (newDeviceInfo.getBatteryLevel() == -1D) {
newDeviceInfo.setBatteryLevel(previousDeviceInfo.getBatteryLevel());
}
if (newDeviceInfo.getInternalTotalMemory() == -1D) {
newDeviceInfo.setInternalTotalMemory(previousDeviceInfo.getInternalTotalMemory());
}
if (newDeviceInfo.getInternalAvailableMemory() == -1D) {
newDeviceInfo.setInternalAvailableMemory(previousDeviceInfo.getInternalAvailableMemory());
}
if (newDeviceInfo.getExternalTotalMemory() == -1D) {
newDeviceInfo.setExternalTotalMemory(previousDeviceInfo.getExternalTotalMemory());
}
if (newDeviceInfo.getExternalAvailableMemory() == -1D) {
newDeviceInfo.setExternalAvailableMemory(previousDeviceInfo.getExternalAvailableMemory());
}
if (newDeviceInfo.getOperator().isEmpty()) {
newDeviceInfo.setOperator(previousDeviceInfo.getOperator());
}
if (newDeviceInfo.getConnectionType().isEmpty()) {
newDeviceInfo.setConnectionType(previousDeviceInfo.getConnectionType());
}
if (newDeviceInfo.getMobileSignalStrength() == 0.0) {
newDeviceInfo.setMobileSignalStrength(previousDeviceInfo.getMobileSignalStrength());
}
if (newDeviceInfo.getSsid().isEmpty()) {
newDeviceInfo.setSsid(previousDeviceInfo.getSsid());
}
if (newDeviceInfo.getCpuUsage() == 0.0) {
newDeviceInfo.setCpuUsage(previousDeviceInfo.getCpuUsage());
}
if (newDeviceInfo.getTotalRAMMemory() == -1D) {
newDeviceInfo.setTotalRAMMemory(previousDeviceInfo.getTotalRAMMemory());
}
if (newDeviceInfo.getAvailableRAMMemory() == -1D) {
newDeviceInfo.setAvailableRAMMemory(previousDeviceInfo.getAvailableRAMMemory());
}
if (!newDeviceInfo.isPluggedIn()) {
newDeviceInfo.setPluggedIn(previousDeviceInfo.isPluggedIn());
}
Map<String, String> newDeviceDetailsMap = newDeviceInfo.getDeviceDetailsMap();
Map<String, String> previousDeviceDetailsMap = previousDeviceInfo.getDeviceDetailsMap();
for (String eachKey : previousDeviceDetailsMap.keySet()) {
if (!newDeviceDetailsMap.containsKey(eachKey)) {
newDeviceDetailsMap.put(eachKey, previousDeviceDetailsMap.get(eachKey));
}
}
return newDeviceInfo;
}
}

@ -27,6 +27,7 @@ import org.wso2.carbon.device.mgt.common.MonitoringOperation;
import org.wso2.carbon.device.mgt.common.OperationMonitoringTaskConfig;
import org.wso2.carbon.device.mgt.common.PaginationRequest;
import org.wso2.carbon.device.mgt.common.PaginationResult;
import org.wso2.carbon.device.mgt.common.UserNotFoundException;
import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationManagementException;
import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration;
import org.wso2.carbon.device.mgt.common.license.mgt.License;
@ -666,4 +667,7 @@ public interface DeviceManagementProviderService {
List<String> getDeviceIdentifiersByStatus(String deviceType, String deviceStatus) throws DeviceManagementException;
boolean bulkUpdateDeviceStatus(String deviceType, List<String> deviceList, String status) throws DeviceManagementException;
boolean updateEnrollment(String owner, List<String> deviceIdentifiers)
throws DeviceManagementException, UserNotFoundException, InvalidDeviceException;
}

@ -53,6 +53,7 @@ import org.wso2.carbon.device.mgt.common.OperationMonitoringTaskConfig;
import org.wso2.carbon.device.mgt.common.PaginationRequest;
import org.wso2.carbon.device.mgt.common.PaginationResult;
import org.wso2.carbon.device.mgt.common.TransactionManagementException;
import org.wso2.carbon.device.mgt.common.UserNotFoundException;
import org.wso2.carbon.device.mgt.common.app.mgt.Application;
import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationManagementException;
import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration;
@ -2826,7 +2827,8 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
success = deviceDAO.setEnrolmentStatusInBulk(deviceType, status, tenantId, deviceList);
DeviceManagementDAOFactory.commitTransaction();
} catch (DeviceManagementDAOException e) {
String msg = "Error occurred in while updating status of devices :" +deviceType + " status : " + deviceList.toString();
String msg = "Error occurred in while updating status of devices :" + deviceType + " status : " + deviceList
.toString();
log.error(msg, e);
throw new DeviceManagementException(msg, e);
} catch (SQLException e) {
@ -2839,6 +2841,66 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
return success;
}
public boolean updateEnrollment(String owner, List<String> deviceIdentifiers)
throws DeviceManagementException, UserNotFoundException, InvalidDeviceException {
int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId();
List<Device> existingDevices;
owner = validateOwner(owner, tenantId);
try {
DeviceManagementDAOFactory.beginTransaction();
existingDevices = deviceDAO.getDevicesByIdentifiers(deviceIdentifiers, tenantId);
if (existingDevices.size() != deviceIdentifiers.size()) {
for (Device device : existingDevices) {
deviceIdentifiers.remove(device.getDeviceIdentifier());
}
String msg =
"Couldn't find device ids for requested all device identifiers. Therefore payload should "
+ "contains device identifiers which are not in the system. Invalid device "
+ "identifiers are " + deviceIdentifiers.toString();
log.error(msg);
throw new InvalidDeviceException(msg);
}
if (enrollmentDAO.updateOwnerOfEnrollment(existingDevices, owner, tenantId)) {
DeviceManagementDAOFactory.commitTransaction();
return true;
}
DeviceManagementDAOFactory.rollbackTransaction();
return false;
} catch (TransactionManagementException e) {
String msg = "Error occurred while initiating transaction";
log.error(msg, e);
throw new DeviceManagementException(msg, e);
} catch (DeviceManagementDAOException e) {
String msg = "Error occurred either verifying existence of device ids or updating owner of the device.";
log.error(msg);
throw new DeviceManagementException(msg, e);
} finally {
DeviceManagementDAOFactory.closeConnection();
}
}
private String validateOwner(String owner, int tenantId) throws UserNotFoundException, DeviceManagementException {
try {
if (StringUtils.isEmpty(owner)) {
owner = PrivilegedCarbonContext.getThreadLocalCarbonContext().getUsername();
} else {
boolean isUserExisit = DeviceManagementDataHolder.getInstance().getRealmService()
.getTenantUserRealm(tenantId).getUserStoreManager().isExistingUser(owner);
if (!isUserExisit) {
String msg = "Owner does not exist in the user storage. Owner: " + owner;
log.error(msg);
throw new UserNotFoundException(msg);
}
}
return owner;
} catch (UserStoreException e) {
String msg = "Error occurred when checking whether owner is exist or not. Owner: " + owner;
log.error(msg);
throw new DeviceManagementException(msg, e);
}
}
private void extractDeviceLocationToUpdate(Device device) {
List<Device.Property> properties = device.getProperties();
if (properties != null) {

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

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

@ -223,6 +223,7 @@ policyModule = function () {
appObjectToView = {};
appObjectToView["appName"] = appObjectFromRestEndpoint["name"];
appObjectToView["appId"] = appObjectFromRestEndpoint["id"];
appObjectToView["webUrl"] = appObjectFromRestEndpoint["appmeta"]["weburl"];
if ("webapp" === appObjectFromRestEndpoint["platform"]) {
appObjectToView["packageName"] = appObjectFromRestEndpoint["appmeta"]["weburl"];
appObjectToView["type"] = "Web Clip"

@ -26,14 +26,14 @@
<div class="panel-body">
<h3>About Entgra IoT Server</h3>
<p>Entgra IoT Server 3.4.0 is a complete solution that enables device manufacturers and enterprises to
<p>Entgra IoT Server 3.5.0 is a complete solution that enables device manufacturers and enterprises to
connect and manage their devices, build apps, manage events, secure devices and data, and visualize
sensor data in a scalable manner.</p>
<p>It also offers a complete and secure Enterprise Mobility Management (EMM/MDM) solution that aims to
address mobile computing challenges faced by enterprises today. Supporting iOS, Android, and Windows
devices, it helps organizations deal with both Corporate Owned, Personally Enabled (COPE) and
employee-owned devices with the Bring Your Own Device (BYOD) concept.</p>
<p>Entgra IoT Server 3.4.0 comes with advanced analytics, enabling users to analyze speed, proximity, and
<p>Entgra IoT Server 3.5.0 comes with advanced analytics, enabling users to analyze speed, proximity, and
geo-fencing information of devices including details of those in motion and stationary state.</p>
</p>
<h2>Cookie Policy</h2>
@ -45,12 +45,12 @@
apps remember things about you. Other technologies, including Web storage and identifiers associated
with your device, may be used for similar purposes. In this policy, we use the term “cookies” to
discuss all of these technologies.</p>
<h3>How does Entgra IoT Server 3.4.0 process cookies?</h3>
<p>Entgra IoT Server 3.4.0 uses cookies to store and retrieve information on your browser. This
<h3>How does Entgra IoT Server 3.5.0 process cookies?</h3>
<p>Entgra IoT Server 3.5.0 uses cookies to store and retrieve information on your browser. This
information is used to provide a better user experience. Some cookies serve the purpose of allowing a
user to log in to the system, maintain sessions, and keep track of activities within the login
session.</p>
<p>Some cookies in Entgra IoT Server 3.4.0 are used to personally identify you. However, the cookie
<p>Some cookies in Entgra IoT Server 3.5.0 are used to personally identify you. However, the cookie
lifetime ends once your session ends, i.e., after you log-out, or after the session expiry time has
elapsed.</p>
<p>Some cookies are simply used to give you a more personalised web experience, and these cannot be used
@ -58,42 +58,42 @@
<p>This Cookie Policy is part of the IoT Server <a href="{{@app.context}}/privacy-policy">Privacy Policy.</a>
</p>
<h3>What does Entgra IoT Server 3.0.0 use cookies for?</h3>
<p>Cookies are used for two purposes in Entgra IoT Server 3.4.0.</p>
<p>Cookies are used for two purposes in Entgra IoT Server 3.5.0.</p>
<ol>
<li>To identify you and provide security</li>
<li>To provide a satisfying user experience.</li>
</ol>
<h4><u>Preferences</u></h4>
<p>Entgra IoT Server 3.4.0 uses cookies to remember your settings and preferences and to auto-fill the
<p>Entgra IoT Server 3.5.0 uses cookies to remember your settings and preferences and to auto-fill the
fields to make your interactions with the site easier.</p>
<p>These cookies can not be used to personally identify you.</p>
<h4><u>Security</u></h4>
<ol>
<li>Entgra IoT Server 3.4.0 uses selected cookies to identify and prevent security risks. For example,
Entgra IoT Server 3.4.0 may use cookies to store your session information to prevent others from
<li>Entgra IoT Server 3.5.0 uses selected cookies to identify and prevent security risks. For example,
Entgra IoT Server 3.5.0 may use cookies to store your session information to prevent others from
changing your password without your username and password.
</li>
<li>Entgra IoT Server 3.4.0 uses session cookie to maintain your active session.</li>
<li>Entgra IoT Server 3.4.0 may use a temporary cookie when performing multi-factor authentication and
<li>Entgra IoT Server 3.5.0 uses session cookie to maintain your active session.</li>
<li>Entgra IoT Server 3.5.0 may use a temporary cookie when performing multi-factor authentication and
federated authentication.
</li>
<li>Entgra IoT Server 3.4.0 may use permanent cookies to detect the devices you have logged in
<li>Entgra IoT Server 3.5.0 may use permanent cookies to detect the devices you have logged in
previously. This is to to calculate the <b>risk level</b> associated with your current login
attempt. Using these cookies protects you and your account from possible attacks.
</li>
</ol>
<h4><u>Performance</u></h4>
<p>Entgra IoT Server 3.4.0 may use cookies to allow <b>Remember Me</b> functionalities.</p>
<p>Entgra IoT Server 3.5.0 may use cookies to allow <b>Remember Me</b> functionalities.</p>
<h4><u>Analytics</u></h4>
<p>Entgra IoT Server 3.4.0 as a product does not use cookies for analytical purposes.</p>
<p>Entgra IoT Server 3.5.0 as a product does not use cookies for analytical purposes.</p>
<h4><u>Third party cookies</u></h4>
<p>Using Entgra IoT Server 3.4.0 may cause third-party cookie to be set in your browser. Entgra IoT Server
3.4.0 has no control over how any of them operate. The third-party cookies that maybe set
<p>Using Entgra IoT Server 3.5.0 may cause third-party cookie to be set in your browser. Entgra IoT Server
3.5.0 has no control over how any of them operate. The third-party cookies that maybe set
include:</p>
<ol>
<li>Any social login sites. For example, third-party cookies may be set when Entgra IoT Server 3.4.0
<li>Any social login sites. For example, third-party cookies may be set when Entgra IoT Server 3.5.0
is configured to use “social” or “federated” login, and you opt to login with your “Social
Account”.
</li>
@ -101,11 +101,11 @@
</ol>
<p>Entgra strongly advises you to refer the respective cookie policies of such sites carefully as Entgra has
no knowledge or use on these cookies.</p>
<h3>What type of cookies does Entgra IoT Server 3.4.0 use?</h3>
<p>Entgra IoT Server 3.4.0 uses persistent cookies and session cookies. A persistent cookie helps Entgra IS
3.4.0 to recognize you as an existing user so that it is easier to return to Entgra or interact with
Entgra IS 3.4.0 without signing in again. After you sign in, a persistent cookie stays in your browser
and will be read by Entgra IoT Server 3.4.0 when you return to Entgra IoT Server 3.4.0.</p>
<h3>What type of cookies does Entgra IoT Server 3.5.0 use?</h3>
<p>Entgra IoT Server 3.5.0 uses persistent cookies and session cookies. A persistent cookie helps Entgra IS
3.5.0 to recognize you as an existing user so that it is easier to return to Entgra or interact with
Entgra IS 3.5.0 without signing in again. After you sign in, a persistent cookie stays in your browser
and will be read by Entgra IoT Server 3.5.0 when you return to Entgra IoT Server 3.5.0.</p>
<p>A session cookie is a cookie that is erased when the user closes the Web browser. The session cookie
is stored in temporarily and is not retained after the browser is closed. Session cookies do not
collect information from the users computer.</p>
@ -114,9 +114,9 @@
for websites to set cookies, you may worsen your overall user experience since it will no longer be
personalized to you. It may also stop you from saving customized settings like login information.
Most likely, disabling cookies will make it unable for you to use authentication and authorization
functionalities offered by Entgra IoT Server 3.4.0.</p>
functionalities offered by Entgra IoT Server 3.5.0.</p>
<p>If you have any questions or concerns regarding the use of cookies, please contact the entity or
individuals (or their data protection officer, if applicable) running this Entgra IoT Server 3.4.0
individuals (or their data protection officer, if applicable) running this Entgra IoT Server 3.5.0
instance.</p>
<h3>What are the cookies used?</h3>
<table class="table table-striped table-bordered">
@ -150,17 +150,17 @@
</tbody>
</table>
<h3>Disclaimer</h3>
<p>This cookie policy is only for illustrative purposes of the product Entgra IoT Server 3.4.0. The
<p>This cookie policy is only for illustrative purposes of the product Entgra IoT Server 3.5.0. The
content in the policy is technically correct at the time of the product shipment. The
entity,organization or individual that runs this Entgra IoT Server 3.4.0 instance has full authority
entity,organization or individual that runs this Entgra IoT Server 3.5.0 instance has full authority
and responsibility with regard to the effective Cookie Policy. Entgra, its employees, partners, and
affiliates do not have access to and do not require, store, process or control any of the data,
including personal data contained in Entgra IoT Server 3.4.0. All data, including personal data is
controlled and processed by the entity, organization or individual running Entgra IoT Server 3.4.0.
including personal data contained in Entgra IoT Server 3.5.0. All data, including personal data is
controlled and processed by the entity, organization or individual running Entgra IoT Server 3.5.0.
Entgra, its employees partners and affiliates are not a data processor or a data controller within the
meaning of any data privacy regulations. Entgra does not provide any warranties or undertake any
responsibility or liability in connection with the lawfulness or the manner and purposes for which
Entgra IoT Server 3.4.0 is used by such entities, organizations or persons.</p>
Entgra IoT Server 3.5.0 is used by such entities, organizations or persons.</p>
</div>
</div>
</div>

@ -92,11 +92,11 @@
<div class="media-left col-lg-2">
<div class="icon">
<img src="/devicemgt/public/cdmf.page.groups/images/group-icon.png"
style="background-color: #11375b; height: 152px;">
style="background-color: #008cc4; height: 152px;">
</div>
</div>
<div class="media-body asset-desc add-padding-left-5x">
<div style="background: #11375B; color: #fff; padding: 10px; margin-bottom: 5px">
<div style="background: #008cc4; color: #fff; padding: 10px; margin-bottom: 5px">
Overview
</div>
<table class="table table-responsive table-striped" id="members" style="margin-bottom: 0px;">

@ -36,18 +36,18 @@
<p>Entgra IoT Server comes with advanced analytics, enabling users to analyze speed, proximity, and
geo-fencing information of devices including details of those in motion and stationary state.</p>
<h3>Privacy Policy</h3>
<p>This policy describes how Entgra IoT Server 3.4.0 captures your personal information, the purposes of
<p>This policy describes how Entgra IoT Server 3.5.0 captures your personal information, the purposes of
collection, and information about the retention of your personal information.
<p>Please note that this policy is for reference only, and is applicable for the software as a product.
Entgra and its developers have no access to the information held within Entgra IoT Server
3.4.0.Please see the Disclaimer section for more information. Entities, organisations or individuals
controlling the use and administration of Entgra IoT Server 3.4.0 should create their own privacy
3.5.0.Please see the Disclaimer section for more information. Entities, organisations or individuals
controlling the use and administration of Entgra IoT Server 3.5.0 should create their own privacy
policies setting out the manner in which data is controlled or processed by the respective entity,
organisation or individual.
<h3>What is personal information?</h3>
<p>Entgra IoT Server 3.4.0 considers anything related to you and by which you may be identified as your
<p>Entgra IoT Server 3.5.0 considers anything related to you and by which you may be identified as your
personal information.</p>
<p><b>Signing in to Entgra IoT Server 3.4.0</b></p>
<p><b>Signing in to Entgra IoT Server 3.5.0</b></p>
<ol>
<li>Your user name (except in cases where the user name created by your employer is under
contract)
@ -55,7 +55,7 @@
<li>IP address used to log in</li>
<li>Email address</li>
</ol>
<p><b>Enrolling a device with Entgra IoT Server 3.4.0</b></p>
<p><b>Enrolling a device with Entgra IoT Server 3.5.0</b></p>
<ul>
<li>Your device ID (e.g., phone or tablet), mobile number, IMEI number, and IMSI number</li>
<li>Your devices location</li>
@ -64,7 +64,7 @@
memory usage
</li>
</ul>
<p>However, Entgra IoT Server 3.4.0 also collects the following information that is not considered
<p>However, Entgra IoT Server 3.5.0 also collects the following information that is not considered
personal information, but is used only for <b>statistical</b> purposes. The reason for this is that
this information can not be used to track you.
<ul>
@ -74,17 +74,17 @@
<li>Operating system and generic browser information</li>
</ul>
<h3>Collection of personal information</h3>
<p>Entgra IoT Server 3.4.0 collects your information only to serve your access requirements. For example:
<p>Entgra IoT Server 3.5.0 collects your information only to serve your access requirements. For example:
<ul>
<li>Entgra IoT Server 3.4.0 uses your IP address to detect any suspicious login attempts to your
<li>Entgra IoT Server 3.5.0 uses your IP address to detect any suspicious login attempts to your
account.
<li>Entgra IoT Server 3.4.0 uses attributes like your first name, last name, etc., to provide a rich
<li>Entgra IoT Server 3.5.0 uses attributes like your first name, last name, etc., to provide a rich
and personalized user experience.
<li>Entgra IoT Server 3.4.0 uses your security questions and answers only to allow account recovery.
<li>Entgra IoT Server 3.5.0 uses your security questions and answers only to allow account recovery.
</li>
</ul>
<h4><u>Tracking Technologies</u></h4>
<p>Entgra IoT Server 3.4.0 collects your information by:</p>
<p>Entgra IoT Server 3.5.0 collects your information by:</p>
<ul>
<li>Collecting information from the user profile page where you enter your personal data.</li>
<li>Tracking your IP address with HTTP request, HTTP headers, and TCP/IP.</li>
@ -95,15 +95,15 @@
</li>
</ul>
<h3>Use of personal information</h3>
<p>Entgra IoT Server 3.4.0 will only use your personal information for the purposes for which it was
<p>Entgra IoT Server 3.5.0 will only use your personal information for the purposes for which it was
collected (or for a use identified as consistent with that purpose).</p>
<p>Entgra IoT Server 3.4.0 uses your personal information only for the following purposes.</p>
<p>Entgra IoT Server 3.5.0 uses your personal information only for the following purposes.</p>
<ul>
<li>To provide you with a personalized user experience. Entgra IoT Server 3.4.0 uses your name and
<li>To provide you with a personalized user experience. Entgra IoT Server 3.5.0 uses your name and
uploaded profile pictures for this purpose.
</li>
<li>To protect your account from unauthorized access or potential hacking attempts. Entgra IoT Server
3.4.0 uses HTTP or TCP/IP Headers for this purpose.
3.5.0 uses HTTP or TCP/IP Headers for this purpose.
</li>
<li>
<p>This includes:</p>
@ -114,10 +114,10 @@
</ol>
</li>
<li>Derive statistical data for analytical purposes on system performance improvements. Entgra IoT
Server 3.4.0 will not keep any personal information after statistical calculations. Therefore,
Server 3.5.0 will not keep any personal information after statistical calculations. Therefore,
the statistical report has no means of identifying an individual person.
</li>
<li>Entgra IoT Server 3.4.0 may use:</li>
<li>Entgra IoT Server 3.5.0 may use:</li>
<li>
<ol>
<li>IP Address to derive geographic information</li>
@ -126,28 +126,28 @@
</li>
</ul>
<h3>Disclosure of personal information</h3>
<p>Entgra IoT Server 3.4.0 only discloses personal information to the relevant applications (also known as
“Service Providers”) that are registered with Entgra IoT Server 3.4.0. These applications are
<p>Entgra IoT Server 3.5.0 only discloses personal information to the relevant applications (also known as
“Service Providers”) that are registered with Entgra IoT Server 3.5.0. These applications are
registered by the identity administrator of your entity or organization. Personal information is
disclosed only for the purposes for which it was collected (or for a use identified as consistent
with that purpose) as controlled by such Service Providers, unless you have consented otherwise or
where it is required by law.</p>
<h4>Legal process</h4>
<p>Please note that the organisation, entity or individual running Entgra IoT Server 3.4.0 may be
<p>Please note that the organisation, entity or individual running Entgra IoT Server 3.5.0 may be
compelled to disclose your personal information with or without your consent when it is required by
law following due and lawful process.</p>
<h3>Storage of personal information</h3>
<h4><u>Where your personal information is stored</u></h4>
<p>Entgra IoT Server 3.4.0 stores your personal information in secured databases. Entgra IoT Server 3.4.0
<p>Entgra IoT Server 3.5.0 stores your personal information in secured databases. Entgra IoT Server 3.5.0
exercises proper industry accepted security measures to protect the database where your personal
information is held.Entgra IoT Server 3.4.0 as a product does not transfer or share your data with any
information is held.Entgra IoT Server 3.5.0 as a product does not transfer or share your data with any
third parties or locations.</p>
<p>Entgra IoT Server 3.4.0 may use encryption to keep your personal data with an added level of
<p>Entgra IoT Server 3.5.0 may use encryption to keep your personal data with an added level of
security.</p>
<h4><u>How long your personal information is retained</u></h4>
<p>Entgra IoT Server 3.4.0 retains your personal data as long as you are an active user of our system. You
<p>Entgra IoT Server 3.5.0 retains your personal data as long as you are an active user of our system. You
can update your personal data at any time using the given self-care user portals.</p>
<p>Entgra IoT Server 3.4.0 may keep hashed secrets to provide you with an added level of security. This
<p>Entgra IoT Server 3.5.0 may keep hashed secrets to provide you with an added level of security. This
includes:</p>
<ul>
<li>Current password</li>
@ -157,15 +157,15 @@
<p>You can request the administrator to delete your account. The administrator is the administrator of
the tenant you are registered under, or the super-administrator if you do not use the tenant
feature.</p>
<p>Additionally, you can request to anonymize all traces of your activities that Entgra IoT Server 3.4.0
<p>Additionally, you can request to anonymize all traces of your activities that Entgra IoT Server 3.5.0
may have retained in logs, databases or analytical storage.</p>
<h3>More information</h3>
<h4><u>Changes to this policy</u></h4>
<p>Upgraded versions of Entgra IoT Server 3.4.0 may contain changes to this policy. Revisions to this
<p>Upgraded versions of Entgra IoT Server 3.5.0 may contain changes to this policy. Revisions to this
policy will be packaged within such upgrades and would only apply to users who choose to use upgraded
versions.</p>
<h4><u>Your choices</u></h4>
<p>If you are already have an user account within Entgra IoT Server 3.4.0 ; you have the right to
<p>If you are already have an user account within Entgra IoT Server 3.5.0 ; you have the right to
deactivate your account if you find that this privacy policy is unacceptable to you.</p>
<p>If you do not have an account and you do not agree with our privacy policy, you can chose not to
create one.</p>
@ -174,19 +174,19 @@
<p><a href="https://entgra.io/contact/">https://entgra.io.com/contact/</a></p>
<h3>Disclaimer</h3>
<p>Entgra, its employees, partners, and affiliates do not have access to and do not require, store,
process or control any of the data, including personal data contained in Entgra IoT Server 3.4.0. All
process or control any of the data, including personal data contained in Entgra IoT Server 3.5.0. All
data, including personal data is controlled and processed by the entity or individual running Entgra
IoT Server 3.4.0. Entgra, its employees partners and affiliates are not a data processor or a data
IoT Server 3.5.0. Entgra, its employees partners and affiliates are not a data processor or a data
controller within the meaning of any data privacy regulations. Entgra does not provide any warranties
or undertake any responsibility or liability in connection with the lawfulness or the manner and
purposes for which Entgra IoT Server 3.4.0 is used by such entities or persons.</p>
purposes for which Entgra IoT Server 3.5.0 is used by such entities or persons.</p>
<p>This privacy policy is for the informational purposes of the entity or persons running Entgra IoT
Server 3.4.0 and sets out the processes and functionality contained within Entgra IoT Server 3.4.0
Server 3.5.0 and sets out the processes and functionality contained within Entgra IoT Server 3.5.0
regarding personal data protection. It is the responsibility of entities and persons running Entgra IoT
Server 3.4.0 to create and administer its own rules and processes governing users personal data,
Server 3.5.0 to create and administer its own rules and processes governing users personal data,
Please note that the creation of such rules and processes may change the use, storage and disclosure
policies contained herein. Therefore users should consult the entity or persons running Entgra IoT
Server 3.4.0 for its own privacy policy for details governing users personal data.</p>
Server 3.5.0 for its own privacy policy for details governing users personal data.</p>
</div>
</div>
</div>

@ -46,7 +46,7 @@
{{#zone "topCss"}}
<style>
.loading[data-loading-style=overlay] .loading-bg{
background: #11375B;
background: #008cc4;
opacity: 1;
filter: alpha(opacity=100);
}

@ -87,7 +87,7 @@
</div>
</div>
<div class="media-body asset-desc add-padding-left-5x">
<div style="background: #11375B; color: #fff; padding: 10px; margin-bottom: 5px">Profile Overview
<div style="background: #008cc4; color: #fff; padding: 10px; margin-bottom: 5px">Profile Overview
</div>
{{#defineZone "user-detail-properties"}}
<table class="table table-responsive table-striped" id="members">

@ -28,7 +28,7 @@
position: absolute;
top: 20px;
width: 192px;
background: #11375b;
background: #008cc4;
}
.try-device-text {

@ -13,7 +13,7 @@
<div class="page-content-wrapper">
<div class="row no-gutter add-padding-5x add-margin-top-5x" style="border: 1px solid #e4e4e4;">
<div class="media">
<div style="background: #11375B; color: #fff; padding: 10px; margin-bottom: 5px">
<div style="background: #008cc4; color: #fff; padding: 10px; margin-bottom: 5px">
Policy Overview
</div>
{{#defineZone "policy-detail-properties"}}
@ -46,13 +46,13 @@
</tbody>
</table>
{{/defineZone}}
<div style="background: #11375B; color: #fff; padding: 10px; margin-bottom: 5px">Description
<div style="background: #008cc4; color: #fff; padding: 10px; margin-bottom: 5px">Description
</div>
<div class="add-margin-top-4x">
<div id="policy-description" class="panel-title-description"></div>
</div>
<br>
<div style="background: #11375B; color: #fff; padding: 10px; margin-bottom: 5px">
<div style="background: #008cc4; color: #fff; padding: 10px; margin-bottom: 5px">
Profile Information
</div>
<div class="add-margin-top-4x">

@ -17,8 +17,8 @@
}}
{{#zone "footer"}}
<p>
<span class="hidden-xs">Entgra IoT Server{{#unless isCloud}} 3.4.0{{/unless}}</span>
<span class="visible-xs-inline">Entgra IoT Server{{#unless isCloud}} 3.4.0{{/unless}}</span> | &copy; <script>document.write(new Date().getFullYear());</script>,
<span class="hidden-xs">Entgra IoT Server{{#unless isCloud}} 3.5.0{{/unless}}</span>
<span class="visible-xs-inline">Entgra IoT Server{{#unless isCloud}} 3.5.0{{/unless}}</span> | &copy; <script>document.write(new Date().getFullYear());</script>,
<a href="https://www.entgra.io/" target="_blank">Entgra</a>. All Rights Reserved.
</p>
{{/zone}}

@ -504,6 +504,12 @@ function formatRepoSelection(user) {
$(document).ready(function () {
// Handlebar helper to convert JSON to String
Handlebars.registerHelper("json", function (jsonObject) {
return JSON.stringify(jsonObject);
});
$("#users-input").select2({
multiple: true,
tags: false,

@ -599,6 +599,12 @@ var formatRepoSelection = function (user) {
$(document).ready(function () {
// Handlebar helper to convert JSON to String
Handlebars.registerHelper("json", function (jsonObject) {
return JSON.stringify(jsonObject);
});
// Adding initial state of wizard-steps.
$("#users-input").select2({
multiple: true,
@ -755,5 +761,4 @@ $(document).ready(function () {
$("." + nextStep).removeClass("hidden");
}
});
});

@ -16,7 +16,7 @@
<div class="page-content-wrapper">
<div class="row no-gutter add-padding-5x add-margin-top-5x" style="border: 1px solid #e4e4e4;">
<div class="media">
<div style="background: #11375B; color: #fff; padding: 10px; margin-bottom: 5px">
<div style="background: #008cc4; color: #fff; padding: 10px; margin-bottom: 5px">
Policy Overview
</div>
{{#defineZone "policy-detail-properties"}}
@ -49,13 +49,13 @@
</tbody>
</table>
{{/defineZone}}
<div style="background: #11375B; color: #fff; padding: 10px; margin-bottom: 5px">Description
<div style="background: #008cc4; color: #fff; padding: 10px; margin-bottom: 5px">Description
</div>
<div class="add-margin-top-4x">
<div id="policy-description" class="panel-title-description"></div>
</div>
<br>
<div style="background: #11375B; color: #fff; padding: 10px; margin-bottom: 5px">
<div style="background: #008cc4; color: #fff; padding: 10px; margin-bottom: 5px">
Profile Information
</div>
<div class="add-margin-top-4x">

@ -17,9 +17,9 @@
}}
{{#if isCloud}}
{{#zone "productName"}}Cloud{{/zone}}
{{#zone "productNameResponsive"}}Cloud{{/zone}}
{{#zone "productName"}}{{/zone}}
{{#zone "productNameResponsive"}}{{/zone}}
{{else}}
{{#zone "productName"}}IoT Server{{/zone}}
{{#zone "productNameResponsive"}} IoTS{{/zone}}
{{#zone "productName"}}{{/zone}}
{{#zone "productNameResponsive"}}{{/zone}}
{{/if}}

@ -63,9 +63,9 @@
}
.itm-wiz-current .wiz-no {
border: 1px solid #444;
border: 1px solid #008cc4;
color: #fff;
background: #444;
background: #008cc4;
}
.itm-wiz {

@ -767,7 +767,7 @@ body.inverse .fade-edge:after {
* header styles
* ======================================================================== */
header {
background: #11375B;
background: #008cc4;
min-height: 50px;
position: relative;
}
@ -807,7 +807,7 @@ header .dropdown[aria-expanded=true], header .dropdown:hover {
background: #072038;
}
header .fw-user:before{
header .fw-user:before {
color: #333 !important;
}
@ -847,7 +847,7 @@ header .fw-user:before{
}
.navbar {
background: #526A84;
background: #008cc4;
border: none;
margin-bottom: 0;
min-height: 50px;
@ -941,7 +941,7 @@ header .fw-user:before{
}
.navbar-default .navbar-nav > li a {
color: #ffffff;
color: rgba(0, 0, 0, 0.65);
text-transform: uppercase;
padding: 0 15px;
line-height: 50px;
@ -967,7 +967,7 @@ header .fw-user:before{
}
.navbar-collapse.dropdown {
background: #5e6165 !important;
background: #FFFFFF !important;
margin-right: -10px;
margin-left: -10px;
padding-bottom: 0;
@ -999,14 +999,14 @@ header .fw-user:before{
width: 150px;
height: 120px;
padding: 15px;
background: #2f6292 !important;
background: rgb(240, 242, 243) !important;
display: block;
overflow: hidden;
line-height: 1.4em;
}
.navbar-collapse.tiles ul.nav li li a {
background: #526A84;
background: #008cc4;
}
.navbar-collapse.tiles ul.nav li a:hover {
@ -1032,7 +1032,7 @@ header .fw-user:before{
.navbar-collapse.tiles ul.nav li.has-sub > a:after {
width: 7px;
height: 120px;
background: #526a84;
background: #008cc4;
display: inline-block;
content: " ";
top: 0;
@ -1072,8 +1072,8 @@ header .fw-user:before{
.nav-pills > li.active > a, .nav-pills > li.active > a:focus, .nav-pills > li.active > a:hover {
color: #ffffff;
background: #11375B;
border-color: #11375B;
background: #008cc4;
border-color: #008cc4;
}
/* ========================================================================
@ -1178,12 +1178,13 @@ header .fw-user:before{
right: 0;
}
.all-notifications{
.all-notifications {
margin-bottom: 10px !important;
}
.sidebar-wrapper.toggled a.btn{
.sidebar-wrapper.toggled a.btn {
margin-bottom: 70px;
background: #008cc4
}
.sidebar-wrapper-animation-fix {
@ -1317,12 +1318,13 @@ footer {
min-height: 40px;
overflow: hidden;
color: #cbcbcb;
background: #008ba6 !important;
background: rgb(240, 242, 243) !important;
z-index: 1000;
}
footer > .container,
footer > .container-fluid {
text-align: center;
padding-right: 15px;
padding-left: 15px;
}
@ -1857,12 +1859,13 @@ a.btn:hover, .btn:hover {
.btn-default, .btn-default:focus {
color: #222;
background-color: #ffffff;
border-color: #ffffff;
border-color: #ccc !important;
}
.btn-default:hover {
background-color: #e6e6e6;
border-color: #ffffff;
color: #FFFFFF;
background-color: #0280b3;
border-color: #0280b3;
}
.btn-primary, .btn-primary:focus {
@ -1872,8 +1875,12 @@ a.btn:hover, .btn:hover {
}
.btn-primary:hover {
background-color: #424958;
border-color: #2c313b;
background-color: #16436D !important;
border-color: #16436D !important;
}
.btn-primary {
background-color: #008cc4 !important;
}
.btn-bordered, .btn-bordered:focus, .btn-bordered:hover {
@ -2340,8 +2347,8 @@ a.list-group-item:hover {
.list-group-item.active, .list-group-item.active:focus, .list-group-item.active:hover, .active > .list-group-item, .active > .list-group-item:focus, .active > .list-group-item:hover {
color: #ffffff;
background: #11375B;
border-color: #11375B;
background: #008cc4;
border-color: #008cc4;
}
.list-group-item.active a {
@ -2689,18 +2696,18 @@ a.list-group-item:hover {
.checkbox > input[type=checkbox]:disabled + .helper:before {
cursor: default;
background: #e6e6e6;
}
}RF
.checkbox > input[type=checkbox]:disabled + .helper:after {
color: #8a8a8a;
}
.checkbox > input[type=checkbox]:not(:disabled) + .helper:before {
border-color: #526A84;
border-color: R;
}
.checkbox > input[type=checkbox] :not(:disabled) + .helper:before {
border-color: #526A84;
border-color: #008cc4;
}
.checkbox .helper {
@ -2766,7 +2773,7 @@ a.ctrl-asset-type-switcher:hover {
margin-right: 0;
display: inline-block;
text-align: center;
background: #11375B;
background: #008cc4;
line-height: 49px;
}
@ -2791,7 +2798,7 @@ a.ast-type-item {
}
a.ast-type-item:hover {
background: #526A84;
background: #008cc4;
cursor: pointer;
}
@ -2804,7 +2811,7 @@ a.ast-type-item:hover {
}
.wr-action-btn-bar .page-title {
background-color: #526A84;
background-color: #008cc4;
margin: 0;
font-weight: 400;
}
@ -2834,7 +2841,6 @@ a.ast-type-item:hover {
/* device board */
.wr-device-board {
background: #fafafa;
padding: 10px 0;
font-size: 20px;
margin-bottom: 10px;
@ -2850,7 +2856,7 @@ a.ast-type-item:hover {
}
/* operations panel/board */
.operation-tile{
.operation-tile {
width: 88px;
height: 100px;
background-color: #ebebeb;
@ -2860,7 +2866,7 @@ a.ast-type-item:hover {
position: relative;
}
.operation-tile i{
.operation-tile i {
padding: 15px 0px 0px 0px;
display: block;
min-height: 65px;
@ -2868,13 +2874,14 @@ a.ast-type-item:hover {
font-size: 36px !important;
}
.operation-tile span{
.operation-tile span {
height: 35px;
line-height: 15px;
vertical-align: middle;
display: table-cell !important;
width: inherit;
}
.wr-operations-board {
background: #fafafa;
margin-bottom: 10px;
@ -2899,7 +2906,7 @@ a.ast-type-item:hover {
font-size: 12px;
text-decoration: none;
margin-right: 10px;
/*color: #526A84;*/
/*color: #008cc4;*/
color: #333;
min-width: 70px;
background: #fafafa;
@ -2951,7 +2958,7 @@ a.ast-type-item:hover {
font-weight: normal;
font-size: 13px;
color: #fff;
background: #11375B;
background: #008cc4;
padding: 10px 24px;
display: inline-block;
margin-right: 5px;
@ -3047,7 +3054,7 @@ a.ast-type-item:hover {
.ctrl-wr-asset.selected {
background: #E4E4E4;
border-bottom: 4px solid #526A84;
border-bottom: 4px solid #008cc4;
}
.ctrl-wr-asset:hover {
@ -3076,7 +3083,7 @@ a.ast-type-item:hover {
}
.itm-ast:hover h3, .itm-ast:hover .ast-auth {
color: #526A84;
color: #008cc4;
}
.ast-img {
@ -3159,7 +3166,7 @@ h3.ast-name {
.ast-auth {
font-weight: 300;
font-size: 13px;
color: #526A84;
color: #008cc4;
display: block;
margin-bottom: 12px;
white-space: nowrap;
@ -3458,7 +3465,7 @@ span.ico-sort-desc {
}
.wr-asset-type-switcher ul li:hover {
background: #526A84;
background: #008cc4;
cursor: pointer;
}
@ -3495,7 +3502,7 @@ span.ico-sort-desc {
}
#asset-selected .selected li {
background: #526A84;
background: #008cc4;
color: #ffffff;
}
@ -3564,7 +3571,7 @@ span.ico-sort-desc {
.wr-search-tags span {
color: #ffffff;
background: #11375B;
background: #008cc4;
font-size: 11px;
display: inline-block;
cursor: pointer;
@ -3578,7 +3585,7 @@ span.ico-sort-desc {
}
.wr-search-tags span:hover {
background: #526A84;
background: #008cc4;
color: #ffffff;
}
@ -3686,7 +3693,7 @@ a.btn-operations {
font-weight: normal;
font-size: 13px;
color: #fff;
background: #2f6292;
background: #008cc4;
padding: 5px 20px;
display: inline-block;
margin-right: 2px;
@ -3736,15 +3743,15 @@ a.btn-operations {
}
.wr-side-panel::-webkit-scrollbar-thumb {
background: #526A84;
background: #008cc4;
}
.wr-side-panel::-webkit-scrollbar-thumb:hover {
background: #526A84;
background: #008cc4;
}
.wr-side-panel::-webkit-scrollbar-thumb:active {
background: #526A84;
background: #008cc4;
}
.wr-notification-bar.toggled, .wr-side-panel.toggled {
@ -3778,14 +3785,14 @@ a.wr-notification-toggle-btn.selected {
}
a.wr-side-panel-toggle-btn.selected {
background-color: #11375B;
background-color: #008cc4;
color: #fff;
}
.wr-side-panel .panel-title a {
display: block;
padding: 10px;
background: #11375B;
background: #008cc4;
color: #fff;
border-bottom: 1px solid #e4e4e4;
}
@ -3823,7 +3830,7 @@ a.wr-side-panel-toggle-btn.selected {
}
.wr-panel-notes .wr-input-control.checkbox .helper:before {
border-color: #526A84;
border-color: #008cc4;
}
.wr-panel-notes .add-btn {
@ -3875,7 +3882,7 @@ a.wr-side-panel-toggle-btn.selected {
.wr-panel-msg {
background: #fff;
border-right: 2px solid #526A84;
border-right: 2px solid #008cc4;
padding: 8px 35px 8px 10px;
margin-left: 35px;
margin-bottom: 5px;
@ -3884,7 +3891,7 @@ a.wr-side-panel-toggle-btn.selected {
}
.wr-panel-msg .dropdown-menu {
background: #526A84;
background: #008cc4;
color: #fff;
left: -167px;
top: -2px;
@ -3916,7 +3923,7 @@ a.wr-side-panel-toggle-btn.selected {
.wr-panel-msg .msg-options .btn.dropdown-toggle:hover, .wr-panel-msg .msg-options .btn.dropdown-toggle[aria-expanded="true"] {
color: #fff;
background-color: #526A84;
background-color: #008cc4;
}
.wr-panel-msg-visibility {
@ -4044,11 +4051,12 @@ a.wr-side-panel-toggle-btn.selected {
/* stats */
.wr-stats-board-tile {
background: #0c3b42;
color: #fff;
background: #FFFFFF;
color: rgba(0, 0, 0, 0.65);
padding: 15px;
height: 110px;
margin-bottom: 10px;
box-shadow: 0 1px 4px rgba(0, 21, 41, .08);
}
.device-detail-body .wr-stats-board-tile {
@ -4096,7 +4104,7 @@ a.wr-side-panel-toggle-btn.selected {
}
.tile-bg {
background: #11375B;
background: #008cc4;
color: #fff;
}
@ -4130,7 +4138,7 @@ a.wr-side-panel-toggle-btn.selected {
}
.tile-stats-free a {
color: #b2b2b2;
color: rgba(0,0,0, 0.65);
font-weight: 500;
text-decoration: none;
display: inline-block;
@ -4139,7 +4147,8 @@ a.wr-side-panel-toggle-btn.selected {
}
.tile-stats-free a:hover {
color: #fff;
color: #008cc4;
text-decoration: none !important;
}
.tile-stats-type {
@ -4197,7 +4206,7 @@ a.wr-side-panel-toggle-btn.selected {
.wr-form .wr-operation-icon {
font-size: 32px;
margin-right: 10px;
color: #11375B;
color: #008cc4;
}
.wr-form .user-select {
@ -4248,7 +4257,7 @@ a.wr-side-panel-toggle-btn.selected {
/*outline: 2px #a6a6a6 solid;*/
border: 1px #fff solid;
cursor: pointer;
/*background: #526A84;*/
/*background: #008cc4;*/
background: #a6a6a6;
/*margin-left: 2px;*/
z-index: 1;
@ -4264,9 +4273,9 @@ a.wr-side-panel-toggle-btn.selected {
width: 24px;
height: 24px;
/*outline: 2px #333 solid;*/
border: 1px #526A84 solid;
border: 1px #008cc4 solid;
cursor: pointer;
background: #526A84;
background: #008cc4;
z-index: 2;
border-radius: 12px;
/*box-shadow: 0 1px 2px #888888;*/
@ -4405,7 +4414,7 @@ a.wr-side-panel-toggle-btn.selected {
}
.wr-input-control.checkbox input[type="checkbox"]:checked + .helper:before {
border: 2px #526A84 solid;
border: 2px #008cc4 solid;
}
.wr-input-control.checkbox input[type="checkbox"]:checked + .helper:after {
@ -4422,7 +4431,7 @@ a.wr-side-panel-toggle-btn.selected {
left: 2px;
margin-left: 0;
text-align: center;
background: #526A84;
background: #008cc4;
color: #fff;
font-family: font-wso2;
}
@ -4441,11 +4450,11 @@ a.wr-side-panel-toggle-btn.selected {
}
.wr-input-control.checkbox:hover input:not(:disabled) + .helper:before {
border-color: #526A84;
border-color: #008cc4;
}
.wr-input-control.checkbox:active input:not(:disabled) + .helper:before {
border-color: #526A84;
border-color: #008cc4;
}
/* list group styles */
@ -4501,7 +4510,7 @@ a.wr-side-panel-toggle-btn.selected {
.wr-list-email, .wr-list-email:hover {
font-weight: 300;
font-size: 13px;
color: #526A84;
color: #008cc4;
}
.wr-sortable .list-group-item, tbody.wr-sortable td {
@ -4520,7 +4529,7 @@ a.wr-side-panel-toggle-btn.selected {
width: 50px;
height: 50px;
line-height: 42px;
background: #526A84;
background: #008cc4;
color: #fff;
font-size: 28px;
text-align: center;
@ -4598,16 +4607,16 @@ a.wr-side-panel-toggle-btn.selected {
/*}*/
.wr-list-group .wr-desc-list-configs.highlight {
background: #14212E;
background: #008cc4;
color: #fff;
}
.wr-list-group .wr-desc-list-configs.highlight2 {
background: #CDCDCD;
background: #008cc4;
}
.wr-list-group .wr-desc-list-configs b {
color: #526A84;
color: rgba(0,0,0, 0.65);
}
.panel-title a .fw-stack {
@ -4620,7 +4629,7 @@ a.wr-side-panel-toggle-btn.selected {
.footer a {
text-decoration: none;
color: #fff;
color: rgba(0,0,0, 0.65);
}
.footer .fw {
@ -4663,7 +4672,7 @@ a.wr-side-panel-toggle-btn.selected {
}
.wr-hidden-nav ul li a:hover {
background: #526A84;
background: #008cc4;
}
.wr-hidden-nav ul li a i {
@ -4703,7 +4712,7 @@ a.wr-side-panel-toggle-btn.selected {
margin: 5px;
border: 1px solid #e8e8e8;
background: #ffffff;
color: #526A84;
color: #008cc4;
padding: 10px;
text-decoration: none;
font-size: 16px;
@ -4745,20 +4754,20 @@ a.wr-side-panel-toggle-btn.selected {
}
.wr-advance-operations .wr-hidden-operations-nav a.selected span span > i {
color: #526A84;
color: #008cc4;
}
.wr-advance-operations .wr-hidden-operations-nav a.selected span span > i.fw.fw-circle.fw-stack-2x {
color: #526A84;
color: #008cc4;
}
.wr-advance-operations .wr-hidden-operations-nav a.selected span span > i.fw.fw-circle.fw-stack-2x.fw-stroke.fw-inverse {
color: #526A84;
color: #008cc4;
}
.wr-advance-operations .wr-hidden-operations-nav a.selected, .wr-hidden-operations .wr-hidden-operations-nav a.selected:hover {
color: #ffffff;
background: #526A84;
background: #008cc4;
}
.wr-hidden-operations {
@ -4910,7 +4919,7 @@ a.show-operations-btn {
}
a.show-operations-btn.selected {
background: #526A84;
background: #008cc4;
color: #fff;
}
@ -5029,7 +5038,7 @@ a.show-operations-btn .btn-text:before {
width: 100%;
height: 120px;
padding: 20px;
background: #132D45;
background: #008cc4 !important;
display: block;
overflow: hidden;
text-align: center;
@ -5046,7 +5055,7 @@ a.show-operations-btn .btn-text:before {
}
.tile-buttons li a:hover {
background: #526A84;
background: #0280b3 !important;
}
.tile-buttons li a i {
@ -5130,12 +5139,12 @@ a.show-operations-btn .btn-text:before {
}
a.cu-btn-inner.inverse {
background: #11375B;
background: #008cc4;
color: #fff;
}
a.cu-btn-inner.inverse:hover {
background: #526A84;
background: #008cc4;
}
.wiz-lbl {
@ -5176,7 +5185,7 @@ a.cu-btn-inner.inverse:hover {
}
.wizard-head > li a:hover {
color: #526A84;
color: #008cc4;
}
.wizard-head > li.active, .wizard-head > li.active a {
@ -5190,7 +5199,7 @@ a.cu-btn-inner.inverse:hover {
.wizard-head .wizard-home-icon {
font-size: 30px;
color: #11375b;
color: #008cc4;
margin-top: -6px;
margin-right: 20px;
}
@ -5245,7 +5254,7 @@ a.cu-btn-inner.inverse:hover {
margin-bottom: 1px;
text-decoration: none;
display: block;
color: #11375b;
color: #008cc4;
}
.multi-view .nav > ul li li a {
@ -5253,7 +5262,7 @@ a.cu-btn-inner.inverse:hover {
}
.multi-view .nav > ul li a:hover, .multi-view .nav > ul li a.active {
background: #11375b;
background: #008cc4;
color: #fff;
}
@ -5283,7 +5292,7 @@ a.cu-btn-inner.inverse:hover {
}
.multi-view .content {
border-left: 2px solid #11375b;
border-left: 2px solid #008cc4;
}
.multi-view .content ul, .multi-view .content ul li {
@ -5352,7 +5361,7 @@ a.grid-input-add {
margin-top: 10px;
margin-bottom: 10px;
font-size: 14px;
border: 1px solid #526A84;
border: 1px solid #008cc4;
}
a.grid-input-add:hover, a.grid-input-add:active, a.grid-input-add:focus {
@ -6264,7 +6273,7 @@ body.inverse .fade-edge:after {
.thumbnail.icon {
border: none;
margin: 0;
background: #638bb1 !important;
background: #008cc4 !important;
color: #fff;
text-align: center;
position: relative;
@ -6339,8 +6348,8 @@ body.inverse .fade-edge:after {
.pagination > .active > span,
.pagination > .active > span:focus,
.pagination > .active > span:hover {
background: #11375B;
border-color: #11375B;
background: #008cc4;
border-color: #008cc4;
}
.pagination > .disabled > a,
@ -6413,7 +6422,7 @@ ul.tiles .icon {
* ======================================================================== */
.asset-image {
max-width: 150px;
background: #11375B;
background: #008cc4;
float: none !important;
}
@ -6456,8 +6465,8 @@ ul.tiles .icon {
.list-group-item.active,
.list-group-item.active:focus,
.list-group-item.active:hover {
background: #11375B;
border-color: #11375B;
background: #008cc4;
border-color: #008cc4;
color: #fff;
}
@ -6544,7 +6553,7 @@ ul.tiles .icon {
font-size: 12px;
text-decoration: none;
margin-right: 10px;
color: #526A84;
color: #008cc4;
width: 100px;
background: #fafafa;
padding: 2px 10px 10px 10px;
@ -6689,7 +6698,7 @@ ul.tiles .icon {
}
.navbar-default .navbar-nav > li a > .fw-stack > .fw-stack > .fw-circle:not(.fw-stroke) {
color: #526A84;
color: #008cc4;
}
.navbar-default .navbar-nav > li:hover a > .fw-stack > .fw-stack > .fw-circle:not(.fw-stroke) {
@ -6740,7 +6749,7 @@ ul.tiles .icon {
}
.media .panel.active .panel-heading.visible-xs {
background: #11375b;
background: #008cc4;
color: #fff;
}
@ -6917,7 +6926,7 @@ select > option:hover {
.device-type-img.fw {
font-size: 250px;
color: white;
background: #11375b;
background: #008cc4;
padding: 35px;
}
@ -6938,7 +6947,8 @@ select > option:hover {
}
.btn-operations:hover, .btn-operations:focus, .btn-operations:active {
color: #C7C7C7;
color: #ffffff !important;
background-color: #16436D !important;
}
/**
@ -6948,12 +6958,12 @@ select > option:hover {
*/
header.header-default {
background: #008ba6 !important;
background: #FFFFFF !important;
height: 50px;
}
.navbar-collapse {
background: #37474F;
background: #FFFFFF;
}
.dropdown-menu > li {
@ -7009,7 +7019,7 @@ header.header-default {
line-height: 0px !important;
}
.header .fw-user{
.header .fw-user {
color: #333 !important;
}
@ -7022,5 +7032,5 @@ header .brand img.logo {
}
try-device-image {
background: #638bb1 !important;
background: #008cc4 !important;
}

@ -188,7 +188,7 @@ h1, .h1 {
}
.dropdown-menu-content a {
color: #11375B;
color: #008cc4;
padding: 8px 10px;
cursor:pointer;
display:block;
@ -196,7 +196,7 @@ h1, .h1 {
.dropdown-menu-content a:hover {
color:#fff;
background: #11375B;
background: #008cc4;
}
@ -417,8 +417,8 @@ a.ctrl-filter-category:hover {
.btn-primary {
color: #fff;
background-color: #11375b;
border-color: #11375b;
background-color: #008cc4;
border-color: #008cc4;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary.focus, .btn-primary:active, .btn-primary.active, .open > .dropdown-toggle.btn-primary {

@ -3,14 +3,14 @@
* ======================================================================== */
@font-default: 'Open Sans', Arial, Helvetica, sans-serif;
@base-dark-color: #11375B;
@base-dark-color: #008cc4;
@base-light-color: #ffffff;
@base-success-color: #5cb85c;
@base-info-color: #526A84;
@base-warning-color: #f0ad4e;
@base-danger-color: #d9534f;
@primary-color: #11375b;
@primary-color: #008cc4;
@secondary-color: #e4e4e4;
@optional-color: #F47415;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 18 KiB

@ -17,8 +17,8 @@
}}
{{#zone "footer"}}
<p>
<span class="hidden-xs">Entgra IoT Server 3.3.1</span>
<span class="visible-xs-inline">Entgra IoT Server 3.3.1</span> | © <script>document.write(new Date().getFullYear());</script>,
<span class="hidden-xs">Entgra IoT Server 3.5.0</span>
<span class="visible-xs-inline">Entgra IoT Server 3.5.0</span> | © <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}}

@ -1,60 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
* 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.
-->
<svg version="1.1" id="wso2" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="29 -6.639 72 27.639" enable-background="new 29 -6.639 72 27.639" xml:space="preserve">
<g>
<circle fill="#F47B20" cx="82.076" cy="4.192" r="8.691"/>
<path d="M90.804,3.776l-0.01-0.115h-0.115c-0.53-0.001-1.061,0-1.594,0c-0.531,0-1.062,0-1.593,0h-0.073l-0.035,0.063
c-0.402,0.711-0.798,1.425-1.193,2.14L85.843,6.49c-0.601-1.454-1.198-2.908-1.795-4.363c-0.63-1.535-1.26-3.07-1.895-4.603
l-0.11-0.266l-0.119,0.262c-0.456,1.005-0.908,2.013-1.359,3.021c-0.62,1.383-1.261,2.812-1.905,4.212
c-0.897-0.008-1.794-0.007-2.695-0.006c-0.823,0.001-1.648,0.002-2.475-0.004l-0.128-0.001l0.002,0.128
c0.004,0.278,0.044,0.554,0.083,0.821l0.021,0.148h0.108c1.432-0.002,2.863-0.002,4.293-0.001h1.512l0.034-0.073
c0.44-0.972,0.878-1.947,1.316-2.921c0.421-0.938,0.842-1.875,1.267-2.811c0.643,1.552,1.279,3.106,1.917,4.661
c0.558,1.359,1.115,2.719,1.677,4.077l0.098,0.237l0.127-0.224c0.576-1.025,1.147-2.054,1.719-3.082l0.528-0.951
c0.876,0,1.751,0,2.625,0h0.115l0.01-0.115C90.834,4.383,90.832,4.11,90.804,3.776z"/>
<path fill="#F47B20" d="M29-6.61c0.849,0.001,1.696-0.002,2.545,0.002c2.065,5.082,4.121,10.169,6.198,15.247
c2.069-5.093,4.122-10.194,6.213-15.278c2.067,5.095,4.138,10.188,6.205,15.283c2.068-5.084,4.126-10.172,6.198-15.255
c0.857,0.001,1.716-0.002,2.573,0.001c-2.883,7.122-5.778,14.24-8.658,21.364c-0.008,0.103-0.157,0.273-0.192,0.074
c-2.042-5.053-4.094-10.1-6.127-15.157c-2.084,5.111-4.142,10.233-6.216,15.347C34.82,7.813,31.908,0.602,29-6.61z"/>
<path fill="#F47B20" d="M60.721-5.513c1.362-0.97,3.118-1.239,4.751-1.046c1.875,0.271,3.473,1.576,4.363,3.213
c-0.618,0.407-1.25,0.793-1.865,1.205c-0.329-0.36-0.55-0.802-0.893-1.15c-0.453-0.498-1.041-0.895-1.709-1.027
c-1.316-0.275-2.805,0.074-3.734,1.083c-0.996,1.055-1.006,3.01,0.193,3.919c0.841,0.609,1.756,1.108,2.677,1.586
c1.174,0.532,2.363,1.052,3.429,1.787c0.741,0.523,1.531,1.047,2,1.847c0.684,1.164,0.755,2.589,0.537,3.894
c-0.291,1.735-1.421,3.248-2.881,4.192c-1.289,0.842-2.883,1.128-4.401,0.968c-1.382-0.108-2.744-0.654-3.748-1.624
c-1.047-0.983-1.665-2.335-1.985-3.718c0.763-0.234,1.526-0.463,2.288-0.698c0.283,1.176,0.807,2.364,1.789,3.12
c0.933,0.742,2.211,0.893,3.355,0.68c1.338-0.239,2.507-1.217,3.011-2.474c0.314-0.84,0.416-1.786,0.158-2.653
c-0.175-0.6-0.595-1.103-1.111-1.443c-1.075-0.714-2.207-1.342-3.385-1.869c-0.904-0.408-1.784-0.874-2.603-1.436
c-0.654-0.453-1.336-0.917-1.767-1.604c-0.69-1.087-0.784-2.461-0.533-3.698C58.902-3.703,59.689-4.796,60.721-5.513z"/>
<path fill="#FFFFFF" d="M81.274-6.595c1.743-0.113,3.52,0.152,5.121,0.864c3.276,1.389,5.746,4.501,6.343,8.011
c0.419,2.347,0.048,4.832-1.074,6.939c-1.465,2.814-4.231,4.91-7.342,5.546c-2.047,0.43-4.217,0.261-6.168-0.498
c-1.884-0.728-3.556-1.996-4.76-3.617c-1.276-1.699-2.032-3.785-2.128-5.908c-0.145-2.528,0.646-5.1,2.194-7.105
C75.301-4.806,78.221-6.391,81.274-6.595z M79.977-4.147c-2.324,0.573-4.367,2.172-5.489,4.285
c-0.785,1.439-1.099,3.101-1.022,4.731h0.024c0.004,0.283,0.047,0.565,0.088,0.846c0.455,2.707,2.287,5.133,4.77,6.303
c1.988,0.968,4.358,1.12,6.453,0.409c1.752-0.574,3.295-1.744,4.35-3.254c0.934-1.328,1.469-2.926,1.538-4.546
c0.024-0.281,0.014-0.561-0.009-0.841c-0.083-1.637-0.639-3.25-1.596-4.581c-1.104-1.553-2.738-2.719-4.566-3.258
C83.049-4.491,81.462-4.526,79.977-4.147z"/>
<path fill="#FFFFFF" d="M93.688,3.448c1.131-0.311,2.351-0.314,3.479,0.015c1.542,0.453,2.786,1.721,3.318,3.223
c0.526,1.563,0.294,3.35-0.576,4.747c-0.709,1.137-1.603,2.146-2.506,3.132c-1.461,1.578-2.927,3.152-4.387,4.732
c2.661-0.004,5.322-0.001,7.983-0.002c-0.001,0.568,0.001,1.136-0.001,1.705c-3.943-0.004-7.886,0.003-11.829-0.003
c2.519-2.731,5.062-5.44,7.571-8.18c0.917-1.088,1.998-2.181,2.249-3.64c0.232-1.143-0.129-2.387-0.985-3.189
c-1.102-1.147-2.93-1.389-4.359-0.759C93.685,4.637,93.755,4.04,93.688,3.448z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 32 KiB

@ -495,7 +495,7 @@ body {
font-size: 14px;
line-height: 1.42857;
color: #333333;
background-color: #fff;
background-color: rgb(240,242,243);
}
input,
@ -777,7 +777,7 @@ a.text-success:focus {
}
.text-info {
color: #526A84;
color: #008cc4;
}
a.text-info:hover,
@ -826,7 +826,7 @@ a.bg-success:focus {
}
.bg-info {
background-color: #526A84;
background-color: #008cc4;
}
a.bg-info:hover,
@ -2088,7 +2088,7 @@ table th[class*="col-"] {
.table > tfoot > tr > th.info,
.table > tfoot > tr.info > td,
.table > tfoot > tr.info > th {
background-color: #526A84;
background-color: #008cc4;
}
.table-hover > tbody > tr > td.info:hover,
@ -2776,14 +2776,14 @@ header {
position: relative;
}
header.header-default {
background: #11375b;
background: #008cc4;
color: #fff;
}
header a,
header a:hover,
header a:visited,
header a:focus {
color: #fff;
color: rgba(0,0,0, 0.65) !important;
text-decoration: none;
}
header .brand {
@ -2810,16 +2810,16 @@ header .nav > li > a {
height: 50px;
}
header .nav > li > a:hover {
background: #262626;
background: #FFFFFF;
}
header .nav > li > a:focus {
color: #fff;
background: #262626;
background: #008cc4;
}
header .nav .open > a,
header .nav .open > a:hover,
header .nav .open > a:focus {
background: black;
background: #FFFFFF;
}
header .nav .dropdown-menu {
background: black;
@ -2828,7 +2828,8 @@ header .nav .dropdown-menu {
top:50px;
}
header .nav .dropdown-menu a {
color: #fff;
color: rgba(0,0,0, 0.65) !important;
background-color: white;
}
header .fw-inverse, header .fa-inverse {
color: #191919;
@ -2838,7 +2839,7 @@ footer {
width: 100%;
min-height: 40px;
overflow: hidden;
color: #cbcbcb;
color: rgba(0,0,0, 0.65);
background: #222222;
}
footer > .container, footer > .container-fluid {
@ -3912,7 +3913,7 @@ tbody.collapse.in {
background-color:#fff!important;
}
.navbar-default .navbar-toggle:hover, .navbar-default .navbar-toggle:focus{
background-color:#526a84!important;
background-color:#008cc4!important;
}
.navbar-default .navbar-toggle:hover .icon-bar, .navbar-default .navbar-toggle:focus .icon-bar{
background-color:#798EA5!important;
@ -3929,7 +3930,7 @@ tbody.collapse.in {
}
}
.navbar-default {
background-color: #f8f8f8;
background-color: #FFFFFF;
border-color: #e7e7e7;
}
.navbar-default .navbar-brand {
@ -4320,7 +4321,7 @@ a.label:hover, a.label:focus {
}
.label-info {
background-color: #526A84;
background-color: #008cc4;
}
.label-info[href]:hover, .label-info[href]:focus {
background-color: #006d74;
@ -4461,7 +4462,7 @@ a.thumbnail.active {
.thumbnail.icon {
border: none;
margin: 0;
background: #11375b;
background: #008cc4;
color: #fff;
text-align: center;
overflow: hidden;
@ -4556,8 +4557,8 @@ a.thumbnail.active {
}
.alert-info {
background-color: #526A84;
border-color: #526A84;
background-color: #008cc4;
border-color: #008cc4;
color: #fff;
}
.alert-info hr {
@ -4692,7 +4693,7 @@ a.thumbnail.active {
}
.progress-bar-info {
background-color: #526A84;
background-color: #008cc4;
}
.progress-striped .progress-bar-info {
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
@ -4880,13 +4881,13 @@ button.list-group-item-success.active:focus {
}
.list-group-item-info {
color: #526A84;
background-color: #526A84;
color: #008cc4;
background-color: #008cc4;
}
a.list-group-item-info,
button.list-group-item-info {
color: #526A84;
color: #008cc4;
}
a.list-group-item-info .list-group-item-heading,
button.list-group-item-info .list-group-item-heading {
@ -4895,7 +4896,7 @@ button.list-group-item-info .list-group-item-heading {
a.list-group-item-info:hover, a.list-group-item-info:focus,
button.list-group-item-info:hover,
button.list-group-item-info:focus {
color: #526A84;
color: #008cc4;
background-color: #00858e;
}
a.list-group-item-info.active, a.list-group-item-info.active:hover, a.list-group-item-info.active:focus,
@ -4903,8 +4904,8 @@ button.list-group-item-info.active,
button.list-group-item-info.active:hover,
button.list-group-item-info.active:focus {
color: #fff;
background-color: #526A84;
border-color: #526A84;
background-color: #008cc4;
border-color: #008cc4;
}
.list-group-item-warning {
@ -5284,22 +5285,22 @@ button.list-group-item-danger.active:focus {
}
.panel-info {
border-color: #526A84;
border-color: #008cc4;
}
.panel-info > .panel-heading {
color: #526A84;
background-color: #526A84;
border-color: #526A84;
color: #008cc4;
background-color: #008cc4;
border-color: #008cc4;
}
.panel-info > .panel-heading + .panel-collapse > .panel-body {
border-top-color: #526A84;
border-top-color: #008cc4;
}
.panel-info > .panel-heading .badge {
color: #526A84;
background-color: #526A84;
color: #008cc4;
background-color: #008cc4;
}
.panel-info > .panel-footer + .panel-collapse > .panel-body {
border-bottom-color: #526A84;
border-bottom-color: #008cc4;
}
.panel-warning {
@ -5454,10 +5455,10 @@ button.close {
color: #5cb85c;
}
.message-info {
border-left-color: #526A84;
border-left-color: #008cc4;
}
.message-info h4 {
color: #526A84;
color: #008cc4;
}
.message-warning {
border-left-color: #f0ad4e;
@ -6364,7 +6365,7 @@ button.close {
display: block !important;
}
table.visible-print {
table.visible-print {.nav > li > a:hover, .nav > li > a:focus
display: table !important;
}
@ -6909,7 +6910,7 @@ button.close {
}
.icon-info {
color: #526A84;
color: #008cc4;
}
.icon-warning {
@ -7044,6 +7045,7 @@ body.inverse .fade-edge:after {
* navbar styles
* ======================================================================== */
.navbar-wrapper {
box-shadow: 0 1px 4px 3px rgba(0,21,41,.08);
min-height: 40px;
}
@ -7063,7 +7065,7 @@ body.inverse .fade-edge:after {
}
.navbar {
background: #526A84;
background: #008cc4;
border: none;
margin-bottom: 0;
-webkit-border-radius: 0;
@ -7108,15 +7110,15 @@ body.inverse .fade-edge:after {
padding: 0 8px;
line-height: 40px;
font-size: 18px;
background: #F47415;
color: #ffffff;
background: #FFFFFF;
color: rgba(0,0,0, 0.65);
}
.navbar-menu-toggle:hover, .navbar-menu-toggle:focus, .navbar-menu-toggle:active {
color: #ffffff;
background: #D56613;
background: #008cc4;
}
.navbar-menu-toggle[aria-expanded=true] {
background: #D56613;
background: #008cc4;
}
.navbar-menu-toggle .icon {
line-height: 40px;
@ -7137,12 +7139,12 @@ body.inverse .fade-edge:after {
padding: 0 15px;
line-height: 40px;
text-transform: uppercase;
background: #010F1F;
background: #FFFFFF;
}
.navbar > .container .navbar-brand a,
.navbar > .container-fluid .navbar-brand a {
color: #ffffff;
color: rgba(0,0,0, 0.65);
font-size: 16px;
}
@ -7151,7 +7153,7 @@ body.inverse .fade-edge:after {
}
.navbar-default .navbar-nav > li > a {
color: #ffffff;
color: rgba(0,0,0, 0.65);
text-transform: uppercase;
padding: 0 15px;
line-height: 40px;
@ -7160,10 +7162,11 @@ body.inverse .fade-edge:after {
.navbar-default .navbar-nav > li a:hover, .navbar-default .navbar-nav > li a:focus, .navbar-default .navbar-nav > li a:active {
background: #0065a8;
color: #ffffff;
color: #008cc4;
}
.navbar-default .navbar-nav > li a:hover {
background: #798EA5;
background: #FFFFFF;
color: #008cc4;
}
.navbar-default .navbar-nav > .active > a, .navbar-default .navbar-nav > .active > a:hover, .navbar-default .navbar-nav > .active > a:focus, .navbar-default .navbar-nav > .active > a:active {
@ -7171,7 +7174,7 @@ body.inverse .fade-edge:after {
color: #ffffff;
}
.navbar-default .navbar-nav > .active > a:hover {
background: #424958;
background: #0280b3;
}
.navbar-collapse.dropdown {
@ -7214,11 +7217,12 @@ body.inverse .fade-edge:after {
}
.navbar-collapse.tiles ul.nav li li a {
background: #526A84;
background: #008cc4;
}
.navbar-collapse.tiles ul.nav li a:hover {
background: #133e67;
background: #FFFFFF;
color: #008cc4
}
.navbar-collapse.tiles ul.nav li li a:hover {
@ -7240,7 +7244,7 @@ body.inverse .fade-edge:after {
.navbar-collapse.tiles ul.nav li.has-sub > a:after {
width: 7px;
height: 120px;
background: #526a84;
background: #008cc4;
display: inline-block;
content: " ";
top: 0;
@ -7348,11 +7352,12 @@ body.inverse .fade-edge:after {
width: 350px;
height: 100%;
overflow-y: auto;
background: #222;
color: #ffffff;
background: #FFFFFF;
color: rgba(0,0,0, 0.65);
-webkit-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
transition: all 0.5s ease;
box-shadow: 15px 15px 15px 10px rgba(0,21,41,.8);
}
.sidebar-wrapper.affix {
@ -7794,8 +7799,8 @@ ul.sidebar-messages > li {
}
.pagination > .active > a, .pagination > .active > a:focus, .pagination > .active > a:hover, .pagination > .active > span, .pagination > .active > span:focus, .pagination > .active > span:hover {
background: #004675;
border-color: #004675;
background: #008cc4;
border-color: #008cc4;
}
.pagination > .disabled > a, .pagination > .disabled > a:focus, .pagination > .disabled > a:hover, .pagination > .disabled > span, .pagination > .disabled > span:focus, .pagination > .disabled > span:hover {
@ -7980,7 +7985,7 @@ ul.tiles .icon {
}
@media only screen and (min-width: 1280px) {
.modal-dialog {
width: 1000px;
width: 785px;
}
}
/* ========================================================================
@ -8049,7 +8054,7 @@ a.list-group-item:hover {
.tree-view li > .icon {
font-family: "font-wso2";
font-style: normal;
background: #004675;
background: #008cc4;
color: #ffffff;
height: 20px;
width: 20px;
@ -8302,10 +8307,10 @@ a.list-group-item:hover {
color: #8a8a8a;
}
.checkbox > input[type=checkbox]:not(:disabled) + .helper:before {
border-color: #526A84;
border-color: #008cc4;
}
.checkbox > input[type=checkbox] :not(:disabled) + .helper:before {
border-color: #526A84;
border-color: #008cc4;
}
.checkbox .helper {
padding-left: 23px;
@ -8910,8 +8915,8 @@ a.list-group-item:hover {
.data-container .btn-primary {
color: #ffffff;
background-color: #231F20;
border: 1px solid #231F20;
background-color: #008cc4;
border: 1px solid #008cc4;
width: 100%;
}
@ -8925,7 +8930,7 @@ body.login-bg {
background-color: #efefef;
}
#right-sidebar h4 a{
color:#526a84;
color:#008cc4;
}
#right-sidebar h4 a:hover,#right-sidebar h4 a:active{
color:#798ea5;
@ -8946,5 +8951,5 @@ body.login-bg {
}
.sidebar-messages + div > a.btn:hover,.sidebar-messages + div > .btn:hover{
background:#526a84;
background:#008cc4;
}

@ -1,60 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
* 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.
-->
<svg version="1.1" id="wso2" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="29 -6.639 72 27.639" enable-background="new 29 -6.639 72 27.639" xml:space="preserve">
<g>
<circle fill="#F47B20" cx="82.076" cy="4.192" r="8.691"/>
<path d="M90.804,3.776l-0.01-0.115h-0.115c-0.53-0.001-1.061,0-1.594,0c-0.531,0-1.062,0-1.593,0h-0.073l-0.035,0.063
c-0.402,0.711-0.798,1.425-1.193,2.14L85.843,6.49c-0.601-1.454-1.198-2.908-1.795-4.363c-0.63-1.535-1.26-3.07-1.895-4.603
l-0.11-0.266l-0.119,0.262c-0.456,1.005-0.908,2.013-1.359,3.021c-0.62,1.383-1.261,2.812-1.905,4.212
c-0.897-0.008-1.794-0.007-2.695-0.006c-0.823,0.001-1.648,0.002-2.475-0.004l-0.128-0.001l0.002,0.128
c0.004,0.278,0.044,0.554,0.083,0.821l0.021,0.148h0.108c1.432-0.002,2.863-0.002,4.293-0.001h1.512l0.034-0.073
c0.44-0.972,0.878-1.947,1.316-2.921c0.421-0.938,0.842-1.875,1.267-2.811c0.643,1.552,1.279,3.106,1.917,4.661
c0.558,1.359,1.115,2.719,1.677,4.077l0.098,0.237l0.127-0.224c0.576-1.025,1.147-2.054,1.719-3.082l0.528-0.951
c0.876,0,1.751,0,2.625,0h0.115l0.01-0.115C90.834,4.383,90.832,4.11,90.804,3.776z"/>
<path fill="#F47B20" d="M29-6.61c0.849,0.001,1.696-0.002,2.545,0.002c2.065,5.082,4.121,10.169,6.198,15.247
c2.069-5.093,4.122-10.194,6.213-15.278c2.067,5.095,4.138,10.188,6.205,15.283c2.068-5.084,4.126-10.172,6.198-15.255
c0.857,0.001,1.716-0.002,2.573,0.001c-2.883,7.122-5.778,14.24-8.658,21.364c-0.008,0.103-0.157,0.273-0.192,0.074
c-2.042-5.053-4.094-10.1-6.127-15.157c-2.084,5.111-4.142,10.233-6.216,15.347C34.82,7.813,31.908,0.602,29-6.61z"/>
<path fill="#F47B20" d="M60.721-5.513c1.362-0.97,3.118-1.239,4.751-1.046c1.875,0.271,3.473,1.576,4.363,3.213
c-0.618,0.407-1.25,0.793-1.865,1.205c-0.329-0.36-0.55-0.802-0.893-1.15c-0.453-0.498-1.041-0.895-1.709-1.027
c-1.316-0.275-2.805,0.074-3.734,1.083c-0.996,1.055-1.006,3.01,0.193,3.919c0.841,0.609,1.756,1.108,2.677,1.586
c1.174,0.532,2.363,1.052,3.429,1.787c0.741,0.523,1.531,1.047,2,1.847c0.684,1.164,0.755,2.589,0.537,3.894
c-0.291,1.735-1.421,3.248-2.881,4.192c-1.289,0.842-2.883,1.128-4.401,0.968c-1.382-0.108-2.744-0.654-3.748-1.624
c-1.047-0.983-1.665-2.335-1.985-3.718c0.763-0.234,1.526-0.463,2.288-0.698c0.283,1.176,0.807,2.364,1.789,3.12
c0.933,0.742,2.211,0.893,3.355,0.68c1.338-0.239,2.507-1.217,3.011-2.474c0.314-0.84,0.416-1.786,0.158-2.653
c-0.175-0.6-0.595-1.103-1.111-1.443c-1.075-0.714-2.207-1.342-3.385-1.869c-0.904-0.408-1.784-0.874-2.603-1.436
c-0.654-0.453-1.336-0.917-1.767-1.604c-0.69-1.087-0.784-2.461-0.533-3.698C58.902-3.703,59.689-4.796,60.721-5.513z"/>
<path fill="#FFFFFF" d="M81.274-6.595c1.743-0.113,3.52,0.152,5.121,0.864c3.276,1.389,5.746,4.501,6.343,8.011
c0.419,2.347,0.048,4.832-1.074,6.939c-1.465,2.814-4.231,4.91-7.342,5.546c-2.047,0.43-4.217,0.261-6.168-0.498
c-1.884-0.728-3.556-1.996-4.76-3.617c-1.276-1.699-2.032-3.785-2.128-5.908c-0.145-2.528,0.646-5.1,2.194-7.105
C75.301-4.806,78.221-6.391,81.274-6.595z M79.977-4.147c-2.324,0.573-4.367,2.172-5.489,4.285
c-0.785,1.439-1.099,3.101-1.022,4.731h0.024c0.004,0.283,0.047,0.565,0.088,0.846c0.455,2.707,2.287,5.133,4.77,6.303
c1.988,0.968,4.358,1.12,6.453,0.409c1.752-0.574,3.295-1.744,4.35-3.254c0.934-1.328,1.469-2.926,1.538-4.546
c0.024-0.281,0.014-0.561-0.009-0.841c-0.083-1.637-0.639-3.25-1.596-4.581c-1.104-1.553-2.738-2.719-4.566-3.258
C83.049-4.491,81.462-4.526,79.977-4.147z"/>
<path fill="#FFFFFF" d="M93.688,3.448c1.131-0.311,2.351-0.314,3.479,0.015c1.542,0.453,2.786,1.721,3.318,3.223
c0.526,1.563,0.294,3.35-0.576,4.747c-0.709,1.137-1.603,2.146-2.506,3.132c-1.461,1.578-2.927,3.152-4.387,4.732
c2.661-0.004,5.322-0.001,7.983-0.002c-0.001,0.568,0.001,1.136-0.001,1.705c-3.943-0.004-7.886,0.003-11.829-0.003
c2.519-2.731,5.062-5.44,7.571-8.18c0.917-1.088,1.998-2.181,2.249-3.64c0.232-1.143-0.129-2.387-0.985-3.189
c-1.102-1.147-2.93-1.389-4.359-0.759C93.685,4.637,93.755,4.04,93.688,3.448z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 4.6 KiB

@ -1,58 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
* 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.
-->
<svg version="1.1" id="wso2" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="29 -6.639 72 27.639" enable-background="new 29 -6.639 72 27.639" xml:space="preserve">
<circle fill="#F47B20" cx="82.076" cy="4.192" r="8.691"/>
<path fill="#FFFFFF" d="M90.804,3.776l-0.01-0.115h-0.115c-0.53-0.001-1.061,0-1.594,0c-0.531,0-1.062,0-1.593,0h-0.073
l-0.035,0.063c-0.402,0.711-0.798,1.425-1.193,2.14L85.843,6.49c-0.601-1.454-1.198-2.908-1.795-4.363
c-0.63-1.535-1.26-3.07-1.895-4.603l-0.11-0.266L81.924-2.48c-0.456,1.005-0.908,2.013-1.359,3.021
c-0.62,1.383-1.261,2.812-1.905,4.212c-0.897-0.008-1.794-0.007-2.695-0.006c-0.823,0.001-1.648,0.002-2.475-0.004l-0.128-0.001
l0.002,0.128c0.004,0.278,0.044,0.554,0.083,0.821l0.021,0.148h0.108c1.432-0.002,2.863-0.002,4.293-0.001h1.512l0.034-0.073
c0.44-0.972,0.878-1.947,1.316-2.921c0.421-0.938,0.842-1.875,1.267-2.811c0.643,1.552,1.279,3.106,1.917,4.661
c0.558,1.359,1.115,2.719,1.677,4.077l0.098,0.237l0.127-0.224c0.576-1.025,1.147-2.054,1.719-3.082l0.528-0.951
c0.876,0,1.751,0,2.625,0h0.115l0.01-0.115C90.834,4.383,90.831,4.109,90.804,3.776z"/>
<path fill="#F47B20" d="M29-6.61c0.849,0.001,1.696-0.002,2.545,0.002c2.065,5.082,4.121,10.169,6.198,15.247
c2.069-5.093,4.122-10.194,6.213-15.278c2.067,5.095,4.138,10.188,6.205,15.283c2.068-5.084,4.126-10.172,6.198-15.255
c0.857,0.001,1.716-0.002,2.573,0.001c-2.883,7.122-5.778,14.24-8.658,21.364c-0.008,0.103-0.157,0.273-0.192,0.074
c-2.042-5.053-4.094-10.1-6.127-15.157c-2.084,5.111-4.142,10.233-6.216,15.347C34.82,7.812,31.908,0.602,29-6.61z"/>
<path fill="#F47B20" d="M60.721-5.513c1.362-0.97,3.118-1.239,4.751-1.046c1.875,0.271,3.473,1.576,4.363,3.213
c-0.618,0.407-1.25,0.793-1.865,1.205c-0.329-0.36-0.55-0.802-0.893-1.15c-0.453-0.498-1.041-0.895-1.709-1.027
c-1.316-0.275-2.805,0.074-3.734,1.083c-0.996,1.055-1.006,3.01,0.193,3.919c0.841,0.609,1.756,1.108,2.677,1.586
c1.174,0.532,2.363,1.052,3.429,1.787c0.741,0.523,1.531,1.047,2,1.847c0.684,1.164,0.755,2.589,0.537,3.894
c-0.291,1.735-1.421,3.248-2.881,4.192c-1.289,0.842-2.883,1.128-4.401,0.968c-1.382-0.108-2.744-0.654-3.748-1.624
c-1.047-0.983-1.665-2.335-1.985-3.718c0.763-0.234,1.526-0.463,2.288-0.698c0.283,1.176,0.807,2.364,1.789,3.12
c0.933,0.742,2.211,0.893,3.355,0.68c1.338-0.239,2.507-1.217,3.011-2.474c0.314-0.84,0.416-1.786,0.158-2.653
c-0.175-0.6-0.595-1.103-1.111-1.443c-1.075-0.714-2.207-1.342-3.385-1.869c-0.904-0.408-1.784-0.874-2.603-1.436
c-0.654-0.453-1.336-0.917-1.767-1.604c-0.69-1.087-0.784-2.461-0.533-3.698C58.902-3.703,59.689-4.796,60.721-5.513z"/>
<path fill="#060709" d="M81.274-6.596c1.743-0.113,3.52,0.152,5.121,0.864c3.276,1.389,5.746,4.501,6.343,8.011
c0.419,2.347,0.048,4.832-1.074,6.939c-1.465,2.814-4.231,4.91-7.342,5.546c-2.047,0.43-4.217,0.261-6.168-0.498
c-1.884-0.728-3.556-1.996-4.76-3.617c-1.276-1.699-2.032-3.785-2.128-5.908c-0.145-2.528,0.646-5.1,2.194-7.105
C75.301-4.806,78.221-6.391,81.274-6.596z M79.977-4.147c-2.324,0.573-4.367,2.172-5.489,4.285
c-0.785,1.439-1.099,3.101-1.022,4.731h0.024c0.004,0.283,0.047,0.565,0.088,0.846c0.455,2.707,2.287,5.133,4.77,6.303
c1.988,0.968,4.358,1.12,6.453,0.409c1.752-0.574,3.295-1.744,4.35-3.254c0.934-1.328,1.469-2.926,1.538-4.546
c0.024-0.281,0.014-0.561-0.009-0.841c-0.083-1.637-0.639-3.25-1.596-4.581c-1.104-1.553-2.738-2.719-4.566-3.258
C83.049-4.491,81.462-4.526,79.977-4.147z"/>
<path fill="#060709" d="M93.688,3.447c1.131-0.311,2.351-0.314,3.479,0.015c1.542,0.453,2.786,1.721,3.318,3.223
c0.526,1.563,0.294,3.35-0.576,4.747c-0.709,1.137-1.603,2.146-2.506,3.132c-1.461,1.578-2.927,3.152-4.387,4.732
c2.661-0.004,5.322-0.001,7.983-0.002c-0.001,0.568,0.001,1.136-0.001,1.705c-3.943-0.004-7.886,0.003-11.829-0.003
c2.519-2.731,5.062-5.44,7.571-8.18c0.917-1.088,1.998-2.181,2.249-3.64c0.232-1.143-0.129-2.387-0.985-3.189
c-1.102-1.147-2.93-1.389-4.359-0.759C93.685,4.637,93.755,4.04,93.688,3.447z"/>
</svg>

Before

Width:  |  Height:  |  Size: 4.5 KiB

@ -1724,7 +1724,7 @@ input[type=number].form-control {
.table.list-table:not(.grid-view) {
& > tbody > tr > td,
& > tbody > tr > th,{
& > tbody > tr > th{
background: #f5f5f5;
&.fade-edge:after {

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

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

Loading…
Cancel
Save