Package org.geoserver.security

Examples of org.geoserver.security.WrapperPolicy


        // scan and check the layers
        for(int i = 0; i < queryLayers.size(); i++) {
            Layer layer = queryLayers.get(i);
            if(layer instanceof SecuredWMSLayer) {
                SecuredWMSLayer secured = (SecuredWMSLayer) layer;
                final WrapperPolicy policy = secured.getPolicy();
                // check if we can cascade GetFeatureInfo
                if(policy.getLimits() instanceof WMSAccessLimits) {
                    WMSAccessLimits limits = (WMSAccessLimits) policy.getLimits();
                    if(!limits.isAllowFeatureInfo()) {
                        if(policy.getResponse() == org.geoserver.security.Response.CHALLENGE) {
                            SecureCatalogImpl.unauthorizedAccess(layer.getName());
                        } else {
                            throw new IllegalArgumentException("Layer " + layer.getName() + " is not queriable");
                        }
                    }
View Full Code Here


        boolean layerFiltersFound = false;
        for(int i = 0; i < layers.size(); i++) {
            Layer layer = layers.get(i);
            if(layer instanceof SecuredWMSLayer) {
                SecuredWMSLayer secured = (SecuredWMSLayer) layer;
                final WrapperPolicy policy = secured.getPolicy();
                if(policy.getResponse() == org.geoserver.security.Response.CHALLENGE) {
                    SecureCatalogImpl.unauthorizedAccess(layer.getName());
                }
                // collect read filters
                if(policy.getLimits() instanceof WMSAccessLimits) {
                    WMSAccessLimits limits = (WMSAccessLimits) policy.getLimits();
                    layerFilters.add(limits.getReadFilter());
                    layerFiltersFound |= limits.getReadFilter() != null;
                   
                    if(limits.getRasterFilter() != null) {
                        /*
 
View Full Code Here

            throw new ServiceException("Could not find layer " + layerName, "LayerNotDefined");
        }
        if (layerInfo instanceof SecuredLayerInfo && boundingBox != null) {
            //test layer bbox limits
            SecuredLayerInfo securedLayerInfo = (SecuredLayerInfo) layerInfo;
            WrapperPolicy policy = securedLayerInfo.getWrapperPolicy();
            AccessLimits limits = policy.getLimits();
                       
            if (limits instanceof DataAccessLimits) {
                //ensure we are all using the same CRS
                CoordinateReferenceSystem dataCrs = layerInfo.getResource().getCRS()
                if (boundingBox.getCoordinateReferenceSystem()!=null && !CRS.equalsIgnoreMetadata(dataCrs, boundingBox.getCoordinateReferenceSystem())) {
View Full Code Here

        boolean layerFiltersFound = false;
        for(int i = 0; i < layers.size(); i++) {
            Layer layer = layers.get(i);
            if(layer instanceof SecuredWMSLayer) {
                SecuredWMSLayer secured = (SecuredWMSLayer) layer;
                final WrapperPolicy policy = secured.getPolicy();
                if(policy.getResponse() == org.geoserver.security.Response.CHALLENGE) {
                    SecureCatalogImpl.unauthorizedAccess(layer.getName());
                }
                // collect read filters
                if(policy.getLimits() instanceof WMSAccessLimits) {
                    WMSAccessLimits limits = (WMSAccessLimits) policy.getLimits();
                    layerFilters.add(limits.getReadFilter());
                    layerFiltersFound |= limits.getReadFilter() != null;
                   
                    if(limits.getRasterFilter() != null) {
                        /*
 
View Full Code Here

        // scan and check the layers
        for(int i = 0; i < queryLayers.size(); i++) {
            Layer layer = queryLayers.get(i);
            if(layer instanceof SecuredWMSLayer) {
                SecuredWMSLayer secured = (SecuredWMSLayer) layer;
                final WrapperPolicy policy = secured.getPolicy();
                // check if we can cascade GetFeatureInfo
                if(policy.getLimits() instanceof WMSAccessLimits) {
                    WMSAccessLimits limits = (WMSAccessLimits) policy.getLimits();
                    if(!limits.isAllowFeatureInfo()) {
                        if(policy.getResponse() == org.geoserver.security.Response.CHALLENGE) {
                            SecureCatalogImpl.unauthorizedAccess(layer.getName());
                        } else {
                            throw new IllegalArgumentException("Layer " + layer.getName() + " is not queriable");
                        }
                    }
View Full Code Here

TOP

Related Classes of org.geoserver.security.WrapperPolicy

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.