use of org.apache.geode.security.TestPostProcessor in project geode by apache.
the class IntegratedSecurityServiceTest method testSetSecurityManager.
@Test
public void testSetSecurityManager() {
// initially
assertFalse(securityService.isIntegratedSecurity());
// init with client authenticator
properties.setProperty(SECURITY_CLIENT_AUTHENTICATOR, "org.abc.test");
securityService.initSecurity(properties);
assertFalse(securityService.isIntegratedSecurity());
assertTrue(securityService.isClientSecurityRequired());
assertFalse(securityService.isPeerSecurityRequired());
// set a security manager
securityService.setSecurityManager(new SimpleTestSecurityManager());
assertTrue(securityService.isIntegratedSecurity());
assertTrue(securityService.isClientSecurityRequired());
assertTrue(securityService.isPeerSecurityRequired());
assertFalse(securityService.needPostProcess());
// set a post processor
securityService.setPostProcessor(new TestPostProcessor());
assertTrue(securityService.isIntegratedSecurity());
assertTrue(securityService.needPostProcess());
}
Aggregations