use of org.wso2.identity.integration.common.clients.sso.saml.SAMLSSOConfigServiceClient in project product-is by wso2.
the class ChallengeQuestionPostAuthnHandlerTestCase method testInit.
@BeforeClass(alwaysRun = true)
public void testInit() throws Exception {
super.init(config.getUserMode());
ConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(null, null);
applicationManagementServiceClient = new ApplicationManagementServiceClient(sessionCookie, backendURL, configContext);
ssoConfigServiceClient = new SAMLSSOConfigServiceClient(backendURL, sessionCookie);
remoteUSMServiceClient = new RemoteUserStoreManagerServiceClient(backendURL, sessionCookie);
createUser();
userId = UserUtil.getUserId(config.getUser().getTenantAwareUsername(), isServer.getContextTenant());
createApplication();
AuthenticatorClient logManager = new AuthenticatorClient(backendURL);
String secondaryTenantDomain = isServer.getTenantList().get(1);
String tenantCookie = logManager.login(ADMIN + "@" + secondaryTenantDomain, ADMIN, isServer.getInstance().getHosts().get("default"));
superTenantIDPMgtClient = new IdentityProviderMgtServiceClient(sessionCookie, backendURL);
tenantIDPMgtClient = new IdentityProviderMgtServiceClient(tenantCookie, backendURL);
superTenantResidentIDP = superTenantIDPMgtClient.getResidentIdP();
}
use of org.wso2.identity.integration.common.clients.sso.saml.SAMLSSOConfigServiceClient in project product-is by wso2.
the class UserSessionTest method testInitData.
@BeforeClass(alwaysRun = true)
public void testInitData() throws Exception {
appMgtclient = new ApplicationManagementServiceClient(sessionCookie, backendURL, null);
userMgtClient = new UserManagementClient(backendURL, sessionCookie);
ssoConfigServiceClient = new SAMLSSOConfigServiceClient(backendURL, sessionCookie);
isURL = backendURL.substring(0, backendURL.indexOf("services/"));
serviceProviderTravelocity = createServiceProvider(ISSUER_TRAVELOCITY_COM, SERVICE_PROVIDER_NAME_TRAVELOCITY);
serviceProviderAvis = createServiceProvider(ISSUER_AVIS_COM, SERVICE_PROVIDER_NAME_AVIS);
createUsersForTesting();
createSessionsForTesting();
}
use of org.wso2.identity.integration.common.clients.sso.saml.SAMLSSOConfigServiceClient in project product-is by wso2.
the class SAMLErrorResponseTestCase method testInit.
@BeforeClass(alwaysRun = true)
public void testInit() throws Exception {
super.init(TestUserMode.SUPER_TENANT_ADMIN);
ConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(null, null);
applicationManagementServiceClient = new ApplicationManagementServiceClient(sessionCookie, backendURL, configContext);
ssoConfigServiceClient = new SAMLSSOConfigServiceClient(backendURL, sessionCookie);
httpClient = HttpClientBuilder.create().setDefaultCookieStore(cookieStore).build();
createApplication();
}
use of org.wso2.identity.integration.common.clients.sso.saml.SAMLSSOConfigServiceClient in project product-is by wso2.
the class SAMLFederationDynamicQueryParametersTestCase method initTest.
@BeforeClass(alwaysRun = true)
public void initTest() throws Exception {
super.initTest();
String userName = userInfo.getUserName();
String password = userInfo.getPassword();
appMgtclient = new ApplicationManagementServiceClient(sessionCookie, backendURL, null);
idpMgtClient = new IdentityProviderMgtServiceClient(userName, password, backendURL);
ssoConfigServiceClient = new SAMLSSOConfigServiceClient(backendURL, userName, password);
}
use of org.wso2.identity.integration.common.clients.sso.saml.SAMLSSOConfigServiceClient in project product-is by wso2.
the class TenantDropDownTestCase method setUp.
@BeforeClass(alwaysRun = true)
public void setUp() throws Exception {
super.init();
applicationAuthenticationXml = new File(CarbonUtils.getCarbonHome() + File.separator + "repository" + File.separator + "conf" + File.separator + "identity" + File.separator + "application-authentication.xml");
File applicationAuthenticationXmlToCopy = new File(FrameworkPathUtil.getSystemResourceLocation() + "artifacts" + File.separator + "IS" + File.separator + "tenantDropdown" + File.separator + "application-authentication-tanantDropdown-enabled.xml");
authenticatorsXml = new File(CarbonUtils.getCarbonHome() + File.separator + "repository" + File.separator + "conf" + File.separator + "security" + File.separator + "authenticators.xml");
File authenticatorsXmlToCopy = new File(FrameworkPathUtil.getSystemResourceLocation() + "artifacts" + File.separator + "IS" + File.separator + "tenantDropdown" + File.separator + "authenticators-tenantDropdown-enabled.xml");
catalinaServerXml = new File(CarbonUtils.getCarbonHome() + File.separator + "repository" + File.separator + "conf" + File.separator + "tomcat" + File.separator + "catalina-server.xml");
File catalinaServerXmlToCopy = new File(FrameworkPathUtil.getSystemResourceLocation() + "artifacts" + File.separator + "IS" + File.separator + "tenantDropdown" + File.separator + "catalina-server-tanantDropdown-enabled.xml");
endpointConfigProperties = new File(CarbonUtils.getCarbonHome() + File.separator + "repository" + File.separator + "conf" + File.separator + "identity" + File.separator + "EndpointConfig.properties");
File endpointConfigPropertiesToCopy = new File(FrameworkPathUtil.getSystemResourceLocation() + "artifacts" + File.separator + "IS" + File.separator + "tenantDropdown" + File.separator + "EndpointConfigTenantDropdownEnabled.properties");
userIdentityMgt = new ServerConfigurationManager(isServer);
userIdentityMgt.applyConfigurationWithoutRestart(applicationAuthenticationXmlToCopy, applicationAuthenticationXml, true);
userIdentityMgt.applyConfigurationWithoutRestart(authenticatorsXmlToCopy, authenticatorsXml, true);
userIdentityMgt.applyConfigurationWithoutRestart(catalinaServerXmlToCopy, catalinaServerXml, true);
userIdentityMgt.applyConfigurationWithoutRestart(endpointConfigPropertiesToCopy, endpointConfigProperties, true);
userIdentityMgt.restartGracefully();
super.init();
ConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(null, null);
driver = BrowserManager.getWebDriver();
tenantServiceClient = new TenantManagementServiceClient(isServer.getContextUrls().getBackEndUrl(), sessionCookie);
tenantServiceClient.addTenant(TENANT_DOMAIN, "admin", "password", "admin@dropdown.com", "Dropdown", "User");
ssoConfigServiceClient = new SAMLSSOConfigServiceClient(backendURL, sessionCookie);
applicationManagementServiceClient = new ApplicationManagementServiceClient(sessionCookie, backendURL, configContext);
ssoConfigServiceClient.addServiceProvider(createSsoServiceProviderDTO());
createApplication();
driver.get(isServer.getContextUrls().getWebAppURLHttps() + "/samlsso?spEntityID=" + SAML_ISSUER);
}
Aggregations