From 7ecaf232f531883233fe1ba4082b02db0839cdaa Mon Sep 17 00:00:00 2001 From: lasanthaDLPDS Date: Tue, 25 Sep 2018 08:08:27 +0530 Subject: [PATCH] Fix store API deploying issue --- .../application/mgt/core/dao/common/Util.java | 15 --- .../core/dao/impl/Review/ReviewDAOImpl.java | 17 ++- .../mgt/core/impl/ReviewManagerImpl.java | 3 +- .../pom.xml | 2 +- .../mgt/publisher/api/ApiOriginFilter.java | 41 ++++++ .../src/main/webapp/WEB-INF/cxf-servlet.xml | 2 +- .../src/main/webapp/WEB-INF/web.xml | 29 ++-- .../pom.xml | 5 +- .../mgt/store/api/ApiOriginFilter.java | 46 +++++++ .../mgt/store/api/ValidationInterceptor.java | 124 ++++++++++++++++++ .../api/services/ReviewManagementAPI.java | 17 ++- .../impl/ReviewManagementAPIImpl.java | 5 +- .../src/main/webapp/WEB-INF/cxf-servlet.xml | 44 +++++-- .../src/main/webapp/WEB-INF/web.xml | 39 +++--- pom.xml | 2 +- 15 files changed, 308 insertions(+), 83 deletions(-) create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/ApiOriginFilter.java create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/ApiOriginFilter.java create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/ValidationInterceptor.java diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/common/Util.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/common/Util.java index b3c0e40120..41e635ef51 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/common/Util.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/common/Util.java @@ -202,19 +202,4 @@ public class Util { } } } - - public static PaginationRequest validateCommentListPageSize(PaginationRequest paginationRequest) throws - ReviewManagementException { - if (paginationRequest.getLimit() == 0) { - Configuration commentManagementConfig = ConfigurationManager.getInstance().getConfiguration(); - if (commentManagementConfig != null) { - paginationRequest.setLimit( - commentManagementConfig.getPaginationConfiguration().getCommentListPageSize()); - } else { - throw new ReviewManagementException( - "Application Management configuration has not initialized. Please check the application-mgt.xml file."); - } - } - return paginationRequest; - } } diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/Review/ReviewDAOImpl.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/Review/ReviewDAOImpl.java index c1a7a39273..5223207374 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/Review/ReviewDAOImpl.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/Review/ReviewDAOImpl.java @@ -205,11 +205,11 @@ public class ReviewDAOImpl extends AbstractDAOImpl implements ReviewDAO { try { conn = this.getDBConnection(); sql = "SELECT AP_APP_REVIEW.ID AS ID, AP_APP_REVIEW.COMMENT AS COMMENT, " - + "AP_APP_REVIEW.CREATED_BY AS CREATED_BY, AP_APP_REVIEW.MODIFIED_BY AS MODIFIED_BY, " - + "AP_APP_REVIEW.PARENT_ID AS PARENT_ID FROM AP_APP_REVIEW, AP_APP_RELEASE WHERE " - + "AP_APP_REVIEW.AP_APP_RELEASE_ID=AP_APP_RELEASE.ID AND AP_APP_RELEASE.UUID =? AND " - + "AP_APP_REVIEW.TENANT_ID = ? AND AP_APP_REVIEW.TENANT_ID = AP_APP_RELEASE.TENANT_ID " - + "LIMIT ? OFFSET ?;"; + + "AP_APP_REVIEW.CREATED_AT AS CREATED_AT, AP_APP_REVIEW.MODIFIED_AT AS MODIFIED_AT, " + + "AP_APP_REVIEW.USERNAME AS USERNAME AP_APP_REVIEW.PARENT_ID AS PARENT_ID " + + "FROM AP_APP_REVIEW, AP_APP_RELEASE WHERE AP_APP_REVIEW.AP_APP_RELEASE_ID=AP_APP_RELEASE.ID AND " + + "AP_APP_RELEASE.UUID =? AND AP_APP_REVIEW.TENANT_ID = ? AND " + + "AP_APP_REVIEW.TENANT_ID = AP_APP_RELEASE.TENANT_ID LIMIT ? OFFSET ?;"; statement = conn.prepareStatement(sql); statement.setString(1, uuid); statement.setInt(2, tenantId); @@ -219,8 +219,11 @@ public class ReviewDAOImpl extends AbstractDAOImpl implements ReviewDAO { while (rs.next()) { Review review = new Review(); review.setId(rs.getInt("ID")); - review.setComment(rs.getString("COMMENT_TEXT")); - review.setUsername(rs.getString("CREATED_BY")); + review.setComment(rs.getString("COMMENT")); + review.setCreatedAt(rs.getTimestamp("CREATED_AT")); + review.setModifiedAt(rs.getTimestamp("MODIFIED_AT")); + review.setParentId(rs.getInt("PARENT_ID")); + review.setUsername(rs.getString("USERNAME")); reviews.add(review); } } catch (DBConnectionException e) { diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/ReviewManagerImpl.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/ReviewManagerImpl.java index 11ed6d8cf1..b46c56eb1d 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/ReviewManagerImpl.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/ReviewManagerImpl.java @@ -34,7 +34,6 @@ import org.wso2.carbon.device.application.mgt.common.services.*; import org.wso2.carbon.device.application.mgt.core.dao.ApplicationReleaseDAO; import org.wso2.carbon.device.application.mgt.core.dao.ReviewDAO; import org.wso2.carbon.device.application.mgt.core.dao.common.ApplicationManagementDAOFactory; -import org.wso2.carbon.device.application.mgt.core.dao.common.Util; import org.wso2.carbon.device.application.mgt.core.exception.ApplicationManagementDAOException; import org.wso2.carbon.device.application.mgt.core.exception.ReviewManagementDAOException; import org.wso2.carbon.device.application.mgt.core.internal.DataHolder; @@ -176,7 +175,7 @@ public class ReviewManagerImpl implements ReviewManager { } try { ConnectionManagerUtil.openDBConnection(); - reviews = this.reviewDAO.getAllReviews(uuid, Util.validateCommentListPageSize(request), tenantId); + reviews = this.reviewDAO.getAllReviews(uuid, request, tenantId); for (Review review : reviews) { if (hierarchicalReviewSet.containsKey(review.getParentId())) { diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/pom.xml b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/pom.xml index f32092e155..201d0eec77 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/pom.xml +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/pom.xml @@ -55,7 +55,7 @@ org.apache.maven.plugins maven-antrun-plugin - 1.7 + 1.8 compile diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/ApiOriginFilter.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/ApiOriginFilter.java new file mode 100644 index 0000000000..65c521244c --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/ApiOriginFilter.java @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2018, 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.device.application.mgt.publisher.api; + +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 + } +} \ No newline at end of file diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/webapp/WEB-INF/cxf-servlet.xml b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/webapp/WEB-INF/cxf-servlet.xml index 92d7f20330..a75863915b 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/webapp/WEB-INF/cxf-servlet.xml +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/webapp/WEB-INF/cxf-servlet.xml @@ -36,7 +36,7 @@ - + diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/webapp/WEB-INF/web.xml b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/webapp/WEB-INF/web.xml index be302ea7ad..a5426c66e9 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/webapp/WEB-INF/web.xml +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/webapp/WEB-INF/web.xml @@ -46,6 +46,17 @@ true + + + + ApplicationMgt-Admin + /* + + + CONFIDENTIAL + + + managed-api-enabled @@ -61,20 +72,8 @@ - CorsFilter - org.apache.catalina.filters.CorsFilter - - cors.allowed.origins - * - - - cors.allowed.methods - GET,POST,DELETE,PUT - - - cors.allowed.headers - Content-Type - + ApiOriginFilter + org.wso2.carbon.device.application.mgt.publisher.api.ApiOriginFilter @@ -114,7 +113,7 @@ - CorsFilter + ApiOriginFilter /* diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/pom.xml b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/pom.xml index f87d02d27c..eac65f0923 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/pom.xml +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/pom.xml @@ -55,7 +55,7 @@ org.apache.maven.plugins maven-antrun-plugin - 1.7 + 1.8 compile @@ -85,7 +85,7 @@ org.codehaus.mojo exec-maven-plugin - 1.2.1 + 1.5.0 test @@ -176,6 +176,7 @@ org.wso2.carbon.devicemgt org.wso2.carbon.device.mgt.common + provided io.swagger diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/ApiOriginFilter.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/ApiOriginFilter.java new file mode 100644 index 0000000000..5c5158c51f --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/ApiOriginFilter.java @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2018, 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.device.application.mgt.store.api; + +import javax.servlet.Filter; +import javax.servlet.FilterChain; +import javax.servlet.FilterConfig; +import javax.servlet.ServletException; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; +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 + } +} \ No newline at end of file diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/ValidationInterceptor.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/ValidationInterceptor.java new file mode 100644 index 0000000000..61b0a0200b --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/ValidationInterceptor.java @@ -0,0 +1,124 @@ +/* + * Copyright (c) 2018, 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.device.application.mgt.store.api; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.cxf.interceptor.Fault; +import org.apache.cxf.jaxrs.lifecycle.ResourceProvider; +import org.apache.cxf.jaxrs.model.ClassResourceInfo; +import org.apache.cxf.jaxrs.model.OperationResourceInfo; +import org.apache.cxf.message.Message; +import org.apache.cxf.message.MessageContentsList; +import org.apache.cxf.phase.AbstractPhaseInterceptor; +import org.apache.cxf.phase.Phase; + +import javax.validation.ConstraintViolation; +import javax.validation.ConstraintViolationException; +import javax.validation.Validation; +import javax.validation.Validator; +import javax.validation.ValidatorFactory; +import javax.validation.executable.ExecutableValidator; +import java.lang.reflect.Method; +import java.util.List; +import java.util.Set; + +public class ValidationInterceptor extends AbstractPhaseInterceptor { + private Log log = LogFactory.getLog(getClass()); + private Validator validator = null; //validator interface is thread-safe + + public ValidationInterceptor() { + super(Phase.PRE_INVOKE); + ValidatorFactory defaultFactory = Validation.buildDefaultValidatorFactory(); + validator = defaultFactory.getValidator(); + if (validator == null) { + log.warn("Bean Validation provider could not be found, no validation will be performed"); + } else { + log.debug("Validation In-Interceptor initialized successfully"); + } + } + + @Override + public void handleMessage(Message message) throws Fault { + final OperationResourceInfo operationResource = message.getExchange().get(OperationResourceInfo.class); + if (operationResource == null) { + log.info("OperationResourceInfo is not available, skipping validation"); + return; + } + + final ClassResourceInfo classResource = operationResource.getClassResourceInfo(); + if (classResource == null) { + log.info("ClassResourceInfo is not available, skipping validation"); + return; + } + + final ResourceProvider resourceProvider = classResource.getResourceProvider(); + if (resourceProvider == null) { + log.info("ResourceProvider is not available, skipping validation"); + return; + } + + final List arguments = MessageContentsList.getContentsList(message); + final Method method = operationResource.getAnnotatedMethod(); + final Object instance = resourceProvider.getInstance(message); + if (method != null && arguments != null) { + //validate the parameters(arguments) over the invoked method + validate(method, arguments.toArray(), instance); + + //validate the fields of each argument + for (Object arg : arguments) { + if (arg != null) + validate(arg); + } + } + + } + + public void validate(final Method method, final Object[] arguments, final T instance) { + if (validator == null) { + log.warn("Bean Validation provider could not be found, no validation will be performed"); + return; + } + + ExecutableValidator methodValidator = validator.forExecutables(); + Set> violations = methodValidator.validateParameters(instance, + method, arguments); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } + + public void validate(final T object) { + if (validator == null) { + log.warn("Bean Validation provider could be found, no validation will be performed"); + return; + } + + Set> violations = validator.validate(object); + + if (!violations.isEmpty()) { + throw new ConstraintViolationException(violations); + } + } + + public void handleFault(Message messageParam) { + } +} diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/ReviewManagementAPI.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/ReviewManagementAPI.java index 1ad57f6f9c..8aa9d305fc 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/ReviewManagementAPI.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/ReviewManagementAPI.java @@ -124,18 +124,17 @@ public interface ReviewManagementAPI { name="uuid", value="uuid of the application release.", required = true) - @PathParam("uuid") - String uuid, + @PathParam("uuid") String uuid, @ApiParam( - name="offSet", - value="Starting review number.",defaultValue = "0") - @QueryParam("offSet") - int offSet, + name="offset", + value="Starting review number.", + defaultValue = "0") + @QueryParam("offSet") int offSet, @ApiParam( name="limit", - value = "Limit of paginated reviews",defaultValue = "20") - @QueryParam("limit") - int limit); + value = "Limit of paginated reviews", + defaultValue = "20") + @QueryParam("limit") int limit); @POST @Path("/{uuid}") diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/impl/ReviewManagementAPIImpl.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/impl/ReviewManagementAPIImpl.java index 202e9a220b..91609bc91b 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/impl/ReviewManagementAPIImpl.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/java/org/wso2/carbon/device/application/mgt/store/api/services/impl/ReviewManagementAPIImpl.java @@ -35,6 +35,7 @@ import org.wso2.carbon.device.application.mgt.common.PaginationRequest; import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagementException; import org.wso2.carbon.device.application.mgt.common.exception.ReviewManagementException; +import javax.ws.rs.DefaultValue; import javax.ws.rs.Path; import javax.ws.rs.Consumes; import javax.ws.rs.PathParam; @@ -58,8 +59,8 @@ public class ReviewManagementAPIImpl implements ReviewManagementAPI { @Path("/{uuid}") public Response getAllReviews( @PathParam("uuid") String uuid, - @QueryParam("offset") int offSet, - @QueryParam("limit") int limit) { + @DefaultValue("0") @QueryParam("offset") int offSet, + @DefaultValue("20") @QueryParam("limit") int limit) { ReviewManager reviewManager = APIUtil.getReviewManager(); PaginationRequest request = new PaginationRequest(offSet, limit); try { diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/webapp/WEB-INF/cxf-servlet.xml b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/webapp/WEB-INF/cxf-servlet.xml index 8e0452c6b3..accba127ed 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/webapp/WEB-INF/cxf-servlet.xml +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/webapp/WEB-INF/cxf-servlet.xml @@ -18,29 +18,51 @@ --> + xmlns:jaxrs="http://cxf.apache.org/jaxrs" xmlns:cxf="http://cxf.apache.org/core" + 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 http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd"> - + + + - - - - - + + + + + + + + + + + + - + + + + + + + + + + + + + + + diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/webapp/WEB-INF/web.xml b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/webapp/WEB-INF/web.xml index 7574e19e4c..40fb62988f 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/webapp/WEB-INF/web.xml +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.api/src/main/webapp/WEB-INF/web.xml @@ -19,14 +19,20 @@ - Application Management Webapp + App Store Management Webapp - JAX-WS/JAX-RS Application Management Endpoint + JAX-WS/JAX-RS App Store Management Endpoint JAX-WS/JAX-RS Servlet CXFServlet org.apache.cxf.transport.servlet.CXFServlet + + + swagger.security.filter + ApiAuthorizationFilterImpl + + 1 CXFServlet @@ -40,6 +46,17 @@ true + + + + ApplicationMgt-Admin + /* + + + CONFIDENTIAL + + + managed-api-enabled @@ -55,20 +72,8 @@ - CorsFilter - org.apache.catalina.filters.CorsFilter - - cors.allowed.origins - * - - - cors.allowed.methods - GET,POST,DELETE,PUT - - - cors.allowed.headers - Content-Type - + ApiOriginFilter + org.wso2.carbon.device.application.mgt.store.api.ApiOriginFilter @@ -108,7 +113,7 @@ - CorsFilter + ApiOriginFilter /* diff --git a/pom.xml b/pom.xml index b96ebfe0fc..95948b8f61 100644 --- a/pom.xml +++ b/pom.xml @@ -2100,7 +2100,7 @@ 1.9 - 2.0.4 + 3.1.1 2.0.4.wso2v4