Search in sources :

Example 16 with SAMLSSOConfigServiceClient

use of org.wso2.identity.integration.common.clients.sso.saml.SAMLSSOConfigServiceClient in project product-is by wso2.

the class RegistryMountTestCase method testInit.

@BeforeClass(alwaysRun = true)
public void testInit() throws Exception {
    super.init();
    logManger = new AuthenticatorClient(backendURL);
    serverConfigurationManager = new ServerConfigurationManager(isServer);
    tenantServiceClient = new TenantManagementServiceClient(isServer.getContextUrls().getBackEndUrl(), sessionCookie);
    tenantServiceClient.addTenant(TENANT_DOMAIN, TENANT_ADMIN_TENANT_AWARE_USERNAME, TENANT_ADMIN_PASSWORD, TENANT_ADMIN_USERNAME, "Registry", "Mount");
    sessionCookie = this.logManger.login(TENANT_ADMIN_USERNAME, TENANT_ADMIN_PASSWORD, isServer.getInstance().getHosts().get(profileName));
    configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(null, null);
    applicationManagementServiceClient = new ApplicationManagementServiceClient(sessionCookie, backendURL, configContext);
    ssoConfigServiceClient = new SAMLSSOConfigServiceClient(backendURL, sessionCookie);
    httpClient = new DefaultHttpClient();
    createApplication();
    ssoConfigServiceClient.addServiceProvider(createSsoServiceProviderDTO());
    userId = UserUtil.getUserId(MultitenantUtils.getTenantAwareUsername(TENANT_ADMIN_USERNAME), TENANT_DOMAIN, TENANT_ADMIN_USERNAME, TENANT_ADMIN_PASSWORD);
}
Also used : AuthenticatorClient(org.wso2.carbon.integration.common.admin.client.AuthenticatorClient) ServerConfigurationManager(org.wso2.carbon.integration.common.utils.mgt.ServerConfigurationManager) ApplicationManagementServiceClient(org.wso2.identity.integration.common.clients.application.mgt.ApplicationManagementServiceClient) SAMLSSOConfigServiceClient(org.wso2.identity.integration.common.clients.sso.saml.SAMLSSOConfigServiceClient) TenantManagementServiceClient(org.wso2.identity.integration.common.clients.TenantManagementServiceClient) DefaultHttpClient(org.apache.http.impl.client.DefaultHttpClient) BeforeClass(org.testng.annotations.BeforeClass)

Example 17 with SAMLSSOConfigServiceClient

use of org.wso2.identity.integration.common.clients.sso.saml.SAMLSSOConfigServiceClient in project product-is by wso2.

the class ConditionalAuthenticationTestCase method startSecondaryIS.

private void startSecondaryIS() throws Exception {
    AutomationContext context = testDataHolder.getAutomationContext();
    String serviceUrl = (context.getContextUrls().getSecureServiceUrl()).replace("9853", String.valueOf(IS_DEFAULT_HTTPS_PORT + PORT_OFFSET_1)) + "/";
    AuthenticatorClient authenticatorClient = new AuthenticatorClient(serviceUrl);
    sessionCookie = authenticatorClient.login(context.getSuperTenant().getTenantAdmin().getUserName(), context.getSuperTenant().getTenantAdmin().getPassword(), context.getDefaultInstance().getHosts().get("default"));
    if (sessionCookie != null) {
        ConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(null, null);
        applicationManagementServiceClient2 = new ApplicationManagementServiceClient(sessionCookie, serviceUrl, configContext);
        samlSSOConfigServiceClient = new SAMLSSOConfigServiceClient(serviceUrl, sessionCookie);
    }
}
Also used : AutomationContext(org.wso2.carbon.automation.engine.context.AutomationContext) ConfigurationContext(org.apache.axis2.context.ConfigurationContext) AuthenticatorClient(org.wso2.carbon.integration.common.admin.client.AuthenticatorClient) ApplicationManagementServiceClient(org.wso2.identity.integration.common.clients.application.mgt.ApplicationManagementServiceClient) SAMLSSOConfigServiceClient(org.wso2.identity.integration.common.clients.sso.saml.SAMLSSOConfigServiceClient)

Example 18 with SAMLSSOConfigServiceClient

use of org.wso2.identity.integration.common.clients.sso.saml.SAMLSSOConfigServiceClient in project product-is by wso2.

the class ApplicationAuthzTenantTestCase method testInit.

@BeforeClass(alwaysRun = true)
public void testInit() throws Exception {
    super.init(TestUserMode.TENANT_ADMIN);
    ConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(null, null);
    applicationManagementServiceClient = new ApplicationManagementServiceClient(sessionCookie, backendURL, configContext);
    ssoConfigServiceClient = new SAMLSSOConfigServiceClient(backendURL, sessionCookie);
    remoteUSMServiceClient = new RemoteUserStoreManagerServiceClient(backendURL, sessionCookie);
    entitlementPolicyClient = new EntitlementPolicyServiceClient(backendURL, sessionCookie);
    httpClientAzUser = HttpClientBuilder.create().setDefaultCookieStore(new BasicCookieStore()).build();
    httpClientNonAzUser = HttpClientBuilder.create().setDefaultCookieStore(new BasicCookieStore()).build();
    createRole(AZ_TEST_TENANT_ROLE);
    createUser(AZ_TEST_TENANT_USER, AZ_TEST_TENANT_USER_PW, new String[] { AZ_TEST_TENANT_ROLE });
    userId = UserUtil.getUserId(MultitenantUtils.getTenantAwareUsername(AZ_TEST_TENANT_USER), isServer.getContextTenant());
    createUser(NON_AZ_TEST_TENANT_USER, NON_AZ_TEST_TENANT_USER_PW, new String[0]);
    createApplication(APPLICATION_NAME);
    createSAMLApp(APPLICATION_NAME, true, false, false);
    setupXACMLPolicy(POLICY_ID, POLICY);
}
Also used : ConfigurationContext(org.apache.axis2.context.ConfigurationContext) BasicCookieStore(org.apache.http.impl.client.BasicCookieStore) ApplicationManagementServiceClient(org.wso2.identity.integration.common.clients.application.mgt.ApplicationManagementServiceClient) SAMLSSOConfigServiceClient(org.wso2.identity.integration.common.clients.sso.saml.SAMLSSOConfigServiceClient) RemoteUserStoreManagerServiceClient(org.wso2.identity.integration.common.clients.usermgt.remote.RemoteUserStoreManagerServiceClient) EntitlementPolicyServiceClient(org.wso2.identity.integration.common.clients.entitlement.EntitlementPolicyServiceClient) BeforeClass(org.testng.annotations.BeforeClass)

Example 19 with SAMLSSOConfigServiceClient

use of org.wso2.identity.integration.common.clients.sso.saml.SAMLSSOConfigServiceClient in project product-is by wso2.

the class EmailOTPTestCase method testInit.

@BeforeClass(alwaysRun = true)
public void testInit() throws Exception {
    super.init();
    changeISConfiguration();
    // Re-initiating after the restart.
    super.init(config.getUserMode());
    ConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(null, null);
    applicationManagementServiceClient = new ApplicationManagementServiceClient(sessionCookie, backendURL, configContext);
    ssoConfigServiceClient = new SAMLSSOConfigServiceClient(backendURL, sessionCookie);
    identityProviderMgtServiceClient = new IdentityProviderMgtServiceClient(sessionCookie, backendURL, configContext);
    remoteUSMServiceClient = new RemoteUserStoreManagerServiceClient(backendURL, sessionCookie);
    httpClient = HttpClientBuilder.create().setDefaultCookieStore(new BasicCookieStore()).build();
    createUser();
    createApplication();
}
Also used : ConfigurationContext(org.apache.axis2.context.ConfigurationContext) BasicCookieStore(org.apache.http.impl.client.BasicCookieStore) ApplicationManagementServiceClient(org.wso2.identity.integration.common.clients.application.mgt.ApplicationManagementServiceClient) SAMLSSOConfigServiceClient(org.wso2.identity.integration.common.clients.sso.saml.SAMLSSOConfigServiceClient) RemoteUserStoreManagerServiceClient(org.wso2.identity.integration.common.clients.usermgt.remote.RemoteUserStoreManagerServiceClient) IdentityProviderMgtServiceClient(org.wso2.identity.integration.common.clients.Idp.IdentityProviderMgtServiceClient) BeforeClass(org.testng.annotations.BeforeClass)

Example 20 with SAMLSSOConfigServiceClient

use of org.wso2.identity.integration.common.clients.sso.saml.SAMLSSOConfigServiceClient in project product-is by wso2.

the class AbstractAnalyticsLoginTestCase method testInit.

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();
    createApplication();
}
Also used : ConfigurationContext(org.apache.axis2.context.ConfigurationContext) ApplicationManagementServiceClient(org.wso2.identity.integration.common.clients.application.mgt.ApplicationManagementServiceClient) SAMLSSOConfigServiceClient(org.wso2.identity.integration.common.clients.sso.saml.SAMLSSOConfigServiceClient) RemoteUserStoreManagerServiceClient(org.wso2.identity.integration.common.clients.usermgt.remote.RemoteUserStoreManagerServiceClient)

Aggregations

SAMLSSOConfigServiceClient (org.wso2.identity.integration.common.clients.sso.saml.SAMLSSOConfigServiceClient)20 ApplicationManagementServiceClient (org.wso2.identity.integration.common.clients.application.mgt.ApplicationManagementServiceClient)17 BeforeClass (org.testng.annotations.BeforeClass)15 ConfigurationContext (org.apache.axis2.context.ConfigurationContext)11 RemoteUserStoreManagerServiceClient (org.wso2.identity.integration.common.clients.usermgt.remote.RemoteUserStoreManagerServiceClient)7 AuthenticatorClient (org.wso2.carbon.integration.common.admin.client.AuthenticatorClient)6 BasicCookieStore (org.apache.http.impl.client.BasicCookieStore)5 IdentityProviderMgtServiceClient (org.wso2.identity.integration.common.clients.Idp.IdentityProviderMgtServiceClient)5 InboundAuthenticationConfig (org.wso2.carbon.identity.application.common.model.xsd.InboundAuthenticationConfig)2 InboundAuthenticationRequestConfig (org.wso2.carbon.identity.application.common.model.xsd.InboundAuthenticationRequestConfig)2 Property (org.wso2.carbon.identity.application.common.model.xsd.Property)2 RequestPathAuthenticatorConfig (org.wso2.carbon.identity.application.common.model.xsd.RequestPathAuthenticatorConfig)2 ServiceProvider (org.wso2.carbon.identity.application.common.model.xsd.ServiceProvider)2 ServerConfigurationManager (org.wso2.carbon.integration.common.utils.mgt.ServerConfigurationManager)2 TenantManagementServiceClient (org.wso2.identity.integration.common.clients.TenantManagementServiceClient)2 EntitlementPolicyServiceClient (org.wso2.identity.integration.common.clients.entitlement.EntitlementPolicyServiceClient)2 OauthAdminClient (org.wso2.identity.integration.common.clients.oauth.OauthAdminClient)2 File (java.io.File)1 DefaultHttpClient (org.apache.http.impl.client.DefaultHttpClient)1 AutomationContext (org.wso2.carbon.automation.engine.context.AutomationContext)1