Package org.geoserver.security

Examples of org.geoserver.security.GeoServerSecurityManager$HelperBase


       
        char[] currentArray = current.trim().toCharArray();
        char[] newpassArray = newpass.trim().toCharArray();
       
       
        GeoServerSecurityManager m = getManager();
        try {
            m.saveMasterPasswordConfig(m.loadMasterPasswordConfig(), currentArray,
                    newpassArray, newpassArray);
        } catch (Exception e) {
            throw new RestletException("Cannot change master password",
                    Status.CLIENT_ERROR_UNPROCESSABLE_ENTITY,e);
        } finally {
            m.disposePassword(currentArray);
            m.disposePassword(newpassArray);
        }
    }
View Full Code Here


        tempFolder = File.createTempFile("ldap", "test");
        tempFolder.delete();
        tempFolder.mkdirs();
        GeoServerResourceLoader resourceLoader = new GeoServerResourceLoader(
                tempFolder);
        GeoServerSecurityManager securityManager = new GeoServerSecurityManager(
                new GeoServerDataDirectory(resourceLoader));
        securityProvider = new LDAPSecurityProvider(securityManager);
       
        createConfig();
        config.setServerURL(ldapServerUrl + "/" + basePath);
View Full Code Here

        getSecurityManager().setActiveRoleService(gaService);       
        gaStore=null;
    }

    protected void deactivateRORoleService() throws Exception {
        GeoServerSecurityManager secMgr = getSecurityManager();
        if (secMgr.listRoleServices().contains(getRORoleServiceName())) {
            SecurityRoleServiceConfig config =
                secMgr.loadRoleServiceConfig((getRORoleServiceName()));
            secMgr.removeRoleService(config);
        }
    }
View Full Code Here

        ugStore.store();
               
        ugStore=null;
    }
    protected void deactivateROUGService() throws Exception {
        GeoServerSecurityManager secMgr = getSecurityManager();
        if (secMgr.listUserGroupServices().contains(getROUserGroupServiceName())) {
            SecurityUserGroupServiceConfig config =
                secMgr.loadUserGroupServiceConfig(getROUserGroupServiceName());
            secMgr.removeUserGroupService(config);
        }
    }
View Full Code Here

        return Boolean.valueOf(temp);
    }

    @Before
    public void removeRoleService2() throws Exception {
        GeoServerSecurityManager secMgr = getSecurityManager();
        if (secMgr.listRoleServices().contains("default2")) {
            SecurityRoleServiceConfig roleService = secMgr.loadRoleServiceConfig("default2");
            secMgr.removeRoleService(roleService);
        }
    }
View Full Code Here

        this.config = config;
    }

    @Override
    public Component getPageBodyComponent(String id) {
        GeoServerSecurityManager secMgr = GeoServerExtensions.bean(GeoServerSecurityManager.class);
        if (secMgr.checkAuthenticationForAdminRole()) {
            return new NodePanel(id, config);
        }
        return new WebMarkupContainer(id);
    }
View Full Code Here

TOP

Related Classes of org.geoserver.security.GeoServerSecurityManager$HelperBase

Copyright © 2018 www.massapicom. 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.