Examples of MemoryRoleServiceConfigImpl


Examples of org.geoserver.security.config.impl.MemoryRoleServiceConfigImpl

        replay(ugConfig);*/
        return config;
    }

    protected SecurityRoleServiceConfig createRoleConfig(String name, Class<?> aClass,String adminRole) {
        SecurityRoleServiceConfig config = new MemoryRoleServiceConfigImpl();
        config.setName(name);
        config.setClassName(aClass.getName());
        config.setAdminRoleName(adminRole);
        /*SecurityRoleServiceConfig config = createNiceMock(SecurityRoleServiceConfig.class);
        expect(config.getName()).andReturn(name).anyTimes();
        expect(config.getClassName()).andReturn(aClass.getName()).anyTimes();
        expect(config.getAdminRoleName()).andReturn(adminRole).anyTimes();
        replay(config);*/
 
View Full Code Here

Examples of org.geoserver.security.config.impl.MemoryRoleServiceConfigImpl

        return getSecurityManager().loadRoleService(name);       
    }
   
   
    public MemoryRoleServiceConfigImpl getRoleConfig(String name) {
        MemoryRoleServiceConfigImpl config = new MemoryRoleServiceConfigImpl();
        config.setName(name);
        config.setClassName(MemoryRoleService.class.getName());
        config.setToBeEncrypted("encryptme");
        return config;
       
    }
View Full Code Here

Examples of org.geoserver.security.config.impl.MemoryRoleServiceConfigImpl

    static final String plainTextRole = "plainrole";
    static final String plainTextUserGroup = "plainuserGroup";

    @Override
    public GeoServerRoleService createRoleService(String name) throws Exception {
        MemoryRoleServiceConfigImpl config = getRoleConfig(name);
        GeoServerRoleService service = new MemoryRoleService();
        service.setSecurityManager(GeoServerExtensions.bean(GeoServerSecurityManager.class));
        service.initializeFromConfig(config);
        getSecurityManager().saveRoleService(config/*,isNewRoleService(name)*/);
        return service;
View Full Code Here

Examples of org.geoserver.security.config.impl.MemoryRoleServiceConfigImpl

       
    }
   
    public MemoryRoleServiceConfigImpl getRoleConfig(String name) {
        MemoryRoleServiceConfigImpl config = new MemoryRoleServiceConfigImpl();
        config.setName(name);
        config.setClassName(MemoryRoleService.class.getName());
        config.setToBeEncrypted(plainTextRole);
        return config;
       
    }
View Full Code Here

Examples of org.geoserver.security.config.impl.MemoryRoleServiceConfigImpl

        getSecurityManager().saveSecurityConfig(config);

        String serviceName = "testEncrypt";
        String cryptprefix = getPBEPasswordEncoder().getPrefix()+GeoServerPasswordEncoder.PREFIX_DELIMTER;
       
        MemoryRoleServiceConfigImpl roleConfig = getRoleConfig(serviceName);
        MemoryUserGroupServiceConfigImpl ugConfig = getUserGroupConfg(serviceName,
            getPlainTextPasswordEncoder().getName());
       
        getSecurityManager().saveRoleService(roleConfig);       
        getSecurityManager().saveUserGroupService(ugConfig);
View Full Code Here

Examples of org.geoserver.security.config.impl.MemoryRoleServiceConfigImpl

        config.setConfigPasswordEncrypterName(getPBEPasswordEncoder().getName());
        getSecurityManager().saveSecurityConfig(config);
        String serviceName = "testEncrypt2";
        String prefix =getPBEPasswordEncoder().getPrefix()+GeoServerPasswordEncoder.PREFIX_DELIMTER;
       
        MemoryRoleServiceConfigImpl roleConfig = getRoleConfig(serviceName);
        MemoryUserGroupServiceConfigImpl ugConfig = getUserGroupConfg(serviceName,
            getPlainTextPasswordEncoder().getName());
       
        getSecurityManager().saveRoleService(roleConfig);       
        getSecurityManager().saveUserGroupService(ugConfig);
View Full Code Here

Examples of org.geoserver.security.config.impl.MemoryRoleServiceConfigImpl

@Category(SystemTest.class)
public class MemoryRoleServiceTest extends AbstractRoleServiceTest {

    @Override
    public GeoServerRoleService createRoleService(String name) throws IOException {
        MemoryRoleServiceConfigImpl config = new MemoryRoleServiceConfigImpl();
        config.setName(name);
        GeoServerRoleService service = new MemoryRoleService();
        service.initializeFromConfig(config);
        service.setSecurityManager(getSecurityManager());
        return service;
    }
View Full Code Here

Examples of org.geoserver.security.config.impl.MemoryRoleServiceConfigImpl

        }
    }
   
    @Test
    public void testMappedAdminRoles() throws Exception {
        MemoryRoleServiceConfigImpl config = new MemoryRoleServiceConfigImpl();
        config.setName("testAdminRole");
        config.setAdminRoleName("adminRole");
        config.setGroupAdminRoleName("groupAdminRole");
        config.setClassName(MemoryRoleService.class.getName());
        GeoServerRoleService service = new MemoryRoleService();
        service.initializeFromConfig(config);
        GeoServerSecurityManager manager = GeoServerExtensions.bean(GeoServerSecurityManager.class);
        service.setSecurityManager(manager);
        manager.setActiveRoleService(service);
View Full Code Here

Examples of org.geoserver.security.config.impl.MemoryRoleServiceConfigImpl

    }

   
               
    protected void activateRORoleService() throws Exception{
        MemoryRoleServiceConfigImpl config = new MemoryRoleServiceConfigImpl();
        config.setName(getRORoleServiceName());
        config.setClassName(ReadOnlyRoleService.class.getName());
        getSecurityManager().saveRoleService(config);
        gaService = getSecurityManager().loadRoleService(getRORoleServiceName());
        gaService.initializeFromConfig(config);
        gaService.setSecurityManager(GeoServerApplication.get().getSecurityManager());
        gaStore = new MemoryRoleStore();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.