analyticsClients = new ArrayList<>();
- for (String publisherURLGroup : publisherGroups) {
- try {
- String[] endpoints = DataPublisherUtil.getEndpoints(publisherURLGroup);
- for (String endpoint : endpoints) {
- try {
- endpoint = endpoint.trim();
- if (!endpoint.endsWith("/")) {
- endpoint += "/";
- }
- endpoint += session.getRequestURI().getSchemeSpecificPart().replace("secured-websocket-proxy","");
- AnalyticsClient analyticsClient = new AnalyticsClient(session, new URI(endpoint));
- analyticsClients.add(analyticsClient);
- } catch (URISyntaxException e) {
- log.error("Unable to create URL from: " + endpoint, e);
- } catch (WSProxyException e) {
- log.error("Unable to create WS client for: " + endpoint, e);
- }
- }
- } catch (DataEndpointConfigurationException e) {
- log.error("Unable to obtain endpoints from receiverURLGroup: " + publisherURLGroup, e);
- }
- }
- if (log.isDebugEnabled()) {
- log.debug("Configured " + analyticsClients.size() + " analytics clients for Session id: " +
- session.getId());
- }
- analyticsClientsMap.put(session.getId(), analyticsClients);
- }
-
- /**
- * Web socket onClose - Remove the registered sessions
- *
- * @param session - Users registered session.
- * @param reason - Status code for web-socket close.
- * @param streamName - StreamName extracted from the ws url.
- * @param version - Version extracted from the ws url.
- * @param tenantDomain - Domain of the tenant.
- */
- public void onClose(Session session, CloseReason reason, String streamName, String version, String tenantDomain) {
- if (log.isDebugEnabled()) {
- log.debug("Closing a WebSocket due to " + reason.getReasonPhrase() + ", for session ID:" +
- session.getId() + ", for request URI - " + session.getRequestURI());
- }
- for (AnalyticsClient analyticsClient : analyticsClientsMap.get(session.getId())) {
- if (analyticsClient != null) {
- try {
- analyticsClient.closeConnection(reason);
- } catch (WSProxyException e) {
- log.error("Error occurred while closing ws connection due to " + reason.getReasonPhrase() +
- ", for session ID:" + session.getId() + ", for request URI - " + session.getRequestURI(), e);
- }
- }
- }
- analyticsClientsMap.remove(session.getId());
- }
-
- /**
- * Web socket onMessage - When client sens a message
- *
- * @param session - Users registered session.
- * @param message - Status code for web-socket close.
- */
- void onMessage(Session session, String message) {
- for (AnalyticsClient analyticsClient : analyticsClientsMap.get(session.getId())) {
- if (analyticsClient != null) {
- analyticsClient.sendMessage(message);
- }
- }
- }
-
- /**
- * Web socket onError
- *
- * @param session - Users registered session.
- * @param throwable - Status code for web-socket close.
- * @param streamName - StreamName extracted from the ws url.
- * @param version - Version extracted from the ws url.
- * @param tenantDomain - Domain of the tenant.
- */
- public void onError(Session session, Throwable throwable, String streamName, String version, String tenantDomain) {
- log.error("Error occurred in session ID: " + session.getId() + ", for request URI - " +
- session.getRequestURI() + ", " + throwable.getMessage(), throwable);
- }
-
-}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.wsproxy/src/main/java/org/wso2/carbon/device/mgt/analytics/wsproxy/inbound/SuperTenantSubscriptionEndpoint.java b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.wsproxy/src/main/java/org/wso2/carbon/device/mgt/analytics/wsproxy/inbound/SuperTenantSubscriptionEndpoint.java
deleted file mode 100644
index 0e4bc3684d..0000000000
--- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.wsproxy/src/main/java/org/wso2/carbon/device/mgt/analytics/wsproxy/inbound/SuperTenantSubscriptionEndpoint.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * 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.mgt.analytics.wsproxy.inbound;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.base.MultitenantConstants;
-
-import javax.websocket.CloseReason;
-import javax.websocket.EndpointConfig;
-import javax.websocket.OnClose;
-import javax.websocket.OnError;
-import javax.websocket.OnMessage;
-import javax.websocket.OnOpen;
-import javax.websocket.Session;
-import javax.websocket.server.PathParam;
-import javax.websocket.server.ServerEndpoint;
-
-/**
- * Connect to web socket with Super tenant
- */
-
-@ServerEndpoint(value = "/{destination}/{streamname}/{version}")
-public class SuperTenantSubscriptionEndpoint extends SubscriptionEndpoint {
-
- private static final Log log = LogFactory.getLog(SuperTenantSubscriptionEndpoint.class);
-
- /**
- * Web socket onOpen - When client sends a message
- *
- * @param session - Users registered session.
- * @param streamName - StreamName extracted from the ws url.
- * @param version - Version extracted from the ws url.
- */
- @OnOpen
- public void onOpen(Session session, EndpointConfig config, @PathParam("streamname") String streamName,
- @PathParam("version") String version) {
- if (log.isDebugEnabled()) {
- log.debug("WebSocket opened, for Session id: " + session.getId() + ", for the Stream:" + streamName);
- }
- super.onOpen(session);
- }
-
- /**
- * Web socket onMessage - When client sens a message
- *
- * @param session - Users registered session.
- * @param message - Status code for web-socket close.
- * @param streamName - StreamName extracted from the ws url.
- */
- @OnMessage
- public void onMessage(Session session, String message, @PathParam("streamname") String streamName) {
- if (log.isDebugEnabled()) {
- log.debug("Received message from client. Message: " + message + ", " +
- "for Session id: " + session.getId() + ", for the Stream:" + streamName);
- }
- super.onMessage(session, message);
- }
-
- /**
- * Web socket onClose - Remove the registered sessions
- *
- * @param session - Users registered session.
- * @param reason - Status code for web-socket close.
- * @param streamName - StreamName extracted from the ws url.
- * @param version - Version extracted from the ws url.
- */
- @OnClose
- public void onClose(Session session, CloseReason reason, @PathParam("streamname") String streamName,
- @PathParam("version") String version) {
- super.onClose(session, reason, streamName, version, MultitenantConstants.SUPER_TENANT_NAME);
- }
-
- /**
- * Web socket onError - Remove the registered sessions
- *
- * @param session - Users registered session.
- * @param throwable - Status code for web-socket close.
- * @param streamName - StreamName extracted from the ws url.
- * @param version - Version extracted from the ws url.
- */
- @OnError
- public void onError(Session session, Throwable throwable, @PathParam("streamname") String streamName,
- @PathParam("version") String version) {
- super.onError(session, throwable, streamName, version, MultitenantConstants.SUPER_TENANT_NAME);
- }
-
-}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.wsproxy/src/main/java/org/wso2/carbon/device/mgt/analytics/wsproxy/inbound/TenantSubscriptionEndpoint.java b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.wsproxy/src/main/java/org/wso2/carbon/device/mgt/analytics/wsproxy/inbound/TenantSubscriptionEndpoint.java
deleted file mode 100644
index 02e55cfed6..0000000000
--- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.wsproxy/src/main/java/org/wso2/carbon/device/mgt/analytics/wsproxy/inbound/TenantSubscriptionEndpoint.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * 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.mgt.analytics.wsproxy.inbound;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import javax.websocket.CloseReason;
-import javax.websocket.EndpointConfig;
-import javax.websocket.OnClose;
-import javax.websocket.OnError;
-import javax.websocket.OnMessage;
-import javax.websocket.OnOpen;
-import javax.websocket.Session;
-import javax.websocket.server.PathParam;
-import javax.websocket.server.ServerEndpoint;
-
-/**
- * Connect to web socket with a tenant
- */
-
-@ServerEndpoint(value = "/{destination}/t/{tdomain}/{streamname}/{version}")
-public class TenantSubscriptionEndpoint extends SubscriptionEndpoint {
-
- private static final Log log = LogFactory.getLog(TenantSubscriptionEndpoint.class);
-
- /**
- * Web socket onOpen - When client sends a message
- *
- * @param session - Users registered session.
- * @param streamName - StreamName extracted from the ws url.
- * @param version - Version extracted from the ws url.
- * @param tdomain - Tenant domain extracted from ws url.
- */
- @OnOpen
- public void onOpen(Session session, EndpointConfig config, @PathParam("streamname") String streamName,
- @PathParam("version") String version, @PathParam("tdomain") String tdomain) {
- if (log.isDebugEnabled()) {
- log.debug("WebSocket opened, for Session id: " + session.getId() + ", for the Stream:" + streamName);
- }
- super.onOpen(session);
- }
-
- /**
- * Web socket onMessage - When client sens a message
- *
- * @param session - Users registered session.
- * @param message - Status code for web-socket close.
- * @param streamName - StreamName extracted from the ws url.
- */
- @OnMessage
- public void onMessage(Session session, String message, @PathParam("streamname") String streamName, @PathParam("tdomain") String tdomain) {
- if (log.isDebugEnabled()) {
- log.debug("Received message from client. Message: " + message + ", for Session id: " +
- session.getId() + ", for tenant domain" + tdomain + ", for the Adaptor:" + streamName);
- }
- super.onMessage(session, message);
- }
-
- /**
- * Web socket onClose - Remove the registered sessions
- *
- * @param session - Users registered session.
- * @param reason - Status code for web-socket close.
- * @param streamName - StreamName extracted from the ws url.
- * @param version - Version extracted from the ws url.
- */
- @OnClose
- public void onClose(Session session, CloseReason reason, @PathParam("streamname") String streamName,
- @PathParam("version") String version, @PathParam("tdomain") String tdomain) {
- super.onClose(session, reason, streamName, version, tdomain);
- }
-
- /**
- * Web socket onError - Remove the registered sessions
- *
- * @param session - Users registered session.
- * @param throwable - Status code for web-socket close.
- * @param streamName - StreamName extracted from the ws url.
- * @param version - Version extracted from the ws url.
- */
- @OnError
- public void onError(Session session, Throwable throwable, @PathParam("streamname") String streamName,
- @PathParam("version") String version, @PathParam("tdomain") String tdomain) {
- super.onError(session, throwable, streamName, version, tdomain);
- }
-}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.wsproxy/src/main/java/org/wso2/carbon/device/mgt/analytics/wsproxy/outbound/AnalyticsClient.java b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.wsproxy/src/main/java/org/wso2/carbon/device/mgt/analytics/wsproxy/outbound/AnalyticsClient.java
deleted file mode 100644
index 96e6d6974a..0000000000
--- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.wsproxy/src/main/java/org/wso2/carbon/device/mgt/analytics/wsproxy/outbound/AnalyticsClient.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * 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.mgt.analytics.wsproxy.outbound;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.device.mgt.analytics.wsproxy.exception.WSProxyException;
-
-import javax.websocket.CloseReason;
-import javax.websocket.ContainerProvider;
-import javax.websocket.DeploymentException;
-import javax.websocket.OnClose;
-import javax.websocket.OnMessage;
-import javax.websocket.Session;
-import javax.websocket.WebSocketContainer;
-import java.io.IOException;
-import java.net.URI;
-
-/**
- * This class holds web socket client implementation
- *
- * @since 1.0.0
- */
-@javax.websocket.ClientEndpoint
-public class AnalyticsClient {
-
- private static final Log log = LogFactory.getLog(AnalyticsClient.class);
-
- private final Session analyticsSession;
- private final Session clientSession;
-
- /**
- * Create {@link AnalyticsClient} instance.
- */
- public AnalyticsClient(Session clientSession, URI endpointURI) throws WSProxyException {
- WebSocketContainer container = ContainerProvider.getWebSocketContainer();
- this.clientSession = clientSession;
-
- try {
- this.analyticsSession = container.connectToServer(this, endpointURI);
- } catch (DeploymentException | IOException e) {
- String msg = "Error occurred while connecting to remote endpoint " + endpointURI.toString();
- log.error(msg, e);
- throw new WSProxyException(msg, e);
- }
- }
-
- /**
- * Callback hook for Connection close events.
- *
- * @param userSession the analyticsSession which is getting closed.
- * @param reason the reason for connection close
- */
- @OnClose
- public void onClose(Session userSession, CloseReason reason) {
- if (log.isDebugEnabled()) {
- log.debug("Closing web socket session: '" + userSession.getId() + "'. Code: " +
- reason.getCloseCode().toString() + " Reason: " + reason.getReasonPhrase());
- }
- }
-
- /**
- * Callback hook for Message Events.
- *
- * This method will be invoked when a client send a message.
- *
- * @param message The text message.
- */
- @OnMessage
- public void onMessage(String message) {
- synchronized (this.clientSession) {
- try {
- this.clientSession.getBasicRemote().sendText(message);
- } catch (IOException e) {
- log.warn("Sending message to client failed due to " + e.getMessage());
- if (log.isDebugEnabled()) {
- log.debug("Full stack trace:", e);
- }
- }
- }
- }
-
- /**
- * Send a message.
- *
- * @param message the message which is going to send.
- */
- public void sendMessage(String message) {
- synchronized (this.analyticsSession) {
- try {
- this.analyticsSession.getBasicRemote().sendText(message);
- } catch (IOException e) {
- log.warn("Sending message to analytics failed due to " + e.getMessage());
- if (log.isDebugEnabled()) {
- log.debug("Full stack trace:", e);
- }
- }
- }
- }
-
- /**
- * Close current connection.
- */
- public void closeConnection(CloseReason closeReason) throws WSProxyException {
- if (this.analyticsSession.isOpen()) {
- try {
- this.analyticsSession.close(closeReason);
- } catch (IOException e) {
- String msg = "Error on closing WS connection.";
- log.error(msg, e);
- throw new WSProxyException(msg, e);
- }
- } else {
- log.warn("Analytics session '" + this.analyticsSession.getId() + "' is already closed");
- }
- }
-}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.wsproxy/src/main/webapp/WEB-INF/web.xml b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.wsproxy/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index 933cf86531..0000000000
--- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.wsproxy/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-
-
- Output WebSocket Proxy
-
-
- ContentTypeBasedCachePreventionFilter
- org.wso2.carbon.ui.filters.cache.ContentTypeBasedCachePreventionFilter
-
- patterns
- text/html" ,application/json" ,text/plain
-
-
- filterAction
- enforce
-
-
- httpHeaders
- Cache-Control: no-store, no-cache, must-revalidate, private
-
-
-
-
- ContentTypeBasedCachePreventionFilter
- /*
-
-
diff --git a/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/pom.xml b/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/pom.xml
deleted file mode 100644
index 9c784d0af3..0000000000
--- a/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/pom.xml
+++ /dev/null
@@ -1,154 +0,0 @@
-
-
-
-
-
- identity-extensions
- io.entgra.device.mgt.core
- 5.0.0-SNAPSHOT
-
-
- 4.0.0
- bundle
- WSO2 Carbon - OAuth Back End Authenticator
- org.wso2.carbon.identity.authenticator.backend.oauth
-
-
-
- org.apache.felix
- org.apache.felix.scr.ds-annotations
- provided
-
-
- org.wso2.carbon
- org.wso2.carbon.utils
-
-
- org.wso2.carbon.identity.framework
- org.wso2.carbon.identity.base
-
-
- org.wso2.carbon.identity.framework
- org.wso2.carbon.identity.core
-
-
- org.wso2.carbon
- org.wso2.carbon.core
-
-
- org.ops4j.pax.logging
- pax-logging-api
- provided
-
-
-
- org.wso2.carbon.identity.framework
- org.wso2.carbon.identity.application.authentication.framework
-
-
- org.wso2.carbon
- org.wso2.carbon.core.services
-
-
- org.wso2.carbon.identity.inbound.auth.oauth2
- org.wso2.carbon.identity.oauth
-
-
- org.wso2.carbon.identity.framework
- org.wso2.carbon.identity.application.common
-
-
- org.wso2.carbon.identity.inbound.auth.oauth2
- org.wso2.carbon.identity.oauth.stub
-
-
- commons-codec.wso2
- commons-codec
-
-
-
-
-
-
- org.apache.felix
- maven-bundle-plugin
- true
-
-
- ${project.artifactId}
- ${project.artifactId}
- ${io.entgra.device.mgt.core.version}
- OAuth Authenticator Bundle
-
- org.wso2.carbon.identity.authenticator.backend.oauth.internal
-
-
- !org.wso2.carbon.identity.authenticator.backend.oauth.internal,
- org.wso2.carbon.identity.authenticator.backend.oauth.*
-
-
- org.wso2.carbon.identity.oauth2.*,
- javax.servlet.http,
- org.apache.axis2.client,
- org.apache.axis2.context,
- org.apache.axis2.transport.http,
- org.apache.commons.httpclient,
- org.apache.commons.logging,
- org.apache.commons.codec.binary;version="${commons-codec.wso2.osgi.version.range}",
- org.osgi.framework.*;version="${imp.package.version.osgi.framework}",
- org.osgi.service.*;version="${imp.package.version.osgi.service}",
- org.wso2.carbon.core.security,
- org.wso2.carbon.core.services.authentication,
- org.wso2.carbon.utils.multitenancy,
- org.wso2.carbon.base,
- org.wso2.carbon.utils
-
-
-
-
-
- org.jacoco
- jacoco-maven-plugin
-
- ${basedir}/target/coverage-reports/jacoco-unit.exec
-
-
-
- jacoco-initialize
-
- prepare-agent
-
-
-
- jacoco-site
- test
-
- report
-
-
- ${basedir}/target/coverage-reports/jacoco-unit.exec
- ${basedir}/target/coverage-reports/site
-
-
-
-
-
-
-
-
diff --git a/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/src/main/java/org/wso2/carbon/identity/authenticator/backend/oauth/AuthenticatorException.java b/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/src/main/java/org/wso2/carbon/identity/authenticator/backend/oauth/AuthenticatorException.java
deleted file mode 100755
index 38cf6b178a..0000000000
--- a/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/src/main/java/org/wso2/carbon/identity/authenticator/backend/oauth/AuthenticatorException.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
-* 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.
-*/
-package org.wso2.carbon.identity.authenticator.backend.oauth;
-
-/**
- * Custom exception for backend OAuth authentication
- */
-@SuppressWarnings("unused")
-public class AuthenticatorException extends Exception {
-
- private static final long serialVersionUID = 1L;
-
- public AuthenticatorException(String message) {
- super(message);
- }
-
- public AuthenticatorException(Throwable e) {
- super(e);
- }
-
- public AuthenticatorException(String message, Throwable e) {
- super(message, e);
- }
-}
diff --git a/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/src/main/java/org/wso2/carbon/identity/authenticator/backend/oauth/OauthAuthenticator.java b/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/src/main/java/org/wso2/carbon/identity/authenticator/backend/oauth/OauthAuthenticator.java
deleted file mode 100755
index b1d41dd9e6..0000000000
--- a/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/src/main/java/org/wso2/carbon/identity/authenticator/backend/oauth/OauthAuthenticator.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * 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.
- */
-package org.wso2.carbon.identity.authenticator.backend.oauth;
-
-import org.apache.axis2.context.MessageContext;
-import org.apache.axis2.transport.http.HTTPConstants;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.wso2.carbon.base.MultitenantConstants;
-import org.wso2.carbon.core.security.AuthenticatorsConfiguration;
-import org.wso2.carbon.core.services.authentication.CarbonServerAuthenticator;
-import org.wso2.carbon.identity.authenticator.backend.oauth.validator.OAuthValidationResponse;
-import org.wso2.carbon.utils.ServerConstants;
-import org.wso2.carbon.identity.authenticator.backend.oauth.validator.OAuth2TokenValidator;
-import org.wso2.carbon.identity.authenticator.backend.oauth.validator.OAuthValidatorFactory;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpSession;
-import java.rmi.RemoteException;
-
-/**
- * This is a custom back end authenticator for enable OAuth token authentication for admin services
- */
-public class OauthAuthenticator implements CarbonServerAuthenticator {
-
- private static final Log log = LogFactory.getLog(OauthAuthenticator.class);
- private static final int PRIORITY = 5;
- private static final int ACCESS_TOKEN_INDEX = 1;
- private OAuth2TokenValidator tokenValidator;
-
- public OauthAuthenticator() {
- try {
- tokenValidator = OAuthValidatorFactory.getValidator();
- } catch (IllegalArgumentException e) {
- log.error("Failed to initialise Authenticator", e);
- }
- }
-
- /**
- * Checks whether the authentication of the context can be handled using this authenticator.
- *
- * @param messageContext containing the request need to be authenticated.
- * @return boolean indicating whether the request can be authenticated by this Authenticator.
- */
- public boolean isHandle(MessageContext messageContext) {
- HttpServletRequest httpServletRequest = getHttpRequest(messageContext);
- if (httpServletRequest != null) {
- String headerValue = httpServletRequest.getHeader(HTTPConstants.HEADER_AUTHORIZATION);
- if (headerValue != null && !headerValue.trim().isEmpty()) {
- String[] headerPart = headerValue.trim().split(OauthAuthenticatorConstants.SPLITING_CHARACTOR);
- if (OauthAuthenticatorConstants.AUTHORIZATION_HEADER_PREFIX_BEARER.equals(headerPart[0])) {
- return true;
- }
- } else if (httpServletRequest.getParameter(OauthAuthenticatorConstants.BEARER_TOKEN_IDENTIFIER) != null) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Authenticates the user using the provided OAuth token and returns the status as a boolean.
- * Sets the tenant domain and tenant friendly username to the session as attributes.
- *
- * @param messageContext containing the request need to be authenticated.
- * @return boolean indicating the authentication status.
- */
- public boolean isAuthenticated(MessageContext messageContext) {
- HttpServletRequest httpServletRequest = getHttpRequest(messageContext);
- String headerValue = httpServletRequest.getHeader(HTTPConstants.HEADER_AUTHORIZATION);
- String[] headerPart = headerValue.trim().split(OauthAuthenticatorConstants.SPLITING_CHARACTOR);
- String accessToken = headerPart[ACCESS_TOKEN_INDEX];
- OAuthValidationResponse response = null;
- try {
- response = tokenValidator.validateToken(accessToken);
- } catch (RemoteException e) {
- log.error("Failed to validate the OAuth token provided.", e);
- }
- if (response != null && response.isValid()) {
- HttpSession session;
- if ((session = httpServletRequest.getSession(false)) != null) {
- session.setAttribute(MultitenantConstants.TENANT_DOMAIN, response.getTenantDomain());
- session.setAttribute(ServerConstants.USER_LOGGED_IN, response.getUserName());
- if (log.isDebugEnabled()) {
- log.debug("Authentication successful for " + session.getAttribute(ServerConstants.USER_LOGGED_IN));
- }
- }
- return true;
- }
- if (log.isDebugEnabled()) {
- log.debug("Authentication failed.Illegal attempt from session " + httpServletRequest.getSession().getId());
- }
- return false;
- }
-
- /**
- * this method is currently not implemented.
- *
- * @param messageContext containing the request need to be authenticated.
- * @return boolean
- */
- public boolean authenticateWithRememberMe(MessageContext messageContext) {
- throw new UnsupportedOperationException();
- }
-
- /**
- * @return string Authenticator name.
- */
- public String getAuthenticatorName() {
- return OauthAuthenticatorConstants.AUTHENTICATOR_NAME;
- }
-
- /**
- * @return int priority of the authenticator.
- */
- public int getPriority() {
- return PRIORITY;
- }
-
- /**
- * @return boolean true for enable or otherwise for disable status.
- */
- public boolean isDisabled() {
- AuthenticatorsConfiguration authenticatorsConfiguration = AuthenticatorsConfiguration.getInstance();
- AuthenticatorsConfiguration.AuthenticatorConfig authenticatorConfig = authenticatorsConfiguration.
- getAuthenticatorConfig(OauthAuthenticatorConstants.AUTHENTICATOR_NAME);
- return authenticatorConfig.isDisabled();
- }
-
- /**
- * Retrieve HTTP Servlet Request form thr Message Context.
- *
- * @param messageContext Containing the Servlet Request for backend authentication.
- * @return HTTPServletRequest.
- */
- private HttpServletRequest getHttpRequest(MessageContext messageContext) {
- return (HttpServletRequest) messageContext.getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST);
- }
-
-}
diff --git a/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/src/main/java/org/wso2/carbon/identity/authenticator/backend/oauth/OauthAuthenticatorConstants.java b/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/src/main/java/org/wso2/carbon/identity/authenticator/backend/oauth/OauthAuthenticatorConstants.java
deleted file mode 100755
index 66e96101a8..0000000000
--- a/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/src/main/java/org/wso2/carbon/identity/authenticator/backend/oauth/OauthAuthenticatorConstants.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
-* 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.
-*/
-package org.wso2.carbon.identity.authenticator.backend.oauth;
-
-public class OauthAuthenticatorConstants {
- public static final String AUTHORIZATION_HEADER_PREFIX_BEARER = "Bearer";
- public static final String AUTHORIZATION_HEADER_PREFIX_BASIC = "Basic";
- public static final String BEARER_TOKEN_TYPE = "bearer";
- public static final String BEARER_TOKEN_IDENTIFIER = "token";
- public static final String AUTHENTICATOR_NAME = "OAuthAuthenticator";
- public static final String SPLITING_CHARACTOR = " ";
- public static final String OAUTH_ENDPOINT_POSTFIX =
- "/services/OAuth2TokenValidationService.OAuth2TokenValidationServiceHttpsSoap12Endpoint/";
-}
diff --git a/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/src/main/java/org/wso2/carbon/identity/authenticator/backend/oauth/internal/OAuthAuthenticatorDataHolder.java b/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/src/main/java/org/wso2/carbon/identity/authenticator/backend/oauth/internal/OAuthAuthenticatorDataHolder.java
deleted file mode 100644
index 202568c4a5..0000000000
--- a/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/src/main/java/org/wso2/carbon/identity/authenticator/backend/oauth/internal/OAuthAuthenticatorDataHolder.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * 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.
- */
-
-package org.wso2.carbon.identity.authenticator.backend.oauth.internal;
-
-import org.wso2.carbon.identity.oauth2.OAuth2TokenValidationService;
-
-/**
- * DataHolder of Backend OAuth Authenticator component.
- */
-public class OAuthAuthenticatorDataHolder {
-
- private OAuth2TokenValidationService oAuth2TokenValidationService;
-
- private static OAuthAuthenticatorDataHolder thisInstance = new OAuthAuthenticatorDataHolder();
-
- private OAuthAuthenticatorDataHolder() {}
-
- public static OAuthAuthenticatorDataHolder getInstance() {
- return thisInstance;
- }
-
- public OAuth2TokenValidationService getOAuth2TokenValidationService() {
- if (oAuth2TokenValidationService == null) {
- throw new IllegalStateException("OAuth2TokenValidation service is not initialized properly");
- }
- return oAuth2TokenValidationService;
- }
-
- public void setOAuth2TokenValidationService(
- OAuth2TokenValidationService oAuth2TokenValidationService) {
- this.oAuth2TokenValidationService = oAuth2TokenValidationService;
- }
-}
\ No newline at end of file
diff --git a/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/src/main/java/org/wso2/carbon/identity/authenticator/backend/oauth/internal/OAuthAuthenticatorServiceComponent.java b/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/src/main/java/org/wso2/carbon/identity/authenticator/backend/oauth/internal/OAuthAuthenticatorServiceComponent.java
deleted file mode 100755
index 30de0c2522..0000000000
--- a/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/src/main/java/org/wso2/carbon/identity/authenticator/backend/oauth/internal/OAuthAuthenticatorServiceComponent.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
-* 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.
-*/
-
-package org.wso2.carbon.identity.authenticator.backend.oauth.internal;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.osgi.framework.BundleContext;
-import org.osgi.service.component.ComponentContext;
-import org.wso2.carbon.core.services.authentication.CarbonServerAuthenticator;
-import org.wso2.carbon.identity.authenticator.backend.oauth.OauthAuthenticator;
-import org.wso2.carbon.identity.oauth2.OAuth2TokenValidationService;
-import org.osgi.service.component.annotations.*;
-
-@Component(
- name = "org.wso2.carbon.identity.backend.oauth.authenticator",
- immediate = true)
-public class OAuthAuthenticatorServiceComponent {
-
- private static final Log log = LogFactory.getLog(OAuthAuthenticatorServiceComponent.class);
-
- @SuppressWarnings("unused")
- @Activate
- protected void activate(ComponentContext componentContext) {
- if (log.isDebugEnabled()) {
- log.debug("Starting Backend OAuthAuthenticator Framework Bundle");
- }
- }
-
- @SuppressWarnings("unused")
- @Deactivate
- protected void deactivate(ComponentContext componentContext) {
- //do nothing
- }
-
- /**
- * Sets OAuth2TokenValidation Service.
- *
- * @param tokenValidationService An instance of OAuth2TokenValidationService.
- */
- @SuppressWarnings("unused")
- @Reference(
- name = "identity.oauth2.validation.service",
- service = org.wso2.carbon.identity.oauth2.OAuth2TokenValidationService.class,
- cardinality = ReferenceCardinality.MANDATORY,
- policy = ReferencePolicy.DYNAMIC,
- bind = "setOAuth2ValidationService",
- unbind = "unsetOAuth2ValidationService")
- protected void setOAuth2ValidationService(OAuth2TokenValidationService tokenValidationService) {
- if (log.isDebugEnabled()) {
- log.debug("Setting OAuth2TokenValidationService Service");
- }
- OAuthAuthenticatorDataHolder.getInstance().setOAuth2TokenValidationService(tokenValidationService);
- }
-
- /**
- * Unsets OAuth2TokenValidation Service.
- *
- * @param tokenValidationService An instance of OAuth2TokenValidationService
- */
- @SuppressWarnings("unused")
- protected void unsetOAuth2ValidationService(OAuth2TokenValidationService tokenValidationService) {
- if (log.isDebugEnabled()) {
- log.debug("Unsetting OAuth2TokenValidationService Service");
- }
- OAuthAuthenticatorDataHolder.getInstance().setOAuth2TokenValidationService(null);
- }
-}
\ No newline at end of file
diff --git a/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/src/main/java/org/wso2/carbon/identity/authenticator/backend/oauth/validator/OAuth2TokenValidator.java b/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/src/main/java/org/wso2/carbon/identity/authenticator/backend/oauth/validator/OAuth2TokenValidator.java
deleted file mode 100755
index 1dbbd0fb68..0000000000
--- a/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/src/main/java/org/wso2/carbon/identity/authenticator/backend/oauth/validator/OAuth2TokenValidator.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
-* 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.
-*/
-package org.wso2.carbon.identity.authenticator.backend.oauth.validator;
-
-import java.rmi.RemoteException;
-
-/**
- * Declares the contract for OAuth2TokenValidator implementations.
- */
-public interface OAuth2TokenValidator {
-
- /**
- * This method gets a string accessToken and validates it and generate the OAuth2ClientApplicationDTO
- * containing the validity and user details if valid.
- *
- * @param accessToken which need to be validated.
- * @return OAuthValidationResponse with the validated results.
- */
- OAuthValidationResponse validateToken(String accessToken) throws RemoteException;
-}
diff --git a/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/src/main/java/org/wso2/carbon/identity/authenticator/backend/oauth/validator/OAuthValidationResponse.java b/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/src/main/java/org/wso2/carbon/identity/authenticator/backend/oauth/validator/OAuthValidationResponse.java
deleted file mode 100755
index 8804924a4c..0000000000
--- a/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/src/main/java/org/wso2/carbon/identity/authenticator/backend/oauth/validator/OAuthValidationResponse.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
-* 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.
-*/
-package org.wso2.carbon.identity.authenticator.backend.oauth.validator;
-
-/**
- * This class holds the authenticated user information after the OAuth2 token is validated.
- */
-@SuppressWarnings("unused")
-public class OAuthValidationResponse {
-
- private String userName;
- private String tenantDomain;
- private boolean isValid;
-
- public OAuthValidationResponse(String userName, String tenantDomain, boolean isValid) {
- this.userName = userName;
- this.tenantDomain = tenantDomain;
- this.isValid = isValid;
- }
-
- public String getUserName() {
- return userName;
- }
-
- public void setUserName(String userName) {
- this.userName = userName;
- }
-
- public String getTenantDomain() {
- return tenantDomain;
- }
-
- public void setTenantDomain(String tenantDomain) {
- this.tenantDomain = tenantDomain;
- }
-
- public boolean isValid() {
- return isValid;
- }
-
- public void setIsValid(boolean isValid) {
- this.isValid = isValid;
- }
-}
\ No newline at end of file
diff --git a/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/src/main/java/org/wso2/carbon/identity/authenticator/backend/oauth/validator/OAuthValidatorFactory.java b/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/src/main/java/org/wso2/carbon/identity/authenticator/backend/oauth/validator/OAuthValidatorFactory.java
deleted file mode 100755
index 8e0697e9db..0000000000
--- a/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/src/main/java/org/wso2/carbon/identity/authenticator/backend/oauth/validator/OAuthValidatorFactory.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
-* 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.
-*/
-package org.wso2.carbon.identity.authenticator.backend.oauth.validator;
-
-import org.wso2.carbon.core.security.AuthenticatorsConfiguration;
-import org.wso2.carbon.identity.authenticator.backend.oauth.OauthAuthenticatorConstants;
-import org.wso2.carbon.identity.authenticator.backend.oauth.validator.impl.ExternalOAuthValidator;
-import org.wso2.carbon.identity.authenticator.backend.oauth.validator.impl.LocalOAuthValidator;
-
-/**
- * The class validate the configurations and provide the most suitable implementation according to the configuration.
- * Factory class for OAuthValidator.
- */
-public class OAuthValidatorFactory {
-
- private static final String AUTHENTICATOR_CONFIG_IS_REMOTE = "isRemote";
- private static final String AUTHENTICATOR_CONFIG_HOST_URL = "hostURL";
- private static final String AUTHENTICATOR_CONFIG_ADMIN_USERNAME = "adminUsername";
- private static final String AUTHENTICATOR_CONFIG_ADMIN_PASSWORD = "adminPassword";
-
- /**
- * The method check the configuration and provide the appropriate implementation for OAuth2TokenValidator
- *
- * @return OAuth2TokenValidator
- */
- public static OAuth2TokenValidator getValidator() throws IllegalArgumentException {
- AuthenticatorsConfiguration authenticatorsConfiguration = AuthenticatorsConfiguration.getInstance();
- AuthenticatorsConfiguration.AuthenticatorConfig authenticatorConfig = authenticatorsConfiguration.
- getAuthenticatorConfig(OauthAuthenticatorConstants.AUTHENTICATOR_NAME);
- boolean isRemote;
- String hostUrl;
- String adminUserName;
- String adminPassword;
- if (authenticatorConfig != null && authenticatorConfig.getParameters() != null) {
- isRemote = Boolean.parseBoolean(authenticatorConfig.getParameters().get(
- AUTHENTICATOR_CONFIG_IS_REMOTE));
- hostUrl = authenticatorConfig.getParameters().get(AUTHENTICATOR_CONFIG_HOST_URL);
- adminUserName = authenticatorConfig.getParameters().get(AUTHENTICATOR_CONFIG_ADMIN_USERNAME);
- adminPassword = authenticatorConfig.getParameters().get(AUTHENTICATOR_CONFIG_ADMIN_PASSWORD);
- } else {
- throw new IllegalArgumentException("Configuration parameters need to be defined in Authenticators.xml");
- }
- if (isRemote) {
- if (!(hostUrl == null || hostUrl.trim().isEmpty())) {
- hostUrl = hostUrl + OauthAuthenticatorConstants.OAUTH_ENDPOINT_POSTFIX;
- return new ExternalOAuthValidator(hostUrl, adminUserName, adminPassword);
- } else {
- throw new IllegalArgumentException("Remote server name and ip both can't be empty");
- }
- }
- return new LocalOAuthValidator();
- }
-}
diff --git a/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/src/main/java/org/wso2/carbon/identity/authenticator/backend/oauth/validator/impl/ExternalOAuthValidator.java b/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/src/main/java/org/wso2/carbon/identity/authenticator/backend/oauth/validator/impl/ExternalOAuthValidator.java
deleted file mode 100755
index c3d246bb16..0000000000
--- a/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/src/main/java/org/wso2/carbon/identity/authenticator/backend/oauth/validator/impl/ExternalOAuthValidator.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
-* 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.
-*/
-package org.wso2.carbon.identity.authenticator.backend.oauth.validator.impl;
-
-import org.apache.axis2.client.Options;
-import org.apache.axis2.client.ServiceClient;
-import org.apache.axis2.transport.http.HTTPConstants;
-import org.apache.commons.codec.binary.Base64;
-import org.apache.commons.httpclient.Header;
-import org.wso2.carbon.identity.authenticator.backend.oauth.OauthAuthenticatorConstants;
-import org.wso2.carbon.identity.authenticator.backend.oauth.validator.OAuth2TokenValidator;
-import org.wso2.carbon.identity.authenticator.backend.oauth.validator.OAuthValidationResponse;
-import org.wso2.carbon.identity.oauth2.stub.OAuth2TokenValidationServiceStub;
-import org.wso2.carbon.identity.oauth2.stub.dto.OAuth2TokenValidationRequestDTO;
-import org.wso2.carbon.identity.oauth2.stub.dto.OAuth2TokenValidationRequestDTO_OAuth2AccessToken;
-import org.wso2.carbon.identity.oauth2.stub.dto.OAuth2TokenValidationResponseDTO;
-import org.wso2.carbon.utils.multitenancy.MultitenantUtils;
-
-import java.rmi.RemoteException;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Handles the Authentication form external IDP servers. Currently supports WSO2 IS only.
- */
-public class ExternalOAuthValidator implements OAuth2TokenValidator{
-
- private String hostURL;
- private String adminUserName;
- private String adminPassword;
-
- public ExternalOAuthValidator(String hostURL, String adminUserName, String adminPassword) {
- this.hostURL = hostURL;
- this.adminUserName = adminUserName;
- this.adminPassword = adminPassword;
- }
- /**
- * This method gets a string accessToken and validates it and generate the OAuth2ClientApplicationDTO
- * containing the validity and user details if valid.
- *
- * @param token which need to be validated.
- * @return OAuthValidationResponse with the validated results.
- */
- public OAuthValidationResponse validateToken(String token) throws RemoteException {
- OAuth2TokenValidationRequestDTO validationRequest = new OAuth2TokenValidationRequestDTO();
- OAuth2TokenValidationRequestDTO_OAuth2AccessToken accessToken =
- new OAuth2TokenValidationRequestDTO_OAuth2AccessToken();
- accessToken.setTokenType(OauthAuthenticatorConstants.BEARER_TOKEN_TYPE);
- accessToken.setIdentifier(token);
- validationRequest.setAccessToken(accessToken);
- OAuth2TokenValidationServiceStub tokenValidationService =
- new OAuth2TokenValidationServiceStub(hostURL);
- ServiceClient client = tokenValidationService._getServiceClient();
- Options options = client.getOptions();
- List headerList = new ArrayList<>();
- Header header = new Header();
- header.setName(HTTPConstants.HEADER_AUTHORIZATION);
- header.setValue(OauthAuthenticatorConstants.AUTHORIZATION_HEADER_PREFIX_BASIC + " " + getBasicAuthCredentials());
- headerList.add(header);
- options.setProperty(org.apache.axis2.transport.http.HTTPConstants.HTTP_HEADERS, headerList);
- client.setOptions(options);
- OAuth2TokenValidationResponseDTO tokenValidationResponse = tokenValidationService.
- findOAuthConsumerIfTokenIsValid(validationRequest).getAccessTokenValidationResponse();
- boolean isValid = tokenValidationResponse.getValid();
- String userName = null;
- String tenantDomain = null;
- if (isValid) {
- userName = MultitenantUtils.getTenantAwareUsername(
- tokenValidationResponse.getAuthorizedUser());
- tenantDomain = MultitenantUtils.
- getTenantDomain(tokenValidationResponse.getAuthorizedUser());
- }
- return new OAuthValidationResponse(userName,tenantDomain,isValid);
- }
-
- private String getBasicAuthCredentials() {
- byte[] bytesEncoded = Base64.encodeBase64((adminUserName + ":" + adminPassword).getBytes());
- return new String(bytesEncoded);
- }
-}
diff --git a/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/src/main/java/org/wso2/carbon/identity/authenticator/backend/oauth/validator/impl/LocalOAuthValidator.java b/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/src/main/java/org/wso2/carbon/identity/authenticator/backend/oauth/validator/impl/LocalOAuthValidator.java
deleted file mode 100755
index 4182917f30..0000000000
--- a/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/src/main/java/org/wso2/carbon/identity/authenticator/backend/oauth/validator/impl/LocalOAuthValidator.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
-* 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.
-*/
-package org.wso2.carbon.identity.authenticator.backend.oauth.validator.impl;
-
-import org.wso2.carbon.identity.authenticator.backend.oauth.OauthAuthenticatorConstants;
-import org.wso2.carbon.identity.authenticator.backend.oauth.internal.OAuthAuthenticatorDataHolder;
-import org.wso2.carbon.identity.authenticator.backend.oauth.validator.OAuth2TokenValidator;
-import org.wso2.carbon.identity.authenticator.backend.oauth.validator.OAuthValidationResponse;
-import org.wso2.carbon.identity.oauth2.OAuth2TokenValidationService;
-import org.wso2.carbon.identity.oauth2.dto.OAuth2TokenValidationRequestDTO;
-import org.wso2.carbon.identity.oauth2.dto.OAuth2TokenValidationResponseDTO;
-import org.wso2.carbon.utils.multitenancy.MultitenantUtils;
-
-/**
- * Handles the authentication using the inbuilt IS features.
- */
-public class LocalOAuthValidator implements OAuth2TokenValidator {
- /**
- * This method gets a string accessToken and validates it and generate the OAuth2ClientApplicationDTO
- * containing the validity and user details if valid.
- *
- * @param token which need to be validated.
- * @return OAuthValidationResponse with the validated results.
- */
- public OAuthValidationResponse validateToken(String token) {
- OAuth2TokenValidationRequestDTO validationRequest = new OAuth2TokenValidationRequestDTO();
- OAuth2TokenValidationRequestDTO.OAuth2AccessToken accessToken =
- validationRequest.new OAuth2AccessToken();
- accessToken.setTokenType(OauthAuthenticatorConstants.BEARER_TOKEN_TYPE);
- accessToken.setIdentifier(token);
- validationRequest.setAccessToken(accessToken);
- OAuth2TokenValidationResponseDTO tokenValidationResponse = OAuthAuthenticatorDataHolder.getInstance().
- getOAuth2TokenValidationService().findOAuthConsumerIfTokenIsValid(validationRequest).getAccessTokenValidationResponse();
- boolean isValid = tokenValidationResponse.isValid();
- String userName = null;
- String tenantDomain = null;
- if (isValid) {
- userName = MultitenantUtils.getTenantAwareUsername(
- tokenValidationResponse.getAuthorizedUser());
- tenantDomain =
- MultitenantUtils.getTenantDomain(tokenValidationResponse.getAuthorizedUser());
- }
- return new OAuthValidationResponse(userName, tenantDomain, isValid);
- }
-}
diff --git a/components/operation-template-mgt/io.entgra.device.mgt.core.operation.template/pom.xml b/components/operation-template-mgt/io.entgra.device.mgt.core.operation.template/pom.xml
index 9c115b8376..4df6c47019 100644
--- a/components/operation-template-mgt/io.entgra.device.mgt.core.operation.template/pom.xml
+++ b/components/operation-template-mgt/io.entgra.device.mgt.core.operation.template/pom.xml
@@ -54,7 +54,7 @@
IOT Operation Template Bundle
io.entgra.device.mgt.core.operation.template.internal
- com.google.common.cache;version="[31.0,32)",
+ com.google.common.cache;version="[32.1,33)";resolution:=optional,
com.google.gson;version="[2.9,3)",
io.entgra.device.mgt.core.device.mgt.common.exceptions;version="[5.0,6)",
io.entgra.device.mgt.core.device.mgt.core.service;version="[5.0,6)",
@@ -298,7 +298,7 @@
com.google.guava
guava
- ${guava.version}
+ ${google.guava.version}
provided
diff --git a/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/pom.xml b/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/pom.xml
deleted file mode 100644
index 2a0aec705c..0000000000
--- a/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/pom.xml
+++ /dev/null
@@ -1,107 +0,0 @@
-
-
-
-
-
-
- io.entgra.device.mgt.core
- policy-mgt
- 5.0.0-SNAPSHOT
- ../pom.xml
-
-
- 4.0.0
- io.entgra.device.mgt.core
- org.wso2.carbon.complex.policy.decision.point
- bundle
- WSO2 Carbon - Policy Decision Point
- WSO2 Carbon - Policy Decision Point
- https://entgra.io
-
-
-
-
- org.apache.felix
- maven-bundle-plugin
- true
-
-
- ${project.artifactId}
- ${project.artifactId}
- ${io.entgra.device.mgt.core.version}
- Complex Policy Decision Point Bundle
- org.wso2.carbon.complex.policy.decision.point.internal
-
- org.wso2.carbon.complex.policy.decision.point.*
-
-
-
-
-
- org.jacoco
- jacoco-maven-plugin
-
- ${basedir}/target/coverage-reports/jacoco-unit.exec
-
-
-
- jacoco-initialize
-
- prepare-agent
-
-
-
- jacoco-site
- test
-
- report
-
-
- ${basedir}/target/coverage-reports/jacoco-unit.exec
- ${basedir}/target/coverage-reports/site
-
-
-
-
-
-
-
-
-
- org.eclipse.osgi
- org.eclipse.osgi
-
-
- org.eclipse.equinox
- org.eclipse.equinox.common
-
-
- org.ops4j.pax.logging
- pax-logging-api
- provided
-
-
-
- io.entgra.device.mgt.core
- io.entgra.device.mgt.core.policy.mgt.common
-
-
-
-
-
diff --git a/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/src/main/java/org/wso2/carbon/policy/evaluator/FeatureFilter.java b/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/src/main/java/org/wso2/carbon/policy/evaluator/FeatureFilter.java
deleted file mode 100644
index 50fb7a54a4..0000000000
--- a/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/src/main/java/org/wso2/carbon/policy/evaluator/FeatureFilter.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
-* 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.
-*/
-
-
-package org.wso2.carbon.policy.evaluator;
-
-import io.entgra.device.mgt.core.device.mgt.common.policy.mgt.Policy;
-import io.entgra.device.mgt.core.device.mgt.common.policy.mgt.ProfileFeature;
-
-import java.util.List;
-
-public interface FeatureFilter {
-
- List evaluate(List policyList, List featureRulesList);
-
- List extractFeatures(List policyList);
-
- List evaluateFeatures(List featureList, List featureRulesList);
-
- void getDenyOverridesFeatures(String featureName, List featureList, List effectiveFeatureList);
-
- void getPermitOverridesFeatures(String featureName, List featureList, List effectiveFeatureList);
-
- void getFirstApplicableFeatures(String featureName, List featureList, List effectiveFeatureList);
-
- void getLastApplicableFeatures(String featureName, List featureList, List effectiveFeatureList);
-
- void getAllApplicableFeatures(String featureName, List featureList, List effectiveFeatureList);
-
- void getHighestApplicableFeatures(String featureName, List featureList, List effectiveFeatureList);
-
- void getLowestApplicableFeatures(String featureName, List featureList, List effectiveFeatureList);
-}
diff --git a/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/src/main/java/org/wso2/carbon/policy/evaluator/FeatureFilterImpl.java b/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/src/main/java/org/wso2/carbon/policy/evaluator/FeatureFilterImpl.java
deleted file mode 100644
index e6eb914312..0000000000
--- a/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/src/main/java/org/wso2/carbon/policy/evaluator/FeatureFilterImpl.java
+++ /dev/null
@@ -1,250 +0,0 @@
-/*
-* 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.
-*/
-
-package org.wso2.carbon.policy.evaluator;
-
-import org.wso2.carbon.policy.evaluator.utils.Constants;
-import io.entgra.device.mgt.core.device.mgt.common.policy.mgt.Policy;
-import io.entgra.device.mgt.core.device.mgt.common.policy.mgt.ProfileFeature;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * This class is responsible for evaluating the policy (Configurations sets) and returning
- * the effective features set.
- */
-
-public class FeatureFilterImpl implements FeatureFilter {
-
- /**
- * This method returns the effective feature list when policy list and feature aggregation rules are supplied.
- * @param policyList
- * @param featureRulesList
- * @return
- */
- @Override
- public List evaluate(List policyList, List featureRulesList) {
- return evaluateFeatures(extractFeatures(policyList), featureRulesList);
- }
-
- /**
- * This method extract the features from the given policy list in the order they are provided in the list.
- * @param policyList
- * @return
- */
- public List extractFeatures(List policyList) {
- List featureList = new ArrayList();
- for (Policy policy : policyList) {
- featureList.addAll(policy.getProfile().getProfileFeaturesList());
- }
- return featureList;
- }
-
- /**
- * This method is responsible for supplying tasks to other methods to evaluate given features.
- * @param featureList
- * @param featureRulesList
- * @return
- */
- public List evaluateFeatures(List featureList, List featureRulesList) {
- List effectiveFeatureList = new ArrayList();
- for (FeatureRules rule : featureRulesList) {
- String ruleName = rule.getEvaluationCriteria();
- String featureName = rule.getName();
- if (Constants.DENY_OVERRIDES.equalsIgnoreCase(ruleName)) {
- getDenyOverridesFeatures(featureName, featureList, effectiveFeatureList);
- }
- if (Constants.PERMIT_OVERRIDES.equalsIgnoreCase(ruleName)) {
- getPermitOverridesFeatures(featureName, featureList, effectiveFeatureList);
- }
- if (Constants.FIRST_APPLICABLE.equalsIgnoreCase(ruleName)) {
- getFirstApplicableFeatures(featureName, featureList, effectiveFeatureList);
- }
- if (Constants.LAST_APPLICABLE.equalsIgnoreCase(ruleName)) {
- getLastApplicableFeatures(featureName, featureList, effectiveFeatureList);
- }
- if (Constants.ALL_APPLICABLE.equalsIgnoreCase(ruleName)) {
- getAllApplicableFeatures(featureName, featureList, effectiveFeatureList);
- }
- if (Constants.HIGHEST_APPLICABLE.equalsIgnoreCase(ruleName)) {
- getHighestApplicableFeatures(featureName, featureList, effectiveFeatureList);
- }
- if (Constants.LOWEST_APPLICABLE.equalsIgnoreCase(ruleName)) {
- getLowestApplicableFeatures(featureName, featureList, effectiveFeatureList);
- }
- }
- return effectiveFeatureList;
- }
-
- /**
- * This method picks up denied features, if there is no denied features it will add to the list, the final permitted feature.
- * But if given policies do not have features of given type, it will not add anything.
- *
- * @param featureName
- * @param featureList
- * @param effectiveFeatureList
- */
- public void getDenyOverridesFeatures(String featureName, List featureList, List effectiveFeatureList) {
- ProfileFeature evaluatedFeature = null;
-// for (ProfileFeature feature : featureList) {
-// if (feature.getFeature().getName().equalsIgnoreCase(featureName)) {
-// if (feature.getFeature().getRuleValue().equalsIgnoreCase("Deny")) {
-// evaluatedFeature = feature;
-// effectiveFeatureList.add(evaluatedFeature);
-// return;
-// } else {
-// evaluatedFeature = feature;
-// }
-// }
-// }
- if (evaluatedFeature != null) {
- effectiveFeatureList.add(evaluatedFeature);
- }
-
- }
-
- /**
- * This method picks up permitted features, if there is no permitted features it will add to the list, the final denied feature.
- * But if given policies do not have features of given type, it will not add anything.
- *
- * @param featureName
- * @param featureList
- * @param effectiveFeatureList
- */
- public void getPermitOverridesFeatures(String featureName, List featureList, List effectiveFeatureList) {
- ProfileFeature evaluatedFeature = null;
-// for (ProfileFeature feature : featureList) {
-// if (feature.getFeature().getName().equalsIgnoreCase(featureName)) {
-// if (feature.getFeature().getRuleValue().equalsIgnoreCase("Permit")) {
-// evaluatedFeature = feature;
-// effectiveFeatureList.add(evaluatedFeature);
-// return;
-// } else {
-// evaluatedFeature = feature;
-// }
-// }
-// }
- if (evaluatedFeature != null) {
- effectiveFeatureList.add(evaluatedFeature);
- }
-
- }
-
- /**
- * This method picks the first features of the give type.
- * But if given policies do not have features of given type, it will not add anything.
- *
- * @param featureName
- * @param featureList
- * @param effectiveFeatureList
- */
- public void getFirstApplicableFeatures(String featureName, List featureList, List effectiveFeatureList) {
- for (ProfileFeature feature : featureList) {
-// if (feature.getFeature().getName().equalsIgnoreCase(featureName)) {
-// effectiveFeatureList.add(feature);
-// return;
-//
-// }
- }
- }
-
- /**
- * This method picks the last features of the give type.
- * But if given policies do not have features of given type, it will not add anything.
- *
- * @param featureName
- * @param featureList
- * @param effectiveFeatureList
- */
- public void getLastApplicableFeatures(String featureName, List featureList, List effectiveFeatureList) {
- ProfileFeature evaluatedFeature = null;
-// for (ProfileFeature feature : featureList) {
-// if (feature.getFeature().getName().equalsIgnoreCase(featureName)) {
-// evaluatedFeature = feature;
-// }
-// }
- if (evaluatedFeature != null) {
- effectiveFeatureList.add(evaluatedFeature);
- }
- }
-
- /**
- * This method picks the all features of the give type.
- * But if given policies do not have features of given type, it will not add anything.
- *
- * @param featureName
- * @param featureList
- * @param effectiveFeatureList
- */
- public void getAllApplicableFeatures(String featureName, List featureList, List effectiveFeatureList) {
- for (ProfileFeature feature : featureList) {
-// if (feature.getFeature().getName().equalsIgnoreCase(featureName)) {
-// effectiveFeatureList.add(feature);
-// }
- }
- }
-
- /**
- * This method picks the feature with the highest value of given type.
- * But if given policies do not have features of given type, it will not add anything.
- *
- * @param featureName
- * @param featureList
- * @param effectiveFeatureList
- */
- public void getHighestApplicableFeatures(String featureName, List featureList, List effectiveFeatureList) {
- ProfileFeature evaluatedFeature = null;
- int intValve = 0;
-// for (ProfileFeature feature : featureList) {
-// if (feature.getFeature().getName().equalsIgnoreCase(featureName)) {
-// if (Integer.parseInt(feature.getFeature().getRuleValue()) > intValve) {
-// intValve = Integer.parseInt(feature.getFeature().getRuleValue());
-// evaluatedFeature = feature;
-// }
-// }
-// }
- if (evaluatedFeature != null) {
- effectiveFeatureList.add(evaluatedFeature);
- }
- }
-
- /**
- * This method picks the feature with the lowest value of given type.
- * But if given policies do not have features of given type, it will not add anything.
- *
- * @param featureName
- * @param featureList
- * @param effectiveFeatureList
- */
- public void getLowestApplicableFeatures(String featureName, List featureList, List effectiveFeatureList) {
- ProfileFeature evaluatedFeature = null;
-// int intValve = 0;
-// for (ProfileFeature feature : featureList) {
-// if (feature.getFeature().getName().equalsIgnoreCase(featureName)) {
-// if (Integer.parseInt(feature.getFeature().getRuleValue()) < intValve) {
-// intValve = Integer.parseInt(feature.getFeature().getRuleValue());
-// evaluatedFeature = feature;
-// }
-// }
-// }
- if (evaluatedFeature != null) {
- effectiveFeatureList.add(evaluatedFeature);
- }
- }
-}
diff --git a/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/src/main/java/org/wso2/carbon/policy/evaluator/FeatureRules.java b/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/src/main/java/org/wso2/carbon/policy/evaluator/FeatureRules.java
deleted file mode 100644
index f706cf947f..0000000000
--- a/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/src/main/java/org/wso2/carbon/policy/evaluator/FeatureRules.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-* 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.
-*/
-
-package org.wso2.carbon.policy.evaluator;
-
-public class FeatureRules {
-
- private String name;
- private String evaluationCriteria;
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getEvaluationCriteria() {
- return evaluationCriteria;
- }
-
- public void setEvaluationCriteria(String evaluationCriteria) {
- this.evaluationCriteria = evaluationCriteria;
- }
-}
diff --git a/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/src/main/java/org/wso2/carbon/policy/evaluator/PDPException.java b/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/src/main/java/org/wso2/carbon/policy/evaluator/PDPException.java
deleted file mode 100644
index 571f9c6848..0000000000
--- a/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/src/main/java/org/wso2/carbon/policy/evaluator/PDPException.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2014, 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.policy.evaluator;
-
-public class PDPException extends Exception {
-
- private String pdpErrorMessage;
-
- public String getPdpErrorMessage() {
- return pdpErrorMessage;
- }
-
- public void setPdpErrorMessage(String pdpErrorMessage) {
- this.pdpErrorMessage = pdpErrorMessage;
- }
-
- public PDPException(String message) {
- setPdpErrorMessage(message);
- }
-
- public PDPException(String message, Exception ex) {
- super(message, ex);
- setPdpErrorMessage(message);
- }
-
- public PDPException(String message, Throwable cause) {
- super(message, cause);
- setPdpErrorMessage(message);
- }
-
- public PDPException(Throwable cause) {
- super(cause);
- }
-
- public PDPException(){
- super();
- }
-}
diff --git a/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/src/main/java/org/wso2/carbon/policy/evaluator/PDPServiceImpl.java b/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/src/main/java/org/wso2/carbon/policy/evaluator/PDPServiceImpl.java
deleted file mode 100644
index 82421c9f03..0000000000
--- a/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/src/main/java/org/wso2/carbon/policy/evaluator/PDPServiceImpl.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * 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.
- */
-
-package org.wso2.carbon.policy.evaluator;
-
-import org.wso2.carbon.policy.evaluator.spi.PDPService;
-import io.entgra.device.mgt.core.policy.mgt.common.Feature;
-import io.entgra.device.mgt.core.device.mgt.common.policy.mgt.Policy;
-
-import java.util.List;
-
-public class PDPServiceImpl implements PDPService {
- @Override
- public List getEffectivePolicyList(List policies, List roles, String deviceType) {
- return null;
- }
-
- @Override
- public List getEffectiveFeatureList(List policies, List featureRulesList) {
- return null;
- }
-}
diff --git a/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/src/main/java/org/wso2/carbon/policy/evaluator/PolicyFilter.java b/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/src/main/java/org/wso2/carbon/policy/evaluator/PolicyFilter.java
deleted file mode 100644
index 84b6cac51e..0000000000
--- a/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/src/main/java/org/wso2/carbon/policy/evaluator/PolicyFilter.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
-* 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.
-*/
-
-
-package org.wso2.carbon.policy.evaluator;
-
-import io.entgra.device.mgt.core.device.mgt.common.policy.mgt.Policy;
-
-import java.util.List;
-
-public interface PolicyFilter {
-
- /**
- * This method will extract the policies related a given roles list from the policy list available.
- * @param policyList
- * @param roles
- * @return
- */
- public List extractPoliciesRelatedToRoles(List policyList, List roles);
-
- /**
- * This mehtod extract the policies related to a given device type from policy list.
- * @param policyList
- * @param deviceType
- * @return
- */
- public List extractPoliciesRelatedToDeviceType(List policyList, String deviceType);
-}
diff --git a/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/src/main/java/org/wso2/carbon/policy/evaluator/PolicyFilterImpl.java b/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/src/main/java/org/wso2/carbon/policy/evaluator/PolicyFilterImpl.java
deleted file mode 100644
index 37818b7461..0000000000
--- a/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/src/main/java/org/wso2/carbon/policy/evaluator/PolicyFilterImpl.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (c) 2014, 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.policy.evaluator;
-
-import io.entgra.device.mgt.core.device.mgt.common.policy.mgt.Policy;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class PolicyFilterImpl implements PolicyFilter {
-
-
- /**
- * This method will extract the policies related a given roles list from the policy list available.
- *
- * @param policyList
- * @param roles
- * @return
- */
- @Override
- public List extractPoliciesRelatedToRoles(List policyList, List roles) {
-
- List policies = new ArrayList<>();
-
- for (Policy policy : policyList) {
- List roleList = policy.getRoles();
-
- for (String role : roleList) {
- if (roles.contains(role)) {
- policies.add(policy);
- break;
- }
- }
- }
- return policies;
- }
-
- /**
- * This mehtod extract the policies related to a given device type from policy list.
- *
- * @param policyList
- * @param deviceType
- * @return
- */
- @Override
- public List extractPoliciesRelatedToDeviceType(List policyList, String deviceType) {
- List policies = new ArrayList<>();
-
- for (Policy policy : policyList) {
- if (policy.getProfile().getDeviceType().equalsIgnoreCase(deviceType)) {
- policies.add(policy);
- }
- }
- return policies;
- }
-}
diff --git a/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/src/main/java/org/wso2/carbon/policy/evaluator/spi/PDPService.java b/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/src/main/java/org/wso2/carbon/policy/evaluator/spi/PDPService.java
deleted file mode 100644
index ea43abb397..0000000000
--- a/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/src/main/java/org/wso2/carbon/policy/evaluator/spi/PDPService.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
-* Copyright (c) 2014, 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.policy.evaluator.spi;
-
-
-import org.wso2.carbon.policy.evaluator.FeatureRules;
-import io.entgra.device.mgt.core.policy.mgt.common.Feature;
-import io.entgra.device.mgt.core.device.mgt.common.policy.mgt.Policy;
-
-import java.util.List;
-
-public interface PDPService {
-
- List getEffectivePolicyList(List policies, List roles, String deviceType);
-
- List getEffectiveFeatureList(List policies, List featureRulesList);
-
-}
diff --git a/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/src/main/java/org/wso2/carbon/policy/evaluator/utils/Constants.java b/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/src/main/java/org/wso2/carbon/policy/evaluator/utils/Constants.java
deleted file mode 100644
index 790fa7f246..0000000000
--- a/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/src/main/java/org/wso2/carbon/policy/evaluator/utils/Constants.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
-* 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.
-*/
-
-package org.wso2.carbon.policy.evaluator.utils;
-
-public class Constants {
-
- public static final String DENY_OVERRIDES = "deny_overrides";
- public static final String PERMIT_OVERRIDES = "permit_overrides";
- public static final String FIRST_APPLICABLE = "first_applicable";
- public static final String LAST_APPLICABLE = "last_applicable";
- public static final String ALL_APPLICABLE = "all_applicable";
- public static final String HIGHEST_APPLICABLE = "highest_applicable";
- public static final String LOWEST_APPLICABLE = "lowest_applicable";
-}
diff --git a/components/subtype-mgt/io.entgra.device.mgt.core.subtype.mgt/pom.xml b/components/subtype-mgt/io.entgra.device.mgt.core.subtype.mgt/pom.xml
index 1c2e2c8aec..fcf802e885 100644
--- a/components/subtype-mgt/io.entgra.device.mgt.core.subtype.mgt/pom.xml
+++ b/components/subtype-mgt/io.entgra.device.mgt.core.subtype.mgt/pom.xml
@@ -54,7 +54,7 @@
io.entgra.device.mgt.core.subtype.mgt.internal
com.fasterxml.jackson.core;version="[2.14,3)",
- com.google.common.cache;version="[31.0,32)",
+ com.google.common.cache;version="[32.1,33)";resolution:=optional,
io.entgra.device.mgt.core.device.mgt.common.exceptions;version="[5.0,6)",
io.entgra.device.mgt.core.device.mgt.core.config;version="[5.0,6)",
io.entgra.device.mgt.core.device.mgt.core.config.datasource;version="[5.0,6)",
diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.handler.server.feature/pom.xml b/features/apimgt-extensions/org.wso2.carbon.apimgt.handler.server.feature/pom.xml
deleted file mode 100644
index d8f8e0e32f..0000000000
--- a/features/apimgt-extensions/org.wso2.carbon.apimgt.handler.server.feature/pom.xml
+++ /dev/null
@@ -1,104 +0,0 @@
-
-
-
-
-
-
- io.entgra.device.mgt.core
- apimgt-extensions-feature
- 5.0.0-SNAPSHOT
- ../pom.xml
-
-
- 4.0.0
- org.wso2.carbon.apimgt.handler.server.feature
- pom
- WSO2 Carbon - Device Management - APIM handler Server Feature
- https://entgra.io
- This feature contains the handler for the api authentications
-
-
-
-
- io.entgra.device.mgt.core
- org.wso2.carbon.apimgt.handlers
-
-
-
-
-
-
- maven-resources-plugin
-
-
- copy-resources
- generate-resources
-
- copy-resources
-
-
- src/main/resources
-
-
- resources
-
- build.properties
- p2.inf
-
-
-
-
-
-
-
-
- org.wso2.maven
- carbon-p2-plugin
- ${carbon.p2.plugin.version}
-
-
- p2-feature-generation
- package
-
- p2-feature-gen
-
-
- org.wso2.carbon.apimgt.handler.server
- ../../../features/etc/feature.properties
-
-
- org.wso2.carbon.p2.category.type:server
- org.eclipse.equinox.p2.type.group:false
-
-
-
-
- io.entgra.device.mgt.core:org.wso2.carbon.apimgt.handlers:${io.entgra.device.mgt.core.version}
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.handler.server.feature/src/main/resources/build.properties b/features/apimgt-extensions/org.wso2.carbon.apimgt.handler.server.feature/src/main/resources/build.properties
deleted file mode 100644
index 89aee3ff76..0000000000
--- a/features/apimgt-extensions/org.wso2.carbon.apimgt.handler.server.feature/src/main/resources/build.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Copyright (c) 2018 - 2023, 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.
-#
-
-custom = true
diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.handler.server.feature/src/main/resources/conf/iot-api-config.xml b/features/apimgt-extensions/org.wso2.carbon.apimgt.handler.server.feature/src/main/resources/conf/iot-api-config.xml
deleted file mode 100644
index 7b1462746b..0000000000
--- a/features/apimgt-extensions/org.wso2.carbon.apimgt.handler.server.feature/src/main/resources/conf/iot-api-config.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
-
-
- https://${iot.core.host}:${iot.core.https.port}/
-
-
- https://${iot.core.host}:${iot.core.https.port}/api/certificate-mgt/v1.0/admin/certificates/verify/
-
-
- admin
- admin
-
-
- https://${iot.keymanager.host}:${iot.keymanager.https.port}/client-registration/v0.12/register
-
-
- https://${iot.keymanager.host}:${iot.keymanager.https.port}/oauth2/token
-
-
- /services
-
-
\ No newline at end of file
diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.handler.server.feature/src/main/resources/p2.inf b/features/apimgt-extensions/org.wso2.carbon.apimgt.handler.server.feature/src/main/resources/p2.inf
deleted file mode 100644
index e7c6acf89f..0000000000
--- a/features/apimgt-extensions/org.wso2.carbon.apimgt.handler.server.feature/src/main/resources/p2.inf
+++ /dev/null
@@ -1,2 +0,0 @@
-instructions.configure = \
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.apimgt.handler.server_${feature.version}/conf/iot-api-config.xml,target:${installFolder}/../../conf/iot-api-config.xml,overwrite:true);\
diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.integration.client.feature/pom.xml b/features/apimgt-extensions/org.wso2.carbon.apimgt.integration.client.feature/pom.xml
deleted file mode 100644
index 37c5189f98..0000000000
--- a/features/apimgt-extensions/org.wso2.carbon.apimgt.integration.client.feature/pom.xml
+++ /dev/null
@@ -1,118 +0,0 @@
-
-
-
-
-
- io.entgra.device.mgt.core
- apimgt-extensions-feature
- 5.0.0-SNAPSHOT
- ../pom.xml
-
-
- 4.0.0
- org.wso2.carbon.apimgt.integration.client.feature
- pom
- WSO2 Carbon - APIM Integration Client Feature
- https://entgra.io
- This feature contains a http client implementation to communicate with WSO2-APIM server
-
-
-
- io.entgra.device.mgt.core
- org.wso2.carbon.apimgt.integration.client
-
-
- io.entgra.device.mgt.core
- org.wso2.carbon.apimgt.integration.generated.client
-
-
-
-
-
-
- maven-resources-plugin
-
-
- copy-resources
- generate-resources
-
- copy-resources
-
-
- src/main/resources
-
-
- resources
-
- build.properties
- p2.inf
-
-
-
-
-
-
-
-
- org.wso2.maven
- carbon-p2-plugin
- ${carbon.p2.plugin.version}
-
-
- p2-feature-generation
- package
-
- p2-feature-gen
-
-
- org.wso2.carbon.apimgt.integration.client
- ../../../features/etc/feature.properties
-
-
- org.wso2.carbon.p2.category.type:server
- org.eclipse.equinox.p2.type.group:false
-
-
-
-
- io.github.openfeign:feign-jackson:${io.github.openfeign.version}
-
-
- io.github.openfeign:feign-core:${io.github.openfeign.version}
-
-
- io.github.openfeign:feign-gson:${io.github.openfeign.version}
-
-
- io.github.openfeign:feign-slf4j:${io.github.openfeign.version}
-
-
- io.entgra.device.mgt.core:org.wso2.carbon.apimgt.integration.client:${project.version}
-
-
- io.entgra.device.mgt.core:org.wso2.carbon.apimgt.integration.generated.client:${project.version}
-
-
-
-
-
-
-
-
-
diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.integration.client.feature/src/main/resources/build.properties b/features/apimgt-extensions/org.wso2.carbon.apimgt.integration.client.feature/src/main/resources/build.properties
deleted file mode 100644
index 89aee3ff76..0000000000
--- a/features/apimgt-extensions/org.wso2.carbon.apimgt.integration.client.feature/src/main/resources/build.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Copyright (c) 2018 - 2023, 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.
-#
-
-custom = true
diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.integration.client.feature/src/main/resources/conf/apim-integration.xml b/features/apimgt-extensions/org.wso2.carbon.apimgt.integration.client.feature/src/main/resources/conf/apim-integration.xml
deleted file mode 100644
index ec89b619c1..0000000000
--- a/features/apimgt-extensions/org.wso2.carbon.apimgt.integration.client.feature/src/main/resources/conf/apim-integration.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
- https://${iot.keymanager.host}:${iot.keymanager.https.port}/client-registration/v0.12/register
- https://${iot.gateway.host}:${iot.gateway.https.port}/token
- https://${iot.apimpublisher.host}:${iot.apimpublisher.https.port}/api/am/publisher/v0.12
- https://${iot.apimstore.host}:${iot.apimstore.https.port}/api/am/store/v0.12
- admin
- admin
-
\ No newline at end of file
diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.integration.client.feature/src/main/resources/p2.inf b/features/apimgt-extensions/org.wso2.carbon.apimgt.integration.client.feature/src/main/resources/p2.inf
deleted file mode 100644
index 3dca52fc59..0000000000
--- a/features/apimgt-extensions/org.wso2.carbon.apimgt.integration.client.feature/src/main/resources/p2.inf
+++ /dev/null
@@ -1,2 +0,0 @@
-instructions.configure = \
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.apimgt.integration.client_${feature.version}/conf/apim-integration.xml,target:${installFolder}/../../conf/apim-integration.xml,overwrite:true);\
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.analytics.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.analytics.feature/pom.xml
deleted file mode 100644
index cbb89240a5..0000000000
--- a/features/device-mgt/org.wso2.carbon.device.mgt.analytics.feature/pom.xml
+++ /dev/null
@@ -1,144 +0,0 @@
-
-
-
-
-
-
- io.entgra.device.mgt.core
- device-mgt-feature
- 5.0.0-SNAPSHOT
- ../pom.xml
-
-
- 4.0.0
- org.wso2.carbon.device.mgt.analytics.feature
- pom
- WSO2 Carbon - Device Management Server Feature
- https://entgra.io
- This feature contains bundles related to device analytics data publisher and ws proxy
-
-
-
- io.entgra.device.mgt.core
- org.wso2.carbon.device.mgt.analytics.data.publisher
-
-
- org.wso2.carbon.registry
- org.wso2.carbon.registry.indexing
-
-
- org.wso2.carbon.registry
- org.wso2.carbon.registry.common
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-dependency-plugin
-
-
- copy
- package
-
- copy
-
-
-
-
- io.entgra.device.mgt.core
- org.wso2.carbon.device.mgt.analytics.wsproxy
- ${project.version}
- war
- true
-
- ${project.build.directory}/maven-shared-archive-resources/webapps
-
- secured-websocket-proxy.war
-
-
-
-
-
-
-
- maven-resources-plugin
-
-
- copy-resources
- generate-resources
-
- copy-resources
-
-
- src/main/resources
-
-
- resources
-
- build.properties
- p2.inf
-
-
-
-
-
-
-
-
- org.wso2.maven
- carbon-p2-plugin
- ${carbon.p2.plugin.version}
-
-
- p2-feature-generation
- package
-
- p2-feature-gen
-
-
- org.wso2.carbon.device.mgt.analytics
- ../../../features/etc/feature.properties
-
-
- org.wso2.carbon.p2.category.type:server
- org.eclipse.equinox.p2.type.group:false
-
-
-
-
- io.entgra.device.mgt.core:org.wso2.carbon.device.mgt.analytics.data.publisher:${io.entgra.device.mgt.core.version}
-
-
-
- org.wso2.carbon.core.server:${carbon.kernel.version}
-
-
- org.wso2.carbon.registry:org.wso2.carbon.registry.indexing:${carbon.registry.version}
- org.wso2.carbon.registry:org.wso2.carbon.registry.common:${carbon.registry.version}
-
-
-
-
-
-
-
-
-
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.analytics.feature/src/main/resources/build.properties b/features/device-mgt/org.wso2.carbon.device.mgt.analytics.feature/src/main/resources/build.properties
deleted file mode 100644
index 89aee3ff76..0000000000
--- a/features/device-mgt/org.wso2.carbon.device.mgt.analytics.feature/src/main/resources/build.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Copyright (c) 2018 - 2023, 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.
-#
-
-custom = true
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.analytics.feature/src/main/resources/conf/device-analytics-config.xml b/features/device-mgt/org.wso2.carbon.device.mgt.analytics.feature/src/main/resources/conf/device-analytics-config.xml
deleted file mode 100644
index 8a39b21a21..0000000000
--- a/features/device-mgt/org.wso2.carbon.device.mgt.analytics.feature/src/main/resources/conf/device-analytics-config.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-
-
-
-
- true
-
- tcp://${iot.analytics.host}:${iot.analytics.thrift.port}
-
- wss://${iot.analytics.host}:${iot.analytics.https.port}
- admin
- admin
-
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.analytics.feature/src/main/resources/p2.inf b/features/device-mgt/org.wso2.carbon.device.mgt.analytics.feature/src/main/resources/p2.inf
deleted file mode 100644
index a0a1b3d005..0000000000
--- a/features/device-mgt/org.wso2.carbon.device.mgt.analytics.feature/src/main/resources/p2.inf
+++ /dev/null
@@ -1,4 +0,0 @@
-instructions.configure = \
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.analytics_${feature.version}/conf/device-analytics-config.xml,target:${installFolder}/../../conf/etc/device-analytics-config.xml,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/webapps/);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.analytics_${feature.version}/webapps/secured-websocket-proxy.war,target:${installFolder}/../../deployment/server/webapps/secured-websocket-proxy.war,overwrite:true);\
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index dcbac2b442..c81630de6c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2117,7 +2117,6 @@
20220924
2.4.5
- 27.0.1-jre
1.70.0.wso2v1
@@ -2130,7 +2129,7 @@
3.0.0.wso2v1
1.3
2.9.1
- 31.0.1-jre
+ 32.1.3-jre
4.12.0
3.6.0
11.0
@@ -2178,7 +2177,6 @@
2.1.1
1.6.9
- 1.6.9
4.0.1
@@ -2205,7 +2203,7 @@
1.7
- 2.1.7-wso2v227
+ 4.0.0.wso2v20_25
1.5.11-wso2v18