use of org.wso2.identity.integration.common.clients.TenantManagementServiceClient in project product-is by wso2.
the class UserInformationRecoveryServiceTenantEmailUserTestCase method testInit.
@SetEnvironment(executionEnvironments = { ExecutionEnvironment.ALL })
@BeforeClass(alwaysRun = true)
public void testInit() throws Exception {
super.init();
String carbonHome = Utils.getResidentCarbonHome();
identityMgtServerFile = new File(carbonHome + File.separator + "repository" + File.separator + "conf" + File.separator + "identity" + File.separator + "identity-mgt.properties");
File identityMgtConfigFile = new File(getISResourceLocation() + File.separator + "identityMgt" + File.separator + "identity-mgt-enabled.properties");
File defaultTomlFile = getDeploymentTomlFile(carbonHome);
File configuredTomlFile = new File(getISResourceLocation() + File.separator + "identityMgt" + File.separator + "user_mgt_regex_changed.toml");
scm = new ServerConfigurationManager(isServer);
scm.applyConfigurationWithoutRestart(identityMgtConfigFile, identityMgtServerFile, true);
scm.applyConfigurationWithoutRestart(configuredTomlFile, defaultTomlFile, true);
scm.restartGracefully();
super.init();
tenantServiceClient = new TenantManagementServiceClient(isServer.getContextUrls().getBackEndUrl(), sessionCookie);
tenantServiceClient.addTenant(TENANT_DOMAIN, TENANT_ADMIN_TENANT_AWARE_USERNAME, TENANT_ADMIN_PASSWORD, TENANT_ADMIN_USERNAME, "Info", "Recovery");
loginManger = new AuthenticatorClient(backendURL);
sessionCookie = this.loginManger.login(TENANT_ADMIN_USERNAME, TENANT_ADMIN_PASSWORD, isServer.getInstance().getHosts().get(profileName));
userMgtClient = new UserManagementClient(backendURL, sessionCookie);
infoRecoveryClient = new UserInformationRecoveryServiceClient(backendURL, sessionCookie);
userMgtClient.addUser(TENANT_USER, "passWord1@", null, profileName);
}
use of org.wso2.identity.integration.common.clients.TenantManagementServiceClient in project product-is by wso2.
the class DBSeperationTestCase method setUp.
@BeforeClass(alwaysRun = true)
public void setUp() throws Exception {
String carbonHome = Utils.getResidentCarbonHome();
File defaultTomlFile = getDeploymentTomlFile(carbonHome);
File configuredTomlFile = new File(getISResourceLocation() + File.separator + File.separator + "provisioning" + File.separator + "db_separation_config.toml");
super.init();
serverConfigurationManager = new ServerConfigurationManager(isServer);
serverConfigurationManager.applyConfigurationWithoutRestart(configuredTomlFile, defaultTomlFile, true);
serverConfigurationManager.restartGracefully();
super.init();
TenantManagementServiceClient tenantServiceClient = new TenantManagementServiceClient(backendURL, sessionCookie);
tenantServiceClient.addTenant(TENANT_DOMAIN, TENANT_ADMIN, "password", TENANT_ADMIN + "@" + TENANT_DOMAIN, TENANT_ADMIN, "User");
identityProviderMgtServiceClient = new IdentityProviderMgtServiceClient(TENANT_ADMIN + "@" + TENANT_DOMAIN, "password", backendURL);
}
use of org.wso2.identity.integration.common.clients.TenantManagementServiceClient 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);
}
use of org.wso2.identity.integration.common.clients.TenantManagementServiceClient 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);
}
use of org.wso2.identity.integration.common.clients.TenantManagementServiceClient in project product-is by wso2.
the class RetrieveResidentIdPEntityIdTestCase method testInit.
@BeforeClass(alwaysRun = true)
public void testInit() throws Exception {
super.init();
changeISConfiguration();
super.init();
tenantServiceClient = new TenantManagementServiceClient(isServer.getContextUrls().getBackEndUrl(), sessionCookie);
}
Aggregations