Package org.geoserver.security.validation

Examples of org.geoserver.security.validation.SecurityConfigValidator


    /**
     * Saves/persists a role service configuration.
     */
    public void saveRoleService(SecurityRoleServiceConfig config)
            throws IOException,SecurityConfigException {
        SecurityConfigValidator validator =
                SecurityConfigValidator.getConfigurationValiator(
                        GeoServerRoleService.class,
                        config.getClassName());

        if (config.getId() == null) {
            config.initBeforeSave();
            validator.validateAddRoleService(config);
        }
        else {
            validator.validateModifiedRoleService(config,
                    roleServiceHelper.loadConfig(config.getName()));
        }

        roleServiceHelper.saveConfig(config);
        // remove from cache
View Full Code Here


    /**
     * Saves/persists a password policy configuration.
     */
    public void savePasswordPolicy(PasswordPolicyConfig config)
            throws IOException,SecurityConfigException {
        SecurityConfigValidator validator =
                SecurityConfigValidator.getConfigurationValiator(
                        PasswordValidator.class,
                        config.getClassName());

        if (config.getId() == null) {
            config.initBeforeSave();
            validator.validateAddPasswordPolicy(config);
        }
        else {
            validator.validateModifiedPasswordPolicy(config,
                    passwordValidatorHelper.loadConfig(config.getName()));
        }
       
        passwordValidatorHelper.saveConfig(config);
    }
View Full Code Here

     * @param name The  role service configuration.
     */
    public void removeRoleService(SecurityRoleServiceConfig config) throws IOException,SecurityConfigException {

       
        SecurityConfigValidator validator =
                SecurityConfigValidator.getConfigurationValiator(
                        GeoServerRoleService.class,
                        config.getClassName());

        validator.validateRemoveRoleService(config);
       
        roleServices.remove(config.getName());
        roleServiceHelper.removeConfig(config.getName());
    }
View Full Code Here

     * Removes a password validator configuration.
     *
     * @param  The  password validator configuration.
     */
    public void removePasswordValidator(PasswordPolicyConfig config) throws IOException,SecurityConfigException {
        SecurityConfigValidator validator =
                SecurityConfigValidator.getConfigurationValiator(
                        PasswordValidator.class,
                        config.getClassName());

        validator.validateRemovePasswordPolicy(config);
        passwordValidators.remove(config.getName());       
        passwordValidatorHelper.removeConfig(config.getName());
    }
View Full Code Here



    @Override
    public SecurityConfigValidator createConfigurationValidator(GeoServerSecurityManager securityManager) {
        return new SecurityConfigValidator(securityManager);
     }
View Full Code Here

    /**
     * Saves/persists a user group service configuration.
     */
    public void saveUserGroupService(SecurityUserGroupServiceConfig config)
            throws IOException,SecurityConfigException {
        SecurityConfigValidator validator =
                SecurityConfigValidator.getConfigurationValiator(
                        GeoServerUserGroupService.class,
                        config.getClassName());

        if (config.getId() == null) {
            config.initBeforeSave();
            validator.validateAddUserGroupService(config);
        }
        else {
            validator.validateModifiedUserGroupService(config,
                    userGroupServiceHelper.loadConfig(config.getName()));
        }

        userGroupServiceHelper.saveConfig(config);
        // remove from cache
View Full Code Here

     *
     * @param name The  user group service configuration.
     */
    public void removeUserGroupService(SecurityUserGroupServiceConfig config) throws IOException,SecurityConfigException {
       
        SecurityConfigValidator validator =
                SecurityConfigValidator.getConfigurationValiator(
                        GeoServerUserGroupService.class,
                        config.getClassName());

        validator.validateRemoveUserGroupService(config);
                
        userGroupServices.remove(config.getName());
        userGroupServiceHelper.removeConfig(config.getName());
    }
View Full Code Here

    }

   
    public void saveAuthenticationProvider(SecurityAuthProviderConfig config)
            throws IOException,SecurityConfigException {
        SecurityConfigValidator validator =
                SecurityConfigValidator.getConfigurationValiator(GeoServerAuthenticationProvider.class,
                        config.getClassName());

        if (config.getId() == null) {
            config.initBeforeSave();
            validator.validateAddAuthProvider(config);
        }
        else {
            validator.validateModifiedAuthProvider(config,
                    authProviderHelper.loadConfig(config.getName()));
        }

        //update the running auth providers
        if (authProviders != null) {
View Full Code Here

    }
   
    public void saveFilter(SecurityNamedServiceConfig config, MigrationHelper migrationHelper)
            throws IOException,SecurityConfigException {
       
        SecurityConfigValidator validator =
                SecurityConfigValidator.getConfigurationValiator(
                        GeoServerSecurityFilter.class,
                        config.getClassName());
       
        boolean fireChanged = false;
        if (config.getId() == null) {
            config.initBeforeSave();
            validator.validateAddFilter(config);
        }
        else {
            validator.validateModifiedFilter(config,
                    filterHelper.loadConfig(config.getName(), migrationHelper));
            // remove all cached authentications for this filter
            getAuthenticationCache().removeAll(config.getName());
            if (!securityConfig.getFilterChain().patternsForFilter(config.getName(),true).isEmpty()) {
                fireChanged=true;
View Full Code Here

     * Removes an authentication provider configuration.
     *
     * @param name The  authentication provider configuration.
     */
    public void removeAuthenticationProvider(SecurityAuthProviderConfig config) throws IOException,SecurityConfigException {       
        SecurityConfigValidator validator =
                SecurityConfigValidator.getConfigurationValiator(GeoServerAuthenticationProvider.class,
                        config.getClassName());
        validator.validateRemoveAuthProvider(config);       
        authProviderHelper.removeConfig(config.getName());
    }
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.