updated to kernel 4.6.2

master
Amalka Subasinghe 4 years ago
parent 2915651272
commit a12be72a13

@ -73,11 +73,6 @@
<artifactId>org.wso2.carbon.identity.jwt.client.extension</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.device.mgt.core</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
@ -109,28 +104,28 @@
<Import-Packages>
org.apache.commons.lang;version="[2.6,3)",
org.apache.commons.logging;version="[1.2,2)",
org.json.simple,org.osgi.framework;version="${imp.package.version.osgi.framework}",
org.osgi.service.component;version="${imp.package.version.osgi.service}",
org.wso2.carbon.apimgt.api;version="[9.0,10)",
org.wso2.carbon.apimgt.api.dto;version="[9.0,10)",
org.wso2.carbon.apimgt.api.model;version="[9.0,10)",
org.json.simple,
org.osgi.framework.*;version="${imp.package.version.osgi.framework}",
org.osgi.service.*;version="${imp.package.version.osgi.service}",
org.wso2.carbon.apimgt.api;version="${carbon.api.mgt.version.range}",
org.wso2.carbon.apimgt.api.dto;version="${carbon.api.mgt.version.range}",
org.wso2.carbon.apimgt.api.model;version="${carbon.api.mgt.version.range}",
org.wso2.carbon.apimgt.application.extension.bean,
org.wso2.carbon.apimgt.application.extension.dto,
org.wso2.carbon.apimgt.application.extension.exception,
org.wso2.carbon.apimgt.impl;version="[9.0,10)",
org.wso2.carbon.apimgt.impl.utils;version="[9.0,10)",
org.wso2.carbon.context;version="[4.6,5)",
org.wso2.carbon.device.mgt.core.config.ui;version="[4.1,5)",
org.wso2.carbon.apimgt.impl;version="${carbon.api.mgt.version.range}",
org.wso2.carbon.apimgt.impl.utils;version="${carbon.api.mgt.version.range}",
org.wso2.carbon.context;version="${carbon.kernel.version.range}",
org.wso2.carbon.identity.jwt.client.extension,
org.wso2.carbon.identity.jwt.client.extension.dto,
org.wso2.carbon.identity.jwt.client.extension.exception,
org.wso2.carbon.identity.jwt.client.extension.service,
org.wso2.carbon.registry.core.exceptions;version="[1.0,2)",
org.wso2.carbon.registry.core.service;version="[1.0,2)",
org.wso2.carbon.registry.indexing.service;version="[4.7,5)",
org.wso2.carbon.registry.indexing.service;version="${carbon.registry.imp.pkg.version.range}",
org.wso2.carbon.user.api;version="[1.0,2)",
org.wso2.carbon.user.core.service;version="[4.6,5)",
org.wso2.carbon.user.core.tenant;version="[4.6,5)"
org.wso2.carbon.user.core.service;version="${carbon.kernel.version.range}",
org.wso2.carbon.user.core.tenant;version="${carbon.kernel.version.range}"
</Import-Packages>
<Export-Package>
!org.wso2.carbon.apimgt.application.extension.internal,

@ -50,27 +50,6 @@ public interface APIManagementProviderService {
String keyType, String username, boolean isAllowedAllDomains,
String validityTime) throws APIManagerException;
/**
* Generate and retreive application keys. if the application does exist then
* create it and subscribe to apis that are grouped with the tags.
*
* @param apiApplicationName name of the application.
* @param tags tags of the apis that application needs to be subscribed.
* @param keyType of the application.
* @param username to whom the application is created
* @param isAllowedAllDomains application is allowed to all the tenants
* @param validityTime validity period of the application
* @param scopes scopes
* @return consumerkey and secrete of the created application.
* @throws APIManagerException
*/
ApiApplicationKey generateAndRetrieveApplicationKeys(String apiApplicationName,
String tags[],
String keyType,
String username,
boolean isAllowedAllDomains,
String validityTime, String scopes) throws APIManagerException;
/**
* Remove APIM Application.
*/

@ -42,8 +42,6 @@ import org.wso2.carbon.apimgt.impl.APIConstants;
import org.wso2.carbon.apimgt.impl.APIManagerFactory;
import org.wso2.carbon.apimgt.impl.utils.APIUtil;
import org.wso2.carbon.context.PrivilegedCarbonContext;
import org.wso2.carbon.device.mgt.core.config.ui.UIConfiguration;
import org.wso2.carbon.device.mgt.core.config.ui.UIConfigurationManager;
import org.wso2.carbon.identity.jwt.client.extension.JWTClient;
import org.wso2.carbon.identity.jwt.client.extension.dto.AccessTokenInfo;
import org.wso2.carbon.identity.jwt.client.extension.exception.JWTClientException;
@ -101,7 +99,7 @@ public class APIManagementProviderServiceImpl implements APIManagementProviderSe
*/
@Override
public synchronized ApiApplicationKey generateAndRetrieveApplicationKeys(String applicationName, String tags[],
String keyType, String username, boolean isAllowedAllDomains, String validityTime, String scopes)
String keyType, String username, boolean isAllowedAllDomains, String validityTime)
throws APIManagerException {
String tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain();
@ -125,14 +123,14 @@ public class APIManagementProviderServiceImpl implements APIManagementProviderSe
application = new Application(applicationName, subscriber);
application.setTier(ApiApplicationConstants.DEFAULT_TIER);
application.setGroupId("");
applicationId = apiConsumer.addApplication(application, username);
apiConsumer.addApplication(application, username);
application = apiConsumer.getApplicationsByName(username, applicationName, "");
} else {
applicationId = application.getId();
subscriber = apiConsumer.getSubscriber(username);
}
Set<SubscribedAPI> subscribedAPIs =
apiConsumer.getSubscribedAPIsByApplicationId(subscriber, applicationId, "");
apiConsumer.getSubscribedAPIs(subscriber, applicationName, "");
log.info("Already subscribed API count: " + subscribedAPIs.size());
@ -160,9 +158,11 @@ public class APIManagementProviderServiceImpl implements APIManagementProviderSe
}
}
if (!subscriptionExist && !tempApiIds.contains(id)) {
ApiTypeWrapper apiTypeWrapper = new ApiTypeWrapper(apiInfo);
ApiTypeWrapper apiTypeWrapper = apiConsumer.getAPIorAPIProductByUUID(
apiInfo.getUuid(), tenantDomain);
apiTypeWrapper.setTier(ApiApplicationConstants.DEFAULT_TIER);
apiConsumer.addSubscription(apiTypeWrapper, username, applicationId, "");
apiConsumer.addSubscription(apiTypeWrapper, username, application);
tempApiIds.add(id);
}
}
@ -210,31 +210,9 @@ public class APIManagementProviderServiceImpl implements APIManagementProviderSe
"\\\"id_token_expiry_time\\\":\\\"N\\/A\\\"}\"," +
"\"username\":\"" + username + "\"}";
// if scopes not defined
if (StringUtils.isEmpty(scopes)) {
UIConfigurationManager uiConfigurationManager = UIConfigurationManager.getInstance();
UIConfiguration uiConfiguration = uiConfigurationManager.getUIConfig();
List<String> scopeList = uiConfiguration.getScopes();
if (scopeList != null && scopeList.size() > 0) {
StringBuilder builder = new StringBuilder();
for (String scope : scopeList) {
String tmpScope = scope + " ";
builder.append(tmpScope);
}
scopes = builder.toString();
}
if (StringUtils.isEmpty(scopes)) {
scopes = scopes.trim();
} else {
scopes = "default";
}
}
Map<String, Object> keyDetails = apiConsumer
.requestApprovalForApplicationRegistration(username, applicationName, keyType, "",
allowedDomains.toArray(new String[allowedDomains.size()]), validityTime, scopes, "",
allowedDomains.toArray(new String[allowedDomains.size()]), validityTime, "default", "",
jsonString, keyManagerId, tenantDomain);
if (keyDetails != null) {
@ -252,19 +230,6 @@ public class APIManagementProviderServiceImpl implements APIManagementProviderSe
}
}
/**
* {@inheritDoc}
*/
@Override
public synchronized ApiApplicationKey generateAndRetrieveApplicationKeys(String applicationName, String tags[],
String keyType, String username,
boolean isAllowedAllDomains,
String validityTime)
throws APIManagerException {
return this.generateAndRetrieveApplicationKeys(applicationName, tags, keyType, username,
isAllowedAllDomains, validityTime, null);
}
@Override
public AccessTokenInfo getAccessToken(String scopes, String[] tags, String applicationName, String tokenType,
String validityPeriod) throws APIManagerException {

@ -50,7 +50,7 @@ import java.util.Set;
*/
public class APIPublisherServiceImpl implements APIPublisherService {
private static final String UNLIMITED_TIER = "Unlimited";
private static final String API_PUBLISH_ENVIRONMENT = "Production and Sandbox";
private static final String API_PUBLISH_ENVIRONMENT = "Default";
private static final String CREATED_STATUS = "CREATED";
private static final String PUBLISH_ACTION = "Publish";
public static final APIManagerFactory API_MANAGER_FACTORY = APIManagerFactory.getInstance();
@ -179,7 +179,7 @@ public class APIPublisherServiceImpl implements APIPublisherService {
accessControlAllowHeaders.add("Content-Type");
accessControlAllowHeaders.add("SOAPAction");
accessControlAllowHeaders.add("apikey");
accessControlAllowHeaders.add("testKey");
accessControlAllowHeaders.add("Internal-Key");
List<String> accessControlAllowMethods = new ArrayList<>();
accessControlAllowMethods.add("GET");
accessControlAllowMethods.add("PUT");

@ -140,7 +140,7 @@
org.wso2.carbon.context,
org.wso2.carbon.device.mgt.common.operation.mgt,
org.wso2.carbon.device.mgt.common.push.notification,
org.wso2.carbon.device.mgt.core.service,
org.wso2.carbon.device.mgt.core.*,
org.wso2.carbon.event.output.adapter.core,
org.wso2.carbon.event.output.adapter.core.exception,
org.wso2.carbon.core,

@ -119,9 +119,7 @@
org.wso2.carbon.device.mgt.core.*
</Export-Package>
<Embed-Dependency>
javax.ws.rs-api,
scribe;scope=compile|runtime;inline=false,
javassist;inline=false
</Embed-Dependency>
<DynamicImport-Package>*</DynamicImport-Package>
</instructions>

@ -102,7 +102,7 @@ public class LoginHandler extends HttpServlet {
ApiApplicationKey apiApplicationKey = apiManagementProviderService.generateAndRetrieveApplicationKeys(
HandlerConstants.PUBLISHER_APPLICATION_NAME,
tagsAsStringArray, HandlerConstants.PRODUCTION_KEY, username, false,
ApiApplicationConstants.DEFAULT_VALIDITY_PERIOD, scopeString);
ApiApplicationConstants.DEFAULT_VALIDITY_PERIOD);
if (apiApplicationKey != null && getTokenAndPersistInSession(apiApplicationKey.getConsumerKey(),
apiApplicationKey.getConsumerSecret(), req, resp, scopes)) {

@ -661,10 +661,6 @@
<groupId>commons-httpclient.wso2</groupId>
<artifactId>commons-httpclient</artifactId>
</exclusion>
<exclusion>
<groupId>commons-httpclient.wso2</groupId>
<artifactId>commons-httpclient</artifactId>
</exclusion>
<exclusion>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.registry.api</artifactId>
@ -2028,8 +2024,8 @@
<properties>
<servelet.jsp.version>2.2.1</servelet.jsp.version>
<testng.version>6.1.1</testng.version>
<carbon.kernel.version>4.6.1</carbon.kernel.version>
<carbon.kernel.version.range>[4.6.0, 5.0.0)</carbon.kernel.version.range>
<carbon.kernel.version>4.6.2</carbon.kernel.version>
<carbon.kernel.version.range>[4.5.0, 5.0.0)</carbon.kernel.version.range>
<carbon.p2.plugin.version>5.1.2</carbon.p2.plugin.version>
<maven-buildnumber-plugin.version>1.3</maven-buildnumber-plugin.version>
<carbon.feature.plugin.version>3.1.3</carbon.feature.plugin.version>
@ -2057,9 +2053,9 @@
<junit.version>4.8.2</junit.version>
<!--Eclipse OSGi-->
<eclipse.equinox.common.version>3.6.100.v20120522-1841</eclipse.equinox.common.version>
<eclipse.equinox.common.version>3.6.200.v20130402-1505</eclipse.equinox.common.version>
<eclipse.equinox.services.version>3.3.100.v20120522-1822</eclipse.equinox.services.version>
<eclipse.osgi.version>3.9.1.v20130814-1242</eclipse.osgi.version>
<eclipse.osgi.version>3.9.1.v20140110-1610</eclipse.osgi.version>
<orbit.version.h2.engine>1.2.140.wso2v3</orbit.version.h2.engine>
@ -2075,19 +2071,19 @@
<carbon.identity.framework.version>5.18.187</carbon.identity.framework.version>
<carbon.identity.framework.version.range>[5.2.0, 7.0.0)</carbon.identity.framework.version.range>
<identity.inbound.auth.oauth.version>6.4.111</identity.inbound.auth.oauth.version>
<identity.inbound.auth.saml.version>5.4.6</identity.inbound.auth.saml.version>
<identity.inbound.auth.saml.version>5.5.2</identity.inbound.auth.saml.version>
<carbon.identity.jwt.grant.version>1.0.31</carbon.identity.jwt.grant.version>
<carbon.identity.jwt.grant.version.range>[1.0.31, 2.0.0)</carbon.identity.jwt.grant.version.range>
<!-- Carbon Identity import version ranges -->
<carbon.identity.imp.pkg.version>[5.7.0, 6.0.0)</carbon.identity.imp.pkg.version>
<carbon.identity-inbound-auth-oauth.imp.pkg.version>[5.2.0, 7.0.0)</carbon.identity-inbound-auth-oauth.imp.pkg.version>
<carbon.identity-user-ws.imp.pkg.version>[5.1.0, 7.0.0)</carbon.identity-user-ws.imp.pkg.version>
<carbon.identity.imp.pkg.version>[5.14.0, 6.0.0)</carbon.identity.imp.pkg.version>
<carbon.identity-inbound-auth-oauth.imp.pkg.version>[6.0.0, 7.0.0)</carbon.identity-inbound-auth-oauth.imp.pkg.version>
<carbon.identity-user-ws.imp.pkg.version>[5.3.0, 6.0.0)</carbon.identity-user-ws.imp.pkg.version>
<!-- Carbon Multi-tenancy -->
<carbon.multitenancy.version>4.6.11</carbon.multitenancy.version>
<carbon.multitenancy.version>4.9.10</carbon.multitenancy.version>
<!-- Carbon Governance -->
<carbon.governance.version>4.7.23</carbon.governance.version>
<carbon.governance.version>4.8.21</carbon.governance.version>
<!-- Axiom -->
<axiom.version>1.2.11-wso2v10</axiom.version>
@ -2098,7 +2094,7 @@
<carbon.device.mgt.version>4.1.16-SNAPSHOT</carbon.device.mgt.version>
<!-- Carbon Commons -->
<carbon.commons.version>4.6.21</carbon.commons.version>
<carbon.commons.version>4.7.35</carbon.commons.version>
<version.commons.codec>1.4.0.wso2v1</version.commons.codec>
<commons-codec.wso2.osgi.version.range>[1.4.0,2.0.0)</commons-codec.wso2.osgi.version.range>
<version.commons.io>2.4.0.wso2v1</version.commons.io>
@ -2106,8 +2102,8 @@
<commons-lang.wso2.osgi.version.range>[2.6.0,3.0.0)</commons-lang.wso2.osgi.version.range>
<!-- Carbon API Management -->
<carbon.api.mgt.version>9.0.5</carbon.api.mgt.version>
<carbon.api.mgt.version.range>(6.0.0,10.0.0]</carbon.api.mgt.version.range>
<carbon.api.mgt.version>9.0.174</carbon.api.mgt.version>
<carbon.api.mgt.version.range>[9.0.0, 10.0.0)</carbon.api.mgt.version.range>
<!-- Carbon Analytics -->
<carbon.analytics.common.version>5.1.37</carbon.analytics.common.version>
@ -2117,7 +2113,7 @@
<carbon.event-processing.version>2.1.23</carbon.event-processing.version>
<!-- Carbon Registry -->
<carbon.registry.version>4.7.38</carbon.registry.version>
<carbon.registry.version>4.7.39</carbon.registry.version>
<carbon.registry.resource.version>${carbon.registry.version}</carbon.registry.resource.version>
<carbon.registry.imp.pkg.version.range>[4.7.0, 5.0.0)</carbon.registry.imp.pkg.version.range>
@ -2135,12 +2131,9 @@
<!-- JSCEP -->
<jscep.version>2.3.0.wso2v2</jscep.version>
<!-- Nimbus Jose-->
<nimbus.orbit.version>2.26.1.wso2v3</nimbus.orbit.version>
<commons-json.version>3.0.0.wso2v1</commons-json.version>
<json.smart.version>1.3</json.smart.version>
<google.gson.version>2.3.1</google.gson.version>
<google.gson.version>2.8.5</google.gson.version>
<squareup.okhttp3.version>4.6.0</squareup.okhttp3.version>
<okio.version>1.13.0</okio.version>
<github.openfeign.version>9.3.1</github.openfeign.version>
@ -2191,12 +2184,12 @@
<!--javax ws rs version-->
<javax.ws.rs.version>2.0.1</javax.ws.rs.version>
<swagger.version>1.5.10</swagger.version>
<swagger.annotations.version>1.5.10</swagger.annotations.version>
<swagger.annotations.version>1.6.1</swagger.annotations.version>
<servlet-api.version>4.0.1</servlet-api.version>
<!--JWT grant type extension feature-->
<identity.jwt.extension.version>1.0.10</identity.jwt.extension.version>
<jackson-annotations.version>2.6.1.wso2v1</jackson-annotations.version>
<jackson-annotations.version>2.9.8.wso2v1</jackson-annotations.version>
<jackson-databind.version>2.6.1.wso2v3</jackson-databind.version>
<joda-time.version>2.8.2.wso2v1</joda-time.version>
<owasp.encoder.version>1.2.0.wso2v1</owasp.encoder.version>
@ -2220,7 +2213,7 @@
<apache.validator.version>1.7</apache.validator.version>
<!-- api-mgt handler version properties -->
<org.apache.synapse.version>2.1.7-wso2v7</org.apache.synapse.version>
<org.apache.synapse.version>2.1.7-wso2v227</org.apache.synapse.version>
<org.apache.ws.security.wso2.version>1.5.11.wso2v15</org.apache.ws.security.wso2.version>
<!--carbon store version-->
@ -2258,7 +2251,7 @@
<javax.websocket.version>1.0</javax.websocket.version>
<glassfish.tyrus.version>1.13.1</glassfish.tyrus.version>
<spring-web.version>5.1.2.RELEASE</spring-web.version>
<spring-web.version>5.1.13.RELEASE</spring-web.version>
<cxf-bundle-package.version>2.7.18</cxf-bundle-package.version>
<imp.package.version.osgi.framework>[1.6.0, 2.0.0)</imp.package.version.osgi.framework>

Loading…
Cancel
Save