Merge pull request #1213 from geethkokila/330-release

Upgrade the versions
4.x.x
Kamidu Sachith Punchihewa 7 years ago committed by GitHub
commit 2bba71030e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -29,7 +29,7 @@
<Password>admin</Password>
<!--Dynamic client registration endpoint-->
<DynamicClientRegistrationEndpoint>https://${iot.keymanager.host}:${iot.keymanager.https.port}/client-registration/v0.11/register</DynamicClientRegistrationEndpoint>
<DynamicClientRegistrationEndpoint>https://${iot.keymanager.host}:${iot.keymanager.https.port}/client-registration/v0.12/register</DynamicClientRegistrationEndpoint>
<!--Oauth token endpoint-->
<OauthTokenEndpoint>https://${iot.keymanager.host}:${iot.keymanager.https.port}/oauth2/token</OauthTokenEndpoint>

@ -47,7 +47,7 @@ public class IOTServerConfigurationTest extends BaseAPIHandlerTest {
Assert.assertEquals(serverConfiguration.getUsername(), "testuser");
Assert.assertEquals(serverConfiguration.getPassword(), "testuserpwd");
Assert.assertEquals(serverConfiguration.getDynamicClientRegistrationEndpoint(),
"https://${iot.keymanager.host}:${iot.keymanager.https.port}/client-registration/v0.11/register");
"https://${iot.keymanager.host}:${iot.keymanager.https.port}/client-registration/v0.12/register");
Assert.assertEquals(serverConfiguration.getOauthTokenEndpoint(),
"https://${iot.keymanager.host}:${iot.keymanager.https.port}/oauth2/token");
Assert.assertEquals(serverConfiguration.getApis().size(), 1);
@ -87,7 +87,7 @@ public class IOTServerConfigurationTest extends BaseAPIHandlerTest {
Assert.assertEquals(serverConfiguration.getPassword(), "testuserpwd");
Assert.assertEquals(serverConfiguration.getDynamicClientRegistrationEndpoint(),
"https://" + TestUtils.IOT_KEYMANAGER_HOST + ":" + TestUtils.IOT_KEYMANAGER_PORT
+ "/client-registration/v0.11/register");
+ "/client-registration/v0.12/register");
Assert.assertEquals(serverConfiguration.getOauthTokenEndpoint(),
"https://" + TestUtils.IOT_KEYMANAGER_HOST + ":" + TestUtils.IOT_KEYMANAGER_PORT
+ "/oauth2/token");

@ -29,7 +29,7 @@
<Password>testuserpwd</Password>
<!--Dynamic client registration endpoint-->
<DynamicClientRegistrationEndpoint>https://${iot.keymanager.host}:${iot.keymanager.https.port}/client-registration/v0.11/register</DynamicClientRegistrationEndpoint>
<DynamicClientRegistrationEndpoint>https://${iot.keymanager.host}:${iot.keymanager.https.port}/client-registration/v0.12/register</DynamicClientRegistrationEndpoint>
<!--Oauth token endpoint-->
<OauthTokenEndpoint>https://${iot.keymanager.host}:${iot.keymanager.https.port}/oauth2/token</OauthTokenEndpoint>

@ -29,7 +29,7 @@
<Password>testuserpwd</Password>
<!--Dynamic client registration endpoint-->
<DynamicClientRegistrationEndpoint>https://${iot.keymanager.host}:${iot.keymanager.https.port}/client-registration/v0.11/register</DynamicClientRegistrationEndpoint>
<DynamicClientRegistrationEndpoint>https://${iot.keymanager.host}:${iot.keymanager.https.port}/client-registration/v0.12/register</DynamicClientRegistrationEndpoint>
<!--Oauth token endpoint-->
<OauthTokenEndpoint>https://${iot.keymanager.host}:${iot.keymanager.https.port}/oauth2/token</OauthTokenEndpoint>

@ -29,7 +29,7 @@
<Password>testuserpwd</Password>
<!--Dynamic client registration endpoint-->
<DynamicClientRegistrationEndpoint>https://${iot.keymanager.host}:${iot.keymanager.https.port}/client-registration/v0.11/register</DynamicClientRegistrationEndpoint>
<DynamicClientRegistrationEndpoint>https://${iot.keymanager.host}:${iot.keymanager.https.port}/client-registration/v0.12/register</DynamicClientRegistrationEndpoint>
<!--Oauth token endpoint-->
<OauthTokenEndpoint>https://${iot.keymanager.host}:${iot.keymanager.https.port}/oauth2/token</OauthTokenEndpoint>

@ -20,6 +20,7 @@ package org.wso2.carbon.device.mgt.core.task;
import org.wso2.carbon.ntask.common.TaskException;
import org.wso2.carbon.ntask.core.TaskInfo;
import org.wso2.carbon.ntask.core.TaskManager;
import org.wso2.carbon.ntask.core.impl.LocalTaskActionListener;
import java.util.ArrayList;
import java.util.List;
@ -96,4 +97,9 @@ public class TestTaskManagerImpl implements TaskManager {
public boolean isTaskScheduled(String taskName) throws TaskException {
return this.registeredTasks.size() > 0;
}
@Override
public void registerLocalTaskActionListener(LocalTaskActionListener localTaskActionListener, String s) {
}
}

@ -30,6 +30,8 @@ import org.wso2.carbon.identity.oauth.cache.OAuthCache;
import org.wso2.carbon.identity.oauth.cache.OAuthCacheKey;
import org.wso2.carbon.identity.oauth.config.OAuthServerConfiguration;
import org.wso2.carbon.identity.oauth2.IdentityOAuth2Exception;
import org.wso2.carbon.identity.oauth2.dao.OAuthScopeDAO;
import org.wso2.carbon.identity.oauth2.dao.OAuthScopeDAOImpl;
import org.wso2.carbon.identity.oauth2.dao.TokenMgtDAO;
import org.wso2.carbon.identity.oauth2.model.AccessTokenDO;
import org.wso2.carbon.identity.oauth2.model.ResourceScopeCacheEntry;
@ -62,7 +64,8 @@ public class ExtendedJDBCScopeValidator extends OAuth2ScopeValidator {
}
String resourceScope = null;
TokenMgtDAO tokenMgtDAO = new TokenMgtDAO();
// TokenMgtDAO tokenMgtDAO = new TokenMgtDAO();
OAuthScopeDAOImpl scopeDAO = new OAuthScopeDAOImpl();
boolean cacheHit = false;
// Check the cache, if caching is enabled.
@ -79,7 +82,7 @@ public class ExtendedJDBCScopeValidator extends OAuth2ScopeValidator {
}
if (!cacheHit) {
resourceScope = tokenMgtDAO.findScopeOfResource(resource);
resourceScope = scopeDAO.findScopeOfResource(resource);
if (OAuthServerConfiguration.getInstance().isCacheEnabled()) {
OAuthCache oauthCache = OAuthCache.getInstance();
@ -112,7 +115,7 @@ public class ExtendedJDBCScopeValidator extends OAuth2ScopeValidator {
try {
//Get the permissions associated with the scope, if any
Set<String> permissionsOfScope = tokenMgtDAO.getRolesOfScopeByScopeKey(resourceScope);
Set<String> permissionsOfScope = scopeDAO.getBindingsOfScopeByScopeName(resourceScope);
//If the scope doesn't have any permissions associated with it.
if(permissionsOfScope == null || permissionsOfScope.isEmpty()){

@ -26,6 +26,9 @@ import org.wso2.carbon.device.mgt.oauth.extensions.internal.OAuthExtensionsDataH
import org.wso2.carbon.identity.application.common.model.User;
import org.wso2.carbon.identity.core.util.IdentityTenantUtil;
import org.wso2.carbon.identity.oauth2.IdentityOAuth2Exception;
import org.wso2.carbon.identity.oauth2.dao.OAuthScopeDAO;
import org.wso2.carbon.identity.oauth2.dao.OAuthScopeDAOImpl;
import org.wso2.carbon.identity.oauth2.dao.OAuthTokenPersistenceFactory;
import org.wso2.carbon.identity.oauth2.dao.TokenMgtDAO;
import org.wso2.carbon.identity.oauth2.model.AccessTokenDO;
import org.wso2.carbon.identity.oauth2.validators.OAuth2ScopeValidator;
@ -56,7 +59,11 @@ public class PermissionBasedScopeValidator extends OAuth2ScopeValidator {
return true;
}
TokenMgtDAO tokenMgtDAO = new TokenMgtDAO();
OAuthScopeDAO pp = OAuthTokenPersistenceFactory.getInstance().getOAuthScopeDAO();
int tid = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId();
// TokenMgtDAO tokenMgtDAO = new TokenMgtDAO();
OAuthScopeDAOImpl nn = new OAuthScopeDAOImpl();
List<String> scopeList = new ArrayList<>(Arrays.asList(scopes));
@ -71,7 +78,7 @@ public class PermissionBasedScopeValidator extends OAuth2ScopeValidator {
try {
//Get the permissions associated with the scope, if any
Set<String> permissionsOfScope = tokenMgtDAO.getRolesOfScopeByScopeKey(resourceScope);
Set<String> permissionsOfScope = pp.getBindingsOfScopeByScopeName(resourceScope, tid);
//If the scope doesn't have any permissions associated with it.
if(permissionsOfScope == null || permissionsOfScope.isEmpty()){

@ -28,6 +28,7 @@ import org.wso2.carbon.identity.base.IdentityConstants;
import org.wso2.carbon.identity.core.util.IdentityTenantUtil;
import org.wso2.carbon.identity.core.util.IdentityUtil;
import org.wso2.carbon.identity.oauth2.IdentityOAuth2Exception;
import org.wso2.carbon.identity.oauth2.dao.OAuthScopeDAOImpl;
import org.wso2.carbon.identity.oauth2.dao.TokenMgtDAO;
import org.wso2.carbon.identity.oauth2.model.AccessTokenDO;
import org.wso2.carbon.identity.oauth2.validators.OAuth2ScopeValidator;
@ -61,7 +62,8 @@ public class RoleBasedScopeValidator extends OAuth2ScopeValidator {
return true;
}
TokenMgtDAO tokenMgtDAO = new TokenMgtDAO();
// TokenMgtDAO tokenMgtDAO = new TokenMgtDAO();
OAuthScopeDAOImpl scopeDAO = new OAuthScopeDAOImpl();
List<String> scopeList = new ArrayList<>(Arrays.asList(scopes));
@ -76,7 +78,7 @@ public class RoleBasedScopeValidator extends OAuth2ScopeValidator {
try {
//Get the roles associated with the scope, if any
Set<String> rolesOfScope = tokenMgtDAO.getRolesOfScopeByScopeKey(resourceScope);
Set<String> rolesOfScope = scopeDAO.getBindingsOfScopeByScopeName(resourceScope);
//If the scope doesn't have any roles associated with it.
if(rolesOfScope == null || rolesOfScope.isEmpty()){

@ -21,6 +21,7 @@ package org.wso2.carbon.policy.mgt.core.task;
import org.wso2.carbon.ntask.common.TaskException;
import org.wso2.carbon.ntask.core.TaskInfo;
import org.wso2.carbon.ntask.core.TaskManager;
import org.wso2.carbon.ntask.core.impl.LocalTaskActionListener;
import java.util.ArrayList;
import java.util.List;
@ -97,4 +98,9 @@ public class TestTaskManagerImpl implements TaskManager {
public boolean isTaskScheduled(String taskName) throws TaskException {
return this.registeredTasks.size() > 0;
}
@Override
public void registerLocalTaskActionListener(LocalTaskActionListener localTaskActionListener, String s) {
}
}

@ -184,6 +184,12 @@
<dependency>
<groupId>org.wso2.carbon.identity.framework</groupId>
<artifactId>org.wso2.carbon.identity.core</artifactId>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.wso2.carbon.identity.inbound.auth.oauth2</groupId>
@ -217,10 +223,6 @@
<groupId>commons-httpclient.wso2</groupId>
<artifactId>commons-httpclient</artifactId>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
</dependency>
<dependency>
<groupId>commons-pool.wso2</groupId>
<artifactId>commons-pool</artifactId>

@ -29,7 +29,7 @@
<Password>admin</Password>
<!--Dynamic client registration endpoint-->
<DynamicClientRegistrationEndpoint>https://${iot.keymanager.host}:${iot.keymanager.https.port}/client-registration/v0.11/register</DynamicClientRegistrationEndpoint>
<DynamicClientRegistrationEndpoint>https://${iot.keymanager.host}:${iot.keymanager.https.port}/client-registration/v0.12/register</DynamicClientRegistrationEndpoint>
<!--Oauth token endpoint-->
<OauthTokenEndpoint>https://${iot.keymanager.host}:${iot.keymanager.https.port}/oauth2/token</OauthTokenEndpoint>

@ -19,7 +19,7 @@
-->
<APIMConfiguration>
<DCREndpoint>https://${iot.keymanager.host}:${iot.keymanager.https.port}/client-registration/v0.11/register</DCREndpoint>
<DCREndpoint>https://${iot.keymanager.host}:${iot.keymanager.https.port}/client-registration/v0.12/register</DCREndpoint>
<TokenEndpoint>https://${iot.gateway.host}:${iot.gateway.https.port}/token</TokenEndpoint>
<PublisherEndpoint>https://${iot.apimpublisher.host}:${iot.apimpublisher.https.port}/api/am/publisher/v0.11</PublisherEndpoint>
<StoreEndpoint>https://${iot.apimstore.host}:${iot.apimstore.https.port}/api/am/store/v0.11</StoreEndpoint>

@ -401,6 +401,10 @@
<groupId>org.wso2.securevault</groupId>
<artifactId>org.wso2.securevault</artifactId>
</exclusion>
<exclusion>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
@ -884,6 +888,16 @@
<groupId>org.wso2.carbon.identity.framework</groupId>
<artifactId>org.wso2.carbon.identity.core</artifactId>
<version>${carbon.identity.framework.version}</version>
<exclusions>
<exclusion>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
</exclusion>
<exclusion>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-testng</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.wso2.carbon.identity.inbound.auth.oauth2</groupId>
@ -904,6 +918,24 @@
<groupId>org.wso2.carbon.identity.inbound.auth.oauth2</groupId>
<artifactId>org.wso2.carbon.identity.oauth</artifactId>
<version>${identity.inbound.auth.oauth.version}</version>
<exclusions>
<exclusion>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-coyote</artifactId>
</exclusion>
<exclusion>
<groupId>org.wso2.carbon.consent.mgt</groupId>
<artifactId>org.wso2.carbon.consent.mgt.core</artifactId>
</exclusion>
<exclusion>
<groupId>org.wso2.carbon.identity.framework</groupId>
<artifactId>org.wso2.carbon.identity.event</artifactId>
</exclusion>
<exclusion>
<groupId>org.wso2.carbon.identity.framework</groupId>
<artifactId>org.wso2.carbon.identity.testutil</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.wso2.carbon.identity.framework</groupId>
@ -914,11 +946,27 @@
<groupId>org.wso2.carbon.identity.framework</groupId>
<artifactId>org.wso2.carbon.user.mgt</artifactId>
<version>${carbon.identity.framework.version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>log4j-over-slf4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.wso2.carbon.identity.framework</groupId>
<artifactId>org.wso2.carbon.identity.base</artifactId>
<version>${carbon.identity.framework.version}</version>
<exclusions>
<exclusion>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
</exclusion>
<exclusion>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-testng</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- End of Carbon Identity dependencies -->
@ -1293,6 +1341,10 @@
<groupId>org.wso2.carbon.identity</groupId>
<artifactId>org.wso2.carbon.user.mgt</artifactId>
</exclusion>
<exclusion>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
</exclusion>
</exclusions>
</dependency>
@ -1808,7 +1860,7 @@
<properties>
<servelet.jsp.version>2.2.1</servelet.jsp.version>
<testng.version>6.1.1</testng.version>
<carbon.kernel.version>4.4.17</carbon.kernel.version>
<carbon.kernel.version>4.4.24</carbon.kernel.version>
<carbon.kernel.449.version>4.4.9</carbon.kernel.449.version>
<carbon.kernel.version.range>[4.4.0, 5.0.0)</carbon.kernel.version.range>
<carbon.p2.plugin.version>1.5.4</carbon.p2.plugin.version>
@ -1849,13 +1901,13 @@
<tomcat.jdbc.pooling.version>7.0.34.wso2v2</tomcat.jdbc.pooling.version>
<!-- Carbon Deployment -->
<carbon.deployment.version>4.7.2</carbon.deployment.version>
<carbon.deployment.version>4.7.10</carbon.deployment.version>
<!-- Carbon Identity -->
<carbon.identity.framework.version>5.7.0</carbon.identity.framework.version>
<carbon.identity.framework.version>5.11.120</carbon.identity.framework.version>
<carbon.identity.framework.version.range>[5.0.0, 6.0.0)</carbon.identity.framework.version.range>
<identity.inbound.auth.oauth.version>5.3.1</identity.inbound.auth.oauth.version>
<identity.inbound.auth.saml.version>5.3.0</identity.inbound.auth.saml.version>
<identity.inbound.auth.oauth.version>5.6.51</identity.inbound.auth.oauth.version>
<identity.inbound.auth.saml.version>5.4.4</identity.inbound.auth.saml.version>
<carbon.identity.jwt.grant.version>1.0.2</carbon.identity.jwt.grant.version>
<carbon.identity.jwt.grant.version.range>[1.0.2, 2.0.0)</carbon.identity.jwt.grant.version.range>
<!-- Carbon Identity import version ranges -->
@ -1864,10 +1916,10 @@
<carbon.identity-user-ws.imp.pkg.version>[5.1.0, 6.0.0)</carbon.identity-user-ws.imp.pkg.version>
<!-- Carbon Multi-tenancy -->
<carbon.multitenancy.version>4.6.1</carbon.multitenancy.version>
<carbon.multitenancy.version>4.6.8</carbon.multitenancy.version>
<!-- Carbon Governance -->
<carbon.governance.version>4.7.8</carbon.governance.version>
<carbon.governance.version>4.7.23</carbon.governance.version>
<!-- Axiom -->
<axiom.version>1.2.11-wso2v10</axiom.version>
@ -1878,7 +1930,7 @@
<carbon.device.mgt.version>3.0.244-SNAPSHOT</carbon.device.mgt.version>
<!-- Carbon Commons -->
<carbon.commons.version>4.4.8</carbon.commons.version>
<carbon.commons.version>4.6.21</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>
@ -1886,7 +1938,7 @@
<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>6.1.109</carbon.api.mgt.version>
<carbon.api.mgt.version>6.2.146</carbon.api.mgt.version>
<carbon.api.mgt.version.range>(6.0.0,7.0.0]</carbon.api.mgt.version.range>
<!-- Carbon Analytics -->
@ -1897,7 +1949,7 @@
<carbon.event-processing.version>2.1.10</carbon.event-processing.version>
<!-- Carbon Registry -->
<carbon.registry.version>4.6.8</carbon.registry.version>
<carbon.registry.version>4.6.28</carbon.registry.version>
<carbon.registry.resource.version>4.6.8</carbon.registry.resource.version>
<carbon.registry.imp.pkg.version.range>[4.4.8, 5.0.0)</carbon.registry.imp.pkg.version.range>
@ -1969,7 +2021,7 @@
<servlet-api.version>2.5</servlet-api.version>
<!--JWT grant type extension feature-->
<identity.jwt.extension.version>1.0.2</identity.jwt.extension.version>
<identity.jwt.extension.version>1.0.10</identity.jwt.extension.version>
<jackson-annotations.version>2.6.1.wso2v1</jackson-annotations.version>
<jackson-databind.version>2.6.1.wso2v3</jackson-databind.version>
<joda-time.version>2.8.2.wso2v1</joda-time.version>
@ -1985,7 +2037,7 @@
<javax.xml.soap.imp.pkg.version>[1.0.0, 1.1.0)</javax.xml.soap.imp.pkg.version>
<!-- apache pdfbox version -->
<slf4j.simple.version>1.6.1</slf4j.simple.version>
<slf4j.simple.version>1.7.0</slf4j.simple.version>
<!--apache osgi mock version-->
<apache.osgi.mock.version>2.3.2</apache.osgi.mock.version>

Loading…
Cancel
Save