Package org.geoserver.security.validation

Examples of org.geoserver.security.validation.SecurityConfigValidator


        authProviderHelper.removeConfig(config.getName());
    }
   

    public void removeFilter(SecurityNamedServiceConfig config) throws IOException,SecurityConfigException {
        SecurityConfigValidator validator =
                SecurityConfigValidator.getConfigurationValiator(
                        GeoServerSecurityFilter.class,
                        config.getClassName());
        validator.validateRemoveFilter(config);       
        getAuthenticationCache().removeAll(config.getName());
        filterHelper.removeConfig(config.getName());
    }
View Full Code Here


     */
    public synchronized void saveSecurityConfig(SecurityManagerConfig config) throws Exception {
       
        SecurityManagerConfig oldConfig = new SecurityManagerConfig(this.securityConfig);
       
        SecurityConfigValidator validator = new SecurityConfigValidator(this);
        validator.validateManagerConfig(config,oldConfig);
       
        //save the current config to fall back to               
       

        // The whole try block should run as a transaction, unfortunately
View Full Code Here

     * </p>
     */
    void saveMasterPasswordProviderConfig(MasterPasswordProviderConfig config, boolean validate)
            throws IOException,SecurityConfigException {
       
        SecurityConfigValidator validator = SecurityConfigValidator
            .getConfigurationValiator(MasterPasswordProvider.class, config.getClassName());

        if (config.getId() == null) {
            config.initBeforeSave();
            if (validate) {
                validator.validateAddMasterPasswordProvider(config);
            }
        }
        else {
            if (validate) {
                validator.validateModifiedMasterPasswordProvider(config,
                    masterPasswordProviderHelper.loadConfig(config.getName()));
            }
        }

        masterPasswordProviderHelper.saveConfig(config);
View Full Code Here

    /**
     * Removes a master password provider configuration.
     */
    public void removeMasterPasswordProvder(MasterPasswordProviderConfig config) throws IOException,SecurityConfigException {
       
        SecurityConfigValidator validator = SecurityConfigValidator
            .getConfigurationValiator(MasterPasswordProvider.class, config.getClassName());

        validator.validateRemoveMasterPasswordProvider(config);
        masterPasswordProviderHelper.removeConfig(config.getName());
    }
View Full Code Here

    }

    protected void handleSubmit(Form<?> form) {
        RequestFilterChain chain =chainWrapper.getChain();
        try {
            new SecurityConfigValidator(getSecurityManager()).
                validateRequestFilterChain(chainWrapper.getChain());
            if (isNew)
                secMgrConfig.getFilterChain().getRequestChains().add(chain);
            //getSecurityManager().saveSecurityConfig(secMgrConfig);
            doReturn();
View Full Code Here

    /**
     * Return a configuration validator, subclass of {@link SecurityConfigValidator}
     * @return
     */
    public SecurityConfigValidator createConfigurationValidator(GeoServerSecurityManager securityManager) {
       return new SecurityConfigValidator(securityManager);
    }
View Full Code Here

TOP

Related Classes of org.geoserver.security.validation.SecurityConfigValidator

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.