use of org.wso2.identity.integration.common.clients.entitlement.EntitlementPolicyServiceClient in project product-is by wso2.
the class ApplicationAuthzTestCase 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);
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_ROLE);
createUser(AZ_TEST_USER, AZ_TEST_USER_PW, new String[] { AZ_TEST_ROLE });
userId = UserUtil.getUserId(MultitenantUtils.getTenantAwareUsername(AZ_TEST_USER), isServer.getContextTenant());
createUser(NON_AZ_TEST_USER, NON_AZ_TEST_USER_PW, new String[0]);
createApplication(APPLICATION_NAME);
createSAMLApp(APPLICATION_NAME, true, true, true);
setupXACMLPolicy(POLICY_ID, POLICY);
}
use of org.wso2.identity.integration.common.clients.entitlement.EntitlementPolicyServiceClient in project product-is by wso2.
the class EntitlementPIPAttributeCacheTestCase method destroy.
@AfterClass(alwaysRun = true)
public void destroy() throws Exception {
// Remove added policy
entitlementPolicyClient = new EntitlementPolicyServiceClient(backendURL, sessionCookie);
entitlementPolicyClient.enableDisablePolicy(POLICY_ID, false);
entitlementPolicyClient.removePolicy(POLICY_ID);
// Copy default config file
File srcConfigFile = new File(getISResourceLocation() + File.separator + "entitlement" + File.separator + "config" + File.separator + "entitlement_default.properties");
File targetConfigFile = new File(Utils.getResidentCarbonHome() + File.separator + "repository" + File.separator + "conf" + File.separator + "identity" + File.separator + "entitlement.properties");
scm.applyConfigurationWithoutRestart(srcConfigFile, targetConfigFile, true);
// remove custom attribute finder from lib
scm.removeFromComponentLib("org.wso2.carbon.identity.custom.pip-4.2.2.jar");
scm.restartGracefully();
}
use of org.wso2.identity.integration.common.clients.entitlement.EntitlementPolicyServiceClient in project product-is by wso2.
the class EntitlementPIPAttributeCacheTestCase method testInit.
@BeforeClass(alwaysRun = true)
public void testInit() throws Exception {
super.init();
scm = new ServerConfigurationManager(isServer);
entitlementPolicyClient = new EntitlementPolicyServiceClient(backendURL, sessionCookie);
addPolicy();
addCustomAttributeFinder();
// call super init since server restart happens in previous step
super.init();
entitlementServiceClient = new EntitlementServiceClient(backendURL, sessionCookie);
}
use of org.wso2.identity.integration.common.clients.entitlement.EntitlementPolicyServiceClient in project product-is by wso2.
the class EntitlementRestServiceTestCase method testInit.
@BeforeClass(alwaysRun = true)
public void testInit() throws Exception {
super.init();
entitlementPolicyClient = new EntitlementPolicyServiceClient(backendURL, sessionCookie);
httpClient = HttpClientBuilder.create().build();
serverPort = isServer.getDefaultInstance().getPorts().get("https");
username = isServer.getContextTenant().getContextUser().getUserName();
password = isServer.getContextTenant().getContextUser().getPassword();
}
use of org.wso2.identity.integration.common.clients.entitlement.EntitlementPolicyServiceClient in project product-is by wso2.
the class EntitlementJSONSupportMultiDecisionProfileTestCase method testInit.
@BeforeClass(alwaysRun = true)
public void testInit() throws Exception {
super.init();
entitlementPolicyClient = new EntitlementPolicyServiceClient(backendURL, sessionCookie);
remoteUserStoreManagerServiceClient = new RemoteUserStoreManagerServiceClient(backendURL, sessionCookie);
PolicyDTO policy = new PolicyDTO();
policy.setPolicy(POLICY);
entitlementPolicyClient.addPolicy(policy);
entitlementPolicyClient.publishPolicies(new String[] { POLICY_ID }, new String[] { "PDP Subscriber" }, "CREATE", true, null, 1);
remoteUserStoreManagerServiceClient.addUser("adminUser", PASSWORD, new String[] { ROLE }, null, "adminUser", false);
remoteUserStoreManagerServiceClient.addUser("publicUser", PASSWORD, new String[] { ROLE }, null, "publicUser", false);
remoteUserStoreManagerServiceClient.addUser("localUser", PASSWORD, new String[] { ROLE }, null, "localUser", false);
}
Aggregations