diff --git a/modules/api-resources/api-resources-full/pom.xml b/modules/api-resources/api-resources-full/pom.xml index 9f4b18a9a94..7b6cb982460 100644 --- a/modules/api-resources/api-resources-full/pom.xml +++ b/modules/api-resources/api-resources-full/pom.xml @@ -105,14 +105,6 @@ org.wso2.carbon.identity.user.api org.wso2.carbon.identity.api.user.common - - org.wso2.carbon.identity.user.api - org.wso2.carbon.identity.rest.api.user.challenge.v1 - - - org.wso2.carbon.identity.user.api - org.wso2.carbon.identity.api.user.challenge.common - org.wso2.carbon.identity.user.api org.wso2.carbon.identity.rest.api.user.association.v1 @@ -260,14 +252,6 @@ org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.common - - org.wso2.carbon.identity.server.api - org.wso2.carbon.identity.rest.api.server.challenge.v1 - - - org.wso2.carbon.identity.server.api - org.wso2.carbon.identity.api.server.challenge.common - org.wso2.carbon.identity.server.api org.wso2.carbon.identity.rest.api.server.claim.management.v1 diff --git a/modules/api-resources/api-resources-full/src/main/webapp/WEB-INF/beans.xml b/modules/api-resources/api-resources-full/src/main/webapp/WEB-INF/beans.xml index 07e8890000e..108075074d5 100644 --- a/modules/api-resources/api-resources-full/src/main/webapp/WEB-INF/beans.xml +++ b/modules/api-resources/api-resources-full/src/main/webapp/WEB-INF/beans.xml @@ -19,7 +19,6 @@ xmlns:jaxrs="http://cxf.apache.org/jaxrs" xmlns:context="http://www.springframework.org/schema/context" xmlns:cxf="http://cxf.apache.org/core" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd"> - @@ -32,7 +31,6 @@ - @@ -91,7 +89,6 @@ - @@ -206,8 +203,6 @@ - - @@ -332,10 +327,7 @@ - - - diff --git a/modules/api-resources/pom.xml b/modules/api-resources/pom.xml index 8be439bd969..39ee252e3a1 100644 --- a/modules/api-resources/pom.xml +++ b/modules/api-resources/pom.xml @@ -136,11 +136,6 @@ org.wso2.carbon.identity.api.server.common ${identity.server.api.version} - - org.wso2.carbon.identity.server.api - org.wso2.carbon.identity.rest.api.server.challenge.v1 - ${identity.server.api.version} - org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.identity.governance.v1 @@ -161,11 +156,6 @@ org.wso2.carbon.identity.api.server.admin.advisory.management.common ${identity.server.api.version} - - org.wso2.carbon.identity.server.api - org.wso2.carbon.identity.api.server.challenge.common - ${identity.server.api.version} - org.wso2.carbon.identity.server.api org.wso2.carbon.identity.rest.api.server.claim.management.v1 diff --git a/modules/integration/tests-common/admin-clients/pom.xml b/modules/integration/tests-common/admin-clients/pom.xml index fabce3059bd..187cb927c2b 100644 --- a/modules/integration/tests-common/admin-clients/pom.xml +++ b/modules/integration/tests-common/admin-clients/pom.xml @@ -134,10 +134,6 @@ org.wso2.carbon.identity.framework org.wso2.carbon.identity.governance.stub - - org.wso2.carbon.identity.governance - org.wso2.carbon.identity.recovery.stub - org.wso2.carbon.registry org.wso2.carbon.registry.resource.stub diff --git a/modules/integration/tests-common/admin-clients/src/main/java/org/wso2/identity/integration/common/clients/challenge/questions/mgt/ChallengeQuestionMgtAdminClient.java b/modules/integration/tests-common/admin-clients/src/main/java/org/wso2/identity/integration/common/clients/challenge/questions/mgt/ChallengeQuestionMgtAdminClient.java deleted file mode 100644 index 9f34cc96dbe..00000000000 --- a/modules/integration/tests-common/admin-clients/src/main/java/org/wso2/identity/integration/common/clients/challenge/questions/mgt/ChallengeQuestionMgtAdminClient.java +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * Licensed 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.identity.integration.common.clients.challenge.questions.mgt; - -import org.apache.axis2.AxisFault; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.wso2.carbon.identity.application.common.model.xsd.User; -import org.wso2.carbon.identity.claim.metadata.mgt.stub.ClaimMetadataManagementServiceStub; -import org.wso2.carbon.identity.recovery.stub.ChallengeQuestionManagementAdminServiceStub; -import org.wso2.carbon.identity.recovery.stub.model.ChallengeQuestion; -import org.wso2.carbon.identity.recovery.stub.model.UserChallengeAnswer; -import org.wso2.identity.integration.common.clients.AuthenticateStub; - - -/** - * Admin service client for ChallengeQuestionManagement Service. - * - */ -public class ChallengeQuestionMgtAdminClient { - - private static final Log log = LogFactory.getLog(ChallengeQuestionMgtAdminClient.class); - private static final String SERVICE_NAME = "ChallengeQuestionManagementAdminService"; - private ChallengeQuestionManagementAdminServiceStub stub = null; - - private String endPoint; - - public ChallengeQuestionMgtAdminClient(String backendUrl, String cookie) throws AxisFault { - endPoint = backendUrl + SERVICE_NAME; - stub = new ChallengeQuestionManagementAdminServiceStub(endPoint); - AuthenticateStub.authenticateStub(cookie, stub); - } - - public ChallengeQuestionMgtAdminClient(String backEndUrl, String userName, String password) throws AxisFault { - this.endPoint = backEndUrl + SERVICE_NAME; - stub = new ChallengeQuestionManagementAdminServiceStub(endPoint); - AuthenticateStub.authenticateStub(userName, password, stub); - } - - public ChallengeQuestion[] getChallengeQuestionsForTenant(String tenantDomain) throws AxisFault { - - try { - return stub.getChallengeQuestionsOfTenant(tenantDomain); - } catch (Exception e) { - handleException(e.getMessage(), e); - } - return new ChallengeQuestion[0]; - } - - - public ChallengeQuestion[] getChallengeQuestionsForUser(User user) throws AxisFault { - - try { - return stub.getChallengeQuestionsForUser(user); - } catch (Exception e) { - handleException(e.getMessage(), e); - } - - return new ChallengeQuestion[0]; - } - - public ChallengeQuestion[] getChallengeQuestionsForLocale(String tenantDomain, String locale) throws AxisFault { - - try { - return stub.getChallengeQuestionsForLocale(tenantDomain, locale); - } catch (Exception e) { - handleException(e.getMessage(), e); - } - - return new ChallengeQuestion[0]; - } - - - public void setChallengeQuestions(ChallengeQuestion[] challengeQuestions, String tenantDomain) - throws AxisFault { - try { - stub.setChallengeQuestionsOfTenant(challengeQuestions, tenantDomain); - } catch (Exception e) { - handleException(e.getMessage(), e); - } - } - - public void deleteChallengeQuestions(ChallengeQuestion[] challengeQuestions, String tenantDomain) - throws AxisFault { - try { - stub.deleteChallengeQuestionsOfTenant(challengeQuestions, tenantDomain); - } catch (Exception e) { - handleException(e.getMessage(), e); - } - } - - public void setUserChallengeAnswers(User user, UserChallengeAnswer[] userChallengeAnswers) - throws AxisFault { - try { - stub.setUserChallengeAnswers(user, userChallengeAnswers); - } catch (Exception e) { - handleException(e.getMessage(), e); - } - } - - public UserChallengeAnswer[] getUserChallengeAnswers(User user) throws AxisFault { - try { - return stub.getUserChallengeAnswers(user); - } catch (Exception e) { - handleException(e.getMessage(), e); - } - - return new UserChallengeAnswer[0]; - } - - private String[] handleException(String msg, Exception e) throws AxisFault { - log.error(msg, e); - throw new AxisFault(msg, e); - } -} diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/challenge/questions/mgt/ChallengeQuestionManagementAdminServiceTestCase.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/challenge/questions/mgt/ChallengeQuestionManagementAdminServiceTestCase.java deleted file mode 100644 index 0a18f46ebc1..00000000000 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/challenge/questions/mgt/ChallengeQuestionManagementAdminServiceTestCase.java +++ /dev/null @@ -1,272 +0,0 @@ -/* - * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * Licensed 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.identity.integration.test.challenge.questions.mgt; - -import org.testng.annotations.AfterClass; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; -import org.wso2.carbon.identity.application.common.model.xsd.User; -import org.wso2.carbon.identity.core.util.IdentityUtil; -import org.wso2.carbon.identity.recovery.stub.model.ChallengeQuestion; -import org.wso2.carbon.integration.common.admin.client.AuthenticatorClient; -import org.wso2.identity.integration.common.clients.UserManagementClient; -import org.wso2.identity.integration.common.clients.challenge.questions.mgt.ChallengeQuestionMgtAdminClient; -import org.wso2.identity.integration.common.clients.usermgt.remote.RemoteUserStoreManagerServiceClient; -import org.wso2.identity.integration.common.utils.ISIntegrationTest; - -import static org.testng.Assert.assertTrue; -import static org.testng.Assert.fail; - -public class ChallengeQuestionManagementAdminServiceTestCase extends ISIntegrationTest { - - private UserManagementClient userMgtClient; - private ChallengeQuestionMgtAdminClient challengeQuestionsAdminClient; - private ChallengeQuestionMgtAdminClient challengeQuestionsBobClient; - private AuthenticatorClient loginManger; - private RemoteUserStoreManagerServiceClient remoteUSMServiceClient; - ChallengeQuestion challengeQuestionSet1; - - private static final String PROFILE_NAME = "default"; - - private static final String BOB_USERNAME = "Bob"; - private static final String BOB_PASSWORD = "Bob@1234"; - private static final String BOB_LOCALE = "xx_YY"; - private static final String LOGIN_ROLE = "loginRole"; - - - private static final String LOGIN_PERMISSION = "/permission/admin/login"; - private static final String SET_CHALLENGE_QUESTIONS_PERMISSION = "/permission/admin/configure/security/questions"; - - private static final String SUPER_TENANT = "carbon.super"; - private static final String WSO2_TENANT = "wso2.com"; - - private static final String LOCALITY_CLAIM_URI = IdentityUtil.getClaimUriLocale(); - - @BeforeClass(alwaysRun = true) - public void testInit() throws Exception { - super.init(); - - loginManger = new AuthenticatorClient(backendURL); - - // login as super tenant admin - loginManger.login(isServer.getSuperTenant().getTenantAdmin().getUserName(), - isServer.getSuperTenant().getTenantAdmin().getPassword(), - isServer.getInstance().getHosts().get("default")); - - userMgtClient = new UserManagementClient(backendURL, sessionCookie); - remoteUSMServiceClient = new RemoteUserStoreManagerServiceClient(backendURL, sessionCookie); - challengeQuestionsAdminClient = new ChallengeQuestionMgtAdminClient(backendURL, sessionCookie); - challengeQuestionsBobClient = new ChallengeQuestionMgtAdminClient(backendURL, BOB_USERNAME, BOB_PASSWORD); - - createUsersAndRoles(); - setSystemproperties(); - } - - @Test(groups = "wso2.is", description = "Getting challenge questions of a user", priority = 1, sequential = true) - public void testDefaultChallengeQuestions() throws Exception { - ChallengeQuestion[] defaultQuestions = challengeQuestionsBobClient.getChallengeQuestionsForTenant(SUPER_TENANT); - assertTrue(defaultQuestions != null && defaultQuestions.length > 0, - "Default Challenge questions not found for " + SUPER_TENANT + " tenantDomain."); - - } - - - @Test(groups = "wso2.is", description = "Getting challenge questions of a user", priority = 2, sequential = true) - public void addChallengeQuestionByTenant() throws Exception { - - int countBefore = challengeQuestionsBobClient.getChallengeQuestionsForTenant(SUPER_TENANT).length; - - challengeQuestionSet1 = new ChallengeQuestion(); - challengeQuestionSet1.setQuestionSetId("newSet1"); - challengeQuestionSet1.setQuestionId("q1"); - challengeQuestionSet1.setQuestion("This is a new Challenge Question????"); - challengeQuestionSet1.setLocale("en_US"); - challengeQuestionsBobClient.setChallengeQuestions(new ChallengeQuestion[]{challengeQuestionSet1}, - SUPER_TENANT); - - int countAfter = challengeQuestionsBobClient.getChallengeQuestionsForTenant(SUPER_TENANT).length; - - assertTrue(countBefore + 1 == countAfter, "Adding a new challenge question failed in " + SUPER_TENANT); - } - - @Test(groups = "wso2.is", description = "Getting challenge questions of a user", priority = 3, sequential = true) - public void addChallengeQuestionByLocale() throws Exception { - challengeQuestionsAdminClient = new ChallengeQuestionMgtAdminClient(backendURL, BOB_USERNAME, BOB_PASSWORD); - - ChallengeQuestion[] challengeQuestions = - challengeQuestionsAdminClient.getChallengeQuestionsForLocale(SUPER_TENANT, BOB_LOCALE); - - int countBefore = challengeQuestions == null ? 0 : challengeQuestions.length; - - ChallengeQuestion challengeQuestion = new ChallengeQuestion(); - challengeQuestion.setQuestionSetId("newSet1"); - challengeQuestion.setQuestionId("q2"); - challengeQuestion.setQuestion("Challenge Question in xx_YY ????"); - challengeQuestion.setLocale(BOB_LOCALE); - - challengeQuestionsAdminClient.setChallengeQuestions(new ChallengeQuestion[]{challengeQuestion}, SUPER_TENANT); - int countAfter = challengeQuestionsAdminClient.getChallengeQuestionsForLocale(SUPER_TENANT, BOB_LOCALE) - .length; - assertTrue(countBefore + 1 == countAfter, "Adding a new challenge question for locale " + BOB_LOCALE + - " failed in " + SUPER_TENANT); - } - - @Test(groups = "wso2.is", description = "Getting challenge questions of a user", priority = 4, sequential = true) - public void getChallengeQuestionsByLocale() throws Exception { - challengeQuestionsAdminClient = new ChallengeQuestionMgtAdminClient(backendURL, BOB_USERNAME, BOB_PASSWORD); - - try { - ChallengeQuestion[] questionsForLocale = - challengeQuestionsAdminClient.getChallengeQuestionsForLocale(SUPER_TENANT, BOB_LOCALE); - - for (ChallengeQuestion challengeQuestion : questionsForLocale) { - assertTrue(BOB_LOCALE.equalsIgnoreCase(challengeQuestion.getLocale())); - } - } catch (Exception e) { - fail("Exception when retrieving questions of locale : " + BOB_LOCALE); - } - - } - - @Test(groups = "wso2.is", description = "Getting challenge questions of a user", priority = 5, sequential = true) - public void getChallengeQuestionByUser() throws Exception { - challengeQuestionsAdminClient = new ChallengeQuestionMgtAdminClient(backendURL, BOB_USERNAME, BOB_PASSWORD); - - User bob = new User(); - bob.setUserName(BOB_USERNAME); - bob.setTenantDomain(SUPER_TENANT); - - int count = challengeQuestionsAdminClient.getChallengeQuestionsForUser(bob).length; - assertTrue(count == 1, "Challenge Questions not retrieved successfully for user : " + bob.toString()); - } - - @Test(groups = "wso2.is", description = "Deleting challenge question in a locale", priority = 6, sequential = true) - public void deleteChallengeQuestionsByLocale() throws Exception { - challengeQuestionsAdminClient = new ChallengeQuestionMgtAdminClient(backendURL, - isServer.getSuperTenant().getTenantAdmin().getUserName(), - isServer.getSuperTenant().getTenantAdmin().getUserName()); - - // get challenge challenge questions of xx_YY locale - ChallengeQuestion[] challengeQuestions = - challengeQuestionsAdminClient.getChallengeQuestionsForLocale(SUPER_TENANT, BOB_LOCALE); - - // we should have challenge questions in the locale by now. - assertTrue(challengeQuestions != null && challengeQuestions.length > 0); - - // delete all the challenge questions in the xx_YY locale - challengeQuestionsAdminClient.deleteChallengeQuestions(challengeQuestions, SUPER_TENANT); - - // delete all added challenge questions in the en_US locale - challengeQuestionsAdminClient.deleteChallengeQuestions(new ChallengeQuestion[]{challengeQuestionSet1}, - SUPER_TENANT); - - // retrieve challenge questions once again. - challengeQuestions = - challengeQuestionsAdminClient.getChallengeQuestionsForLocale(SUPER_TENANT, BOB_LOCALE); - - int numberOfQuestions = challengeQuestions == null ? 0 : challengeQuestions.length; - // now we shouldn't have challenge questions. - assertTrue(numberOfQuestions == 0); - - } - - @Test(groups = "wso2.is", description = "Get default questions if the locale doesn't have any questions set.", - priority = 7, sequential = true) - public void getDefaultChallengeQuestionsForUser() throws Exception { - challengeQuestionsAdminClient = new ChallengeQuestionMgtAdminClient(backendURL, BOB_USERNAME, BOB_PASSWORD); - - User bob = new User(); - bob.setUserName(BOB_USERNAME); - bob.setTenantDomain(SUPER_TENANT); - - // we need to confirm there are no challenge questions in Bob's locale - ChallengeQuestion[] localeQuestions = - challengeQuestionsAdminClient.getChallengeQuestionsForLocale(SUPER_TENANT, BOB_LOCALE); - int bobLocale = localeQuestions == null ? 0 : localeQuestions.length; - assertTrue(bobLocale == 0, "Cannot have challenge questions in " + BOB_LOCALE); - - // this should return us with default questions since Bob's locale doesn't have any challenge questions. - int count = challengeQuestionsAdminClient.getChallengeQuestionsForUser(bob).length; - assertTrue(count > 1, "Default Challenge Questions not retrieved for user : " + bob.toString()); - } - - - @Test(groups = "wso2.is", description = "Testing cross tenant access.") - public void checkSaaSAccess() throws Exception { - challengeQuestionsAdminClient = new ChallengeQuestionMgtAdminClient(backendURL, BOB_USERNAME, BOB_PASSWORD); - try { - challengeQuestionsAdminClient.getChallengeQuestionsForTenant(WSO2_TENANT); - fail(SUPER_TENANT + " user was able to access challenge questions in " + WSO2_TENANT); - } catch (Exception ex) { - assertTrue(ex.getMessage().contains("Unauthorized Access")); - } - } - - - @AfterClass(alwaysRun = true) - public void atEnd() throws Exception { - challengeQuestionsAdminClient = null; - loginManger.logOut(); - - } - - - private void createUsersAndRoles() throws Exception { - - try { - log.info("Creating user : " + BOB_USERNAME); - remoteUSMServiceClient.addUser(BOB_USERNAME, BOB_PASSWORD, null, null, PROFILE_NAME, false); - } catch (Exception ex) { - fail("Exception when creating users.", ex); - } - - try { - remoteUSMServiceClient.setUserClaimValue(BOB_USERNAME, LOCALITY_CLAIM_URI, BOB_LOCALE, null); - } catch (Exception ex) { - fail("Exception when setting locale claim for users."); - } - - try { - // assign them login permissions via testRole - log.info("Creating " + LOGIN_ROLE + " role and assigning to created users."); - userMgtClient.addRole(LOGIN_ROLE, new String[]{BOB_USERNAME}, new String[]{LOGIN_PERMISSION, - SET_CHALLENGE_QUESTIONS_PERMISSION}, false); - - } catch (Exception ex) { - fail("Exception when assigning roles with login permission to users."); - } - } - - private void deleteUsersAndRoles() { - try { - log.info("Deleting user : " + BOB_USERNAME); - userMgtClient.deleteUser(BOB_USERNAME); - } catch (Exception e) { - fail("Exception when deleting users", e); - } - - try { - log.info("Deleting Role : " + LOGIN_ROLE); - userMgtClient.deleteRole(LOGIN_ROLE); - } catch (Exception e) { - fail("Exception when deleting " + LOGIN_ROLE + " role.", e); - } - - } - - -} diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/oauth2/OAuth2ServiceAbstractIntegrationTest.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/oauth2/OAuth2ServiceAbstractIntegrationTest.java index 92cfa597811..448e370e13b 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/oauth2/OAuth2ServiceAbstractIntegrationTest.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/oauth2/OAuth2ServiceAbstractIntegrationTest.java @@ -81,8 +81,6 @@ public class OAuth2ServiceAbstractIntegrationTest extends ISIntegrationTest { protected static final String EMAIL_CLAIM_URI = "http://wso2.org/claims/emailaddress"; private static final String GIVEN_NAME_CLAIM_URI = "http://wso2.org/claims/givenname"; protected static final String COUNTRY_CLAIM_URI = "http://wso2.org/claims/country"; - private static final String customClaimURI1 = "http://wso2.org/claims/challengeQuestion1"; - private static final String customClaimURI2 = "http://wso2.org/claims/challengeQuestion2"; private static final String GRANT_TYPE_PASSWORD = "password"; private static final String SCOPE_PRODUCTION = "PRODUCTION"; public static final String OIDC = "oidc"; @@ -355,12 +353,6 @@ private ClaimConfiguration getClaimConfigurations() { claimConfiguration.addClaimMappingsItem(getClaimMapping(COUNTRY_CLAIM_URI)); claimConfiguration.addRequestedClaimsItem(getRequestedClaim(COUNTRY_CLAIM_URI)); - claimConfiguration.addClaimMappingsItem(getClaimMapping(customClaimURI1)); - claimConfiguration.addRequestedClaimsItem(getRequestedClaim(customClaimURI1)); - - claimConfiguration.addClaimMappingsItem(getClaimMapping(customClaimURI2)); - claimConfiguration.addRequestedClaimsItem(getRequestedClaim(customClaimURI2)); - return claimConfiguration; } diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/oauth2/OAuth2ServiceAuthCodeGrantOpenIdRequestObjectTestCase.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/oauth2/OAuth2ServiceAuthCodeGrantOpenIdRequestObjectTestCase.java index 485f70104fd..b807e90a15f 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/oauth2/OAuth2ServiceAuthCodeGrantOpenIdRequestObjectTestCase.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/oauth2/OAuth2ServiceAuthCodeGrantOpenIdRequestObjectTestCase.java @@ -79,10 +79,6 @@ public class OAuth2ServiceAuthCodeGrantOpenIdRequestObjectTestCase extends OAuth public static final String ENCODED_OIDC_CLAIM_DIALECT = "aHR0cDovL3dzbzIub3JnL29pZGMvY2xhaW0"; private static final String USERS_PATH = "users"; - private static final String CHALLENGE_QUESTION_SET_ID1 = "challengeQuestion1"; - private static final String CHALLENGE_QUESTION_SET_ID2 = "challengeQuestion2"; - private static final String CHALLENGE_QUESTION_SET1_Q1 = "City where you were born ?"; - private static final String CHALLENGE_QUESTION_SET2_Q1 = "Model of your first car ?"; private static final String LOCALE = "en_US"; private ServerConfigurationManager serverConfigurationManager; @@ -104,8 +100,6 @@ public class OAuth2ServiceAuthCodeGrantOpenIdRequestObjectTestCase extends OAuth private static final String emailClaimURI = "http://wso2.org/claims/emailaddress"; private static final String givenNameClaimURI = "http://wso2.org/claims/givenname"; private static final String countryClaimURI = "http://wso2.org/claims/country"; - private static final String customClaimURI1 = "http://wso2.org/claims/challengeQuestion1"; - private static final String customClaimURI2 = "http://wso2.org/claims/challengeQuestion2"; private static final String externalClaimURI1 = "externalClaim1"; private static final String externalClaimURI2 = "externalClaim2"; private static final String USER_EMAIL = "abcrqo@wso2.com"; @@ -126,7 +120,6 @@ public class OAuth2ServiceAuthCodeGrantOpenIdRequestObjectTestCase extends OAuth private SCIM2RestClient scim2RestClient; private ClaimManagementRestClient claimManagementRestClient; - private ChallengeQuestionsRestClient challengeQuestionsRestClient; private String applicationId; private String userId; @@ -165,12 +158,9 @@ public void testInit() throws Exception { setSystemproperties(); scim2RestClient = new SCIM2RestClient(serverURL, tenantInfo); - challengeQuestionsRestClient = new ChallengeQuestionsRestClient(serverURL, tenantInfo); claimManagementRestClient = new ClaimManagementRestClient(serverURL, tenantInfo); addAdminUser(); - claimId1 = addOIDCClaims(externalClaimURI1, customClaimURI1); - claimId2 = addOIDCClaims(externalClaimURI2, customClaimURI2); } @@ -195,7 +185,6 @@ public void atEnd() throws Exception { restClient.closeHttpClient(); scim2RestClient.closeHttpClient(); claimManagementRestClient.closeHttpClient(); - challengeQuestionsRestClient.closeHttpClient(); client.close(); } @@ -448,16 +437,5 @@ private void addAdminUser() throws Exception { patchRoleItem.addValue(new ListObject().value(userId)); scim2RestClient.updateUserRole(new PatchOperationRequestObject().addOperations(patchRoleItem), roleId); - - setChallengeQuestion(CHALLENGE_QUESTION_SET_ID1, CHALLENGE_QUESTION_SET1_Q1, CUSTOM_CLAIM1); - setChallengeQuestion(CHALLENGE_QUESTION_SET_ID2, CHALLENGE_QUESTION_SET2_Q1, CUSTOM_CLAIM2); - } - - private void setChallengeQuestion(String questionSetId, String question, String answer) throws Exception { - UserChallengeAnswer challengeQuestionObj = new UserChallengeAnswer(); - challengeQuestionObj.setChallengeQuestion(new Questions(LOCALE, question, null)); - challengeQuestionObj.setAnswer(answer); - - challengeQuestionsRestClient.setChallengeQuestionAnswer(userId, questionSetId, challengeQuestionObj); } } diff --git a/modules/integration/tests-integration/tests-backend/src/test/resources/testng.xml b/modules/integration/tests-integration/tests-backend/src/test/resources/testng.xml index d0659a90e2c..bf36a7fd396 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/resources/testng.xml +++ b/modules/integration/tests-integration/tests-backend/src/test/resources/testng.xml @@ -50,7 +50,6 @@ - @@ -118,7 +117,8 @@ - + + @@ -138,8 +138,9 @@ - - + + + @@ -157,7 +158,8 @@ - + + diff --git a/pom.xml b/pom.xml index f6fdc6c7e7b..0942c8110ad 100755 --- a/pom.xml +++ b/pom.xml @@ -1175,11 +1175,6 @@ org.wso2.carbon.identity.recovery ${identity.governance.version} - - org.wso2.carbon.identity.governance - org.wso2.carbon.identity.recovery.stub - ${identity.governance.version} - org.wso2.carbon.deployment org.wso2.carbon.service.mgt.stub