From afb485e591d8ba6682480cfb5da7137708d8ed3d Mon Sep 17 00:00:00 2001 From: thanujalk Date: Thu, 6 Aug 2015 18:54:55 +0530 Subject: [PATCH 1/4] Fixing SAMLSSOServiceClient --- .../clients/sso/saml/SAMLSSOServiceClient.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/integration/tests-common/admin-clients/src/main/java/org/wso2/identity/integration/common/clients/sso/saml/SAMLSSOServiceClient.java b/modules/integration/tests-common/admin-clients/src/main/java/org/wso2/identity/integration/common/clients/sso/saml/SAMLSSOServiceClient.java index fbb9fe00705..0c7c6e3963d 100644 --- a/modules/integration/tests-common/admin-clients/src/main/java/org/wso2/identity/integration/common/clients/sso/saml/SAMLSSOServiceClient.java +++ b/modules/integration/tests-common/admin-clients/src/main/java/org/wso2/identity/integration/common/clients/sso/saml/SAMLSSOServiceClient.java @@ -59,12 +59,12 @@ public SAMLSSOServiceClient(String backEndUrl, String userName, String password) } - public int getSSOSessionTimeout() - throws Exception { - try { - return identitySAMLSSOServiceStub.getSSOSessionTimeout(); - } catch (RemoteException e) { - throw new RemoteException("Error while getting SSO Session timeout ", e); - } - } +// public int getSSOSessionTimeout() +// throws Exception { +// try { +// return identitySAMLSSOServiceStub.getSSOSessionTimeout(); +// } catch (RemoteException e) { +// throw new RemoteException("Error while getting SSO Session timeout ", e); +// } +// } } From b3544d8c309940b8cdcd9ddfeef6416eeb5d95dd Mon Sep 17 00:00:00 2001 From: thanujalk Date: Thu, 6 Aug 2015 20:33:56 +0530 Subject: [PATCH 2/4] SAML test cases need to be fixed --- .../test/saml/SSOSessionTimeoutTestCase.java | 16 ++++++++-------- .../tests-backend/src/test/resources/testng.xml | 12 ++++++------ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/saml/SSOSessionTimeoutTestCase.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/saml/SSOSessionTimeoutTestCase.java index 3279ea413a7..6f7a588169b 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/saml/SSOSessionTimeoutTestCase.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/saml/SSOSessionTimeoutTestCase.java @@ -52,14 +52,14 @@ public void testInit() throws Exception { super.init(); } - @Test(groups = "wso2.is", description = "Get SSO session timeout") - public void testSSOSessionTimeout() - throws Exception { - SAMLSSOServiceClient ssoServiceClient = - new SAMLSSOServiceClient(backendURL, sessionCookie); - int ssoTimeoutVal = ssoServiceClient.getSSOSessionTimeout(); - Assert.assertEquals(ssoTimeoutVal,"120"); - } +// @Test(groups = "wso2.is", description = "Get SSO session timeout") +// public void testSSOSessionTimeout() +// throws Exception { +// SAMLSSOServiceClient ssoServiceClient = +// new SAMLSSOServiceClient(backendURL, sessionCookie); +// int ssoTimeoutVal = ssoServiceClient.getSSOSessionTimeout(); +// Assert.assertEquals(ssoTimeoutVal,"120"); +// } /** * Replace identity.xml file with the original one in the IS pack. 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 4a2d81a8d68..51f496f0fdf 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 @@ -74,15 +74,15 @@ - + - - - - - + + + + + \ No newline at end of file From 72dc60d4a972ea46dbaa4e7fbf20b158b16e53e2 Mon Sep 17 00:00:00 2001 From: thanujalk Date: Thu, 6 Aug 2015 22:47:57 +0530 Subject: [PATCH 3/4] Fixing SAML SSO test case --- .../saml/SAMLIdentityFederationTestCase.java | 3 ++- .../integration/test/saml/SAMLSSOTestCase.java | 4 +++- .../test/sts/TestPassiveSTSFederation.java | 3 ++- .../tests-backend/src/test/resources/testng.xml | 16 ++++++++-------- 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/saml/SAMLIdentityFederationTestCase.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/saml/SAMLIdentityFederationTestCase.java index af57af63be5..7a81b4bb0eb 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/saml/SAMLIdentityFederationTestCase.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/saml/SAMLIdentityFederationTestCase.java @@ -376,7 +376,8 @@ private SAMLSSOServiceProviderDTO getSAMLSSOServiceProviderDTO(String issuerName SAMLSSOServiceProviderDTO samlssoServiceProviderDTO = new SAMLSSOServiceProviderDTO(); samlssoServiceProviderDTO.setIssuer(issuerName); - samlssoServiceProviderDTO.setAssertionConsumerUrl(acsUrl); + samlssoServiceProviderDTO.setAssertionConsumerUrls(new String[]{acsUrl}); + samlssoServiceProviderDTO.setDefaultAssertionConsumerUrl(acsUrl); samlssoServiceProviderDTO.setNameIDFormat(SAML_NAME_ID_FORMAT); samlssoServiceProviderDTO.setDoSignAssertions(true); samlssoServiceProviderDTO.setDoSignResponse(true); diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/saml/SAMLSSOTestCase.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/saml/SAMLSSOTestCase.java index 2ff05bf8c83..24331f9835a 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/saml/SAMLSSOTestCase.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/saml/SAMLSSOTestCase.java @@ -593,7 +593,9 @@ private void deleteUser(){ private SAMLSSOServiceProviderDTO createSsoServiceProviderDTO() { SAMLSSOServiceProviderDTO samlssoServiceProviderDTO = new SAMLSSOServiceProviderDTO(); samlssoServiceProviderDTO.setIssuer(config.getApp().getArtifact()); - samlssoServiceProviderDTO.setAssertionConsumerUrl(String.format(ACS_URL, config.getApp().getArtifact())); + samlssoServiceProviderDTO.setAssertionConsumerUrls(new String[] {String.format(ACS_URL, + config.getApp().getArtifact())}); + samlssoServiceProviderDTO.setDefaultAssertionConsumerUrl(String.format(ACS_URL, config.getApp().getArtifact())); samlssoServiceProviderDTO.setAttributeConsumingServiceIndex(ATTRIBUTE_CS_INDEX_VALUE); samlssoServiceProviderDTO.setNameIDFormat(NAMEID_FORMAT); samlssoServiceProviderDTO.setDoSignAssertions(config.getApp().isSigningEnabled()); diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/sts/TestPassiveSTSFederation.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/sts/TestPassiveSTSFederation.java index 58818214e09..1a6790e5f19 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/sts/TestPassiveSTSFederation.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/sts/TestPassiveSTSFederation.java @@ -399,7 +399,8 @@ private SAMLSSOServiceProviderDTO getSAMLSSOServiceProviderDTO(String issuerName SAMLSSOServiceProviderDTO samlssoServiceProviderDTO = new SAMLSSOServiceProviderDTO(); samlssoServiceProviderDTO.setIssuer(issuerName); - samlssoServiceProviderDTO.setAssertionConsumerUrl(acsUrl); + samlssoServiceProviderDTO.setAssertionConsumerUrls(new String[]{acsUrl}); + samlssoServiceProviderDTO.setDefaultAssertionConsumerUrl(acsUrl); samlssoServiceProviderDTO.setNameIDFormat(SAML_NAME_ID_FORMAT); samlssoServiceProviderDTO.setDoSignAssertions(true); samlssoServiceProviderDTO.setDoSignResponse(true); 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 51f496f0fdf..d105ba496f1 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 @@ -47,9 +47,9 @@ - + - + @@ -74,15 +74,15 @@ - + - - - - - + + + + + \ No newline at end of file From 97b6fe4a127b31b16b7eff302a69e61ad0f518bf Mon Sep 17 00:00:00 2001 From: thanujalk Date: Thu, 6 Aug 2015 22:50:14 +0530 Subject: [PATCH 4/4] Fixing SAML SSO test case --- .../tests-backend/src/test/resources/testng.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 d105ba496f1..4a2d81a8d68 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 @@ -47,9 +47,9 @@ - + - +