[Geoserver-devel] [JIRA] (GEOS-9552) [GeoFence Plugin] "LIMITS" type rules seem failing for ImageMosaics

Alessio Fabiani created an issue

GeoServer / BugGEOS-9552

[GeoFence Plugin] “LIMITS” type rules seem failing for ImageMosaics

Issue Type:

BugBug

Affects Versions:

2.15.5, 2.16.2, 2.17-RC

Assignee:

Unassigned

Components:

GeoFence

Created:

26/Mar/20 3:29 PM

Priority:

HighHigh

Reporter:

Alessio Fabiani

By defining a “LIMIT” type access rule for a specific user against an ImageMosaic, I would expect the outcome to be cropped accordingly to the specified allowed area.

E.g.:

  1. Having an Image Mosaic with about 80 granules on a single dimension with the following BBOX

SRS = EPSG:3857

NATIVE BBOX =

{x0: 4324501.311667766, y0: -821850.9280018109, x1: 4412556.768240058, y2: -714227.5921912305}

LL_BBOX =

{x0: 38.847656244660726, y0: -7.362466864463051, x1: 39.638671869550855, y2: -6.402648405022478}

  1. Having a GeoFence LIMIT Rule defined as

{ user: afabiani, access: LIMIT service: *, layer: <layer_name>, catalogMode: MIXED, allowedArea: SRID=4326;MULTIPOLYGON (((39.21844481882432 -6.670063574969543, 39.39971923288702 -6.822807115777458, 39.39971923288702 -6.986406834755428, 39.22943114694938 -6.975501952613067, 39.21844481882432 -6.670063574969543))) }

When querying the layer I get the following logs:

{{ 2020-03-26 14:08:03,718 DEBUG [geoserver.geofence] - Getting access limits for Layer planet_satellite_imagies_2018
2020-03-26 14:08:03,718 DEBUG [geoserver.geofence] - Getting access limits for Resource planet_satellite_imagies_2018
2020-03-26 14:08:03,718 DEBUG [geoserver.geofence] - Setting user for filter: afabiani
2020-03-26 14:08:03,719 DEBUG [geoserver.geofence] - ResourceInfo filter: RuleFilter[user:“afabiani”+ role:ANY inst:name+:default-gs ip:“0:0:0:0:0:0:0:1”+ serv:“WMS”+ req:“GETLEGENDGRAPHIC”+ ws:“geonode”+ layer:“planet_satellite_imagies_2018”+]
2020-03-26 14:08:03,719 DEBUG [geofence.cache] - Request for RuleFilter[user:“afabiani”+ role:ANY inst:name+:default-gs ip:“0:0:0:0:0:0:0:1”+ serv:“WMS”+ req:“GETLEGENDGRAPHIC”+ ws:“geonode”+ layer:“planet_satellite_imagies_2018”+]
2020-03-26 14:08:03,720 DEBUG [geofence.cache] - Loading RuleFilter[user:“afabiani”+ role:ANY inst:name+:default-gs ip:“0:0:0:0:0:0:0:1”+ serv:“WMS”+ req:“GETLEGENDGRAPHIC”+ ws:“geonode”+ layer:“planet_satellite_imagies_2018”+]
2020-03-26 14:08:03,722 INFO [services.RuleReaderServiceImpl] - Requesting access for RuleFilter[user:“afabiani”+ role:ANY inst:name+:default-gs ip:“0:0:0:0:0:0:0:1”+ serv:“WMS”+ req:“GETLEGENDGRAPHIC”+ ws:“geonode”+ layer:“planet_satellite_imagies_2018”+]
2020-03-26 14:08:03,724 DEBUG [geoserver.security] - Setting ROLES for User [afabiani] to [ROLE_REGISTERED-MEMBERS]
2020-03-26 14:08:03,724 DEBUG [geofence.internal] - Checking Role [ROLE_REGISTERED-MEMBERS] on ActiveRoleService [org.geoserver.security.GeoServerRestRoleService@anonymised.com5912…]
2020-03-26 14:08:03,725 DEBUG [geofence.internal] - Checking UserGroupService [default]
2020-03-26 14:08:03,725 DEBUG [geofence.internal] - Matching Roles [[ROLE_REGISTERED-MEMBERS]] for User [afabiani]
2020-03-26 14:08:03,742 DEBUG [util.FilterUtils] - ADDED Rule[id:9458 pri:341 user:afabiani ws:geonode l:planet_satellite_imagies_2018 acc:LIMIT]
2020-03-26 14:08:03,742 DEBUG [util.FilterUtils] - ADDED Rule[id:9459 pri:342 user:afabiani srv:WMS ws:geonode l:planet_satellite_imagies_2018 acc:ALLOW]
2020-03-26 14:08:03,749 DEBUG [util.FilterUtils] - ADDED Rule[id:9458 pri:341 user:afabiani ws:geonode l:planet_satellite_imagies_2018 acc:LIMIT]
2020-03-26 14:08:03,749 DEBUG [util.FilterUtils] - ADDED Rule[id:9459 pri:342 user:afabiani srv:WMS ws:geonode l:planet_satellite_imagies_2018 acc:ALLOW]
2020-03-26 14:08:03,750 DEBUG [services.RuleReaderServiceImpl] - Filter RuleFilter[user:“afabiani”+ role:ANY inst:name+:default-gs ip:“0:0:0:0:0:0:0:1”+ serv:“WMS”+ req:“GETLEGENDGRAPHIC”+ ws:“geonode”+ layer:“planet_satellite_imagies_2018”+] is matching the following Rules:
2020-03-26 14:08:03,751 DEBUG [services.RuleReaderServiceImpl] - Role:ROLE_REGISTERED-MEMBERS
2020-03-26 14:08:03,751 DEBUG [services.RuleReaderServiceImpl] - Role:ROLE_REGISTERED-MEMBERS —> Rule[id:9458 pri:341 user:afabiani ws:geonode l:planet_satellite_imagies_2018 acc:LIMIT]
2020-03-26 14:08:03,752 DEBUG [services.RuleReaderServiceImpl] - Role:ROLE_REGISTERED-MEMBERS —> Rule[id:9459 pri:342 user:afabiani srv:WMS ws:geonode l:planet_satellite_imagies_2018 acc:ALLOW]
2020-03-26 14:08:03,752 DEBUG [services.RuleReaderServiceImpl] - Role:ROLE_AUTHENTICATED
2020-03-26 14:08:03,753 DEBUG [services.RuleReaderServiceImpl] - Role:ROLE_AUTHENTICATED —> Rule[id:9458 pri:341 user:afabiani ws:geonode l:planet_satellite_imagies_2018 acc:LIMIT]
2020-03-26 14:08:03,755 DEBUG [services.RuleReaderServiceImpl] - Role:ROLE_AUTHENTICATED —> Rule[id:9459 pri:342 user:afabiani srv:WMS ws:geonode l:planet_satellite_imagies_2018 acc:ALLOW]
2020-03-26 14:08:03,757 INFO [services.RuleReaderServiceImpl] - Collecting limits: RuleLimits[id=9458 rule=Rule[id:9458 pri:341 user:afabiani ws:geonode l:planet_satellite_imagies_2018 acc:LIMIT] allowedArea=MULTIPOLYGON (((39.21844481882432 -6.670063574969543, 39.39971923288702 -6.822807115777458, 39.39971923288702 -6.986406834755428, 39.22943114694938 -6.975501952613067, 39.21844481882432 -6.670063574969543))) mode=MIXED]
2020-03-26 14:08:03,759 DEBUG [services.RuleReaderServiceImpl] - Attaching an area to Accessinfo: org.locationtech.jts.geom.MultiPolygon MULTIPOLYGON (((39.21844481882432 -6.670063574969543, 39.39971923288702 -6.822807115777458, 39.39971923288702 -6.986406834755428, 39.22943114694938 -6.975501952613067, 39.21844481882432 -6.670063574969543)))
2020-03-26 14:08:03,759 DEBUG [services.RuleReaderServiceImpl] - Filter RuleFilter[user:“afabiani”+ role:ANY inst:name+:default-gs ip:“0:0:0:0:0:0:0:1”+ serv:“WMS”+ req:“GETLEGENDGRAPHIC”+ ws:“geonode”+ layer:“planet_satellite_imagies_2018”+] on role ROLE_REGISTERED-MEMBERS has access AccessInfoInternal[grant:ALLOW area:defined cmode:MIXED]
2020-03-26 14:08:03,760 INFO [services.RuleReaderServiceImpl] - Collecting limits: RuleLimits[id=9458 rule=Rule[id:9458 pri:341 user:afabiani ws:geonode l:planet_satellite_imagies_2018 acc:LIMIT] allowedArea=MULTIPOLYGON (((39.21844481882432 -6.670063574969543, 39.39971923288702 -6.822807115777458, 39.39971923288702 -6.986406834755428, 39.22943114694938 -6.975501952613067, 39.21844481882432 -6.670063574969543))) mode=MIXED]
2020-03-26 14:08:03,763 DEBUG [services.RuleReaderServiceImpl] - Attaching an area to Accessinfo: org.locationtech.jts.geom.MultiPolygon MULTIPOLYGON (((39.21844481882432 -6.670063574969543, 39.39971923288702 -6.822807115777458, 39.39971923288702 -6.986406834755428, 39.22943114694938 -6.975501952613067, 39.21844481882432 -6.670063574969543)))
2020-03-26 14:08:03,763 DEBUG [services.RuleReaderServiceImpl] - Filter RuleFilter[user:“afabiani”+ role:ANY inst:name+:default-gs ip:“0:0:0:0:0:0:0:1”+ serv:“WMS”+ req:“GETLEGENDGRAPHIC”+ ws:“geonode”+ layer:“planet_satellite_imagies_2018”+] on role ROLE_AUTHENTICATED has access AccessInfoInternal[grant:ALLOW area:defined cmode:MIXED]
2020-03-26 14:08:03,766 DEBUG [geoserver.security] - Setting ROLES for User [afabiani] to [ROLE_REGISTERED-MEMBERS]
2020-03-26 14:08:03,768 DEBUG [geofence.internal] - Checking Role [ROLE_REGISTERED-MEMBERS] on ActiveRoleService [org.geoserver.security.GeoServerRestRoleService@anonymised.com]
2020-03-26 14:08:03,770 DEBUG [geofence.internal] - Checking UserGroupService [default]
2020-03-26 14:08:03,770 DEBUG [geofence.internal] - Matching Roles [[ROLE_REGISTERED-MEMBERS]] for User [afabiani]
2020-03-26 14:08:03,774 INFO [services.RuleReaderServiceImpl] - Returning AccessInfo[grant:ALLOW admin:false areaWkt:defined cmode:MIXED] for RuleFilter[user:“afabiani”+ role:ANY inst:name+:default-gs ip:“0:0:0:0:0:0:0:1”+ serv:“WMS”+ req:“GETLEGENDGRAPHIC”+ ws:“geonode”+ layer:“planet_satellite_imagies_2018”+]
2020-03-26 14:08:03,774 DEBUG [geoserver.geofence] - Returning mode MIXED for resource CoverageInfoImpl[planet_satellite_imagies_2018]
2020-03-26 14:08:03,775 TRACE [sqlserver.jtds] - Target not a string
2020-03-26 14:08:03,775 TRACE [sqlserver.jtds] - Target is not a Date
2020-03-26 14:08:03,777 DEBUG [geoserver.geofence] - Returning CoverageAccessLimits [params=null, rasterFilter=MULTIPOLYGON (((39.21844481882432 -6.670063574969543, 39.39971923288702 -6.822807115777458, 39.39971923288702 -6.986406834755428, 39.22943114694938 -6.975501952613067, 39.21844481882432 -6.670063574969543))), readFilter=Filter.INCLUDE, mode=MIXED] for layer geonode:planet_satellite_imagies_2018 and user afabiani

2020-03-26 14:08:04,173 DEBUG [services.RuleReaderServiceImpl] - Attaching an area to Accessinfo: org.locationtech.jts.geom.MultiPolygon MULTIPOLYGON (((39.21844481882432 -6.670063574969543, 39.39971923288702 -6.822807115777458, 39.39971923288702 -6.986406834755428, 39.22943114694938 -6.975501952613067, 39.21844481882432 -6.670063574969543)))
2020-03-26 14:08:04,178 WARN [yaml.CustomBeanWrapper] - TextBlock: unknown field ‘width’ with value ‘300’
2020-03-26 14:08:04,179 DEBUG [services.RuleReaderServiceImpl] - Filter RuleFilter[user:“afabiani”+ role:ANY inst:name+:default-gs ip:ANY serv:“WMS”+ req:“GETMAP”+ ws:“geonode”+ layer:“planet_satellite_imagies_2018”+] on role ROLE_AUTHENTICATED has access AccessInfoInternal[grant:ALLOW area:defined cmode:MIXED]
2020-03-26 14:08:04,180 WARN [yaml.CustomBeanWrapper] - TextBlock: unknown field ‘width’ with value ‘300’
2020-03-26 14:08:04,183 DEBUG [geoserver.security] - Setting ROLES for User [afabiani] to [ROLE_REGISTERED-MEMBERS]
2020-03-26 14:08:04,184 DEBUG [geofence.internal] - Checking Role [ROLE_REGISTERED-MEMBERS] on ActiveRoleService [org.geoserver.security.GeoServerRestRoleService@anonymised.com5912…]
2020-03-26 14:08:04,184 WARN [yaml.CustomBeanWrapper] - LastPage: unknown field ‘rotation’ with value ‘true’
2020-03-26 14:08:04,184 DEBUG [geofence.internal] - Checking UserGroupService [default]
2020-03-26 14:08:04,185 DEBUG [geofence.internal] - Matching Roles [[ROLE_REGISTERED-MEMBERS]] for User [afabiani]
2020-03-26 14:08:04,187 INFO [services.RuleReaderServiceImpl] - Returning AccessInfo[grant:ALLOW admin:false areaWkt:defined cmode:MIXED] for RuleFilter[user:“afabiani”+ role:ANY inst:name+:default-gs ip:ANY serv:“WMS”+ req:“GETMAP”+ ws:“geonode”+ layer:“planet_satellite_imagies_2018”+]
2020-03-26 14:08:04,189 WARN [yaml.CustomBeanWrapper] - TextBlock: unknown field ‘width’ with value ‘300’
2020-03-26 14:08:04,194 TRACE [sqlserver.jtds] - Target not a string
2020-03-26 14:08:04,197 TRACE [sqlserver.jtds] - Target is not a Date
2020-03-26 14:08:04,197 TRACE [sqlserver.jtds] - Target not a string
2020-03-26 14:08:04,197 WARN [yaml.CustomBeanWrapper] - TextBlock: unknown field ‘width’ with value ‘300’
2020-03-26 14:08:04,198 TRACE [sqlserver.jtds] - Target is not a Date
2020-03-26 14:08:04,199 DEBUG [geoserver.wms] - setting up map
2020-03-26 14:08:04,200 WARN [yaml.CustomBeanWrapper] - LastPage: unknown field ‘rotation’ with value ‘true’
2020-03-26 14:08:04,201 TRACE [sqlserver.jtds] - Target not a string
2020-03-26 14:08:04,217 TRACE [sqlserver.jtds] - Target is not a Date
2020-03-26 14:08:04,218 TRACE [sqlserver.jtds] - Target not a string
2020-03-26 14:08:04,220 TRACE [sqlserver.jtds] - Target is not a Date
2020-03-26 14:08:04,221 DEBUG [wms.map] - setting up 256x256 image
2020-03-26 14:08:04,221 TRACE [sqlserver.jtds] - Target not a string
2020-03-26 14:08:04,222 TRACE [sqlserver.jtds] - Target is not a Date
2020-03-26 14:08:04,222 TRACE [util.factory] - ENTRY (GridCoverageFactory)
2020-03-26 14:08:04,223 TRACE [util.factory] - RETURN (GridCoverageFactory): found implementation Optional.
2020-03-26 14:08:04,223 DEBUG [lite.gridcoverage2d] - Rendering using interpolation javax.media.jai.InterpolationNearest@anonymised.com
2020-03-26 14:08:04,224 TRACE [sqlserver.jtds] - Target not a string
2020-03-26 14:08:04,224 TRACE [sqlserver.jtds] - Target is not a Date
2020-03-26 14:08:04,225 DEBUG [lite.gridcoverage2d] - Rendering using interpolation javax.media.jai.InterpolationNearest@anonymised.com
2020-03-26 14:08:04,233 DEBUG [lite.gridcoverage2d] - Rendering using interpolation javax.media.jai.InterpolationNearest@anonymised.com
2020-03-26 14:08:04,236 DEBUG [gce.imagemosaic] - Reading mosaic from file:/D:/data/test_UTU/Image%20Mosaic/planet_satellite_imagies_2018/datastore.properties
2020-03-26 14:08:04,226 WARN [yaml.CustomBeanWrapper] - TextBlock: unknown field ‘width’ with value ‘424’
2020-03-26 14:08:04,237 DEBUG [gce.imagemosaic] - Highest res 2.388657133579983 2.388657133579983
2020-03-26 14:08:04,241 DEBUG [gce.imagemosaic] - Requested OverviewPolicy: QUALITY
2020-03-26 14:08:04,242 WARN [yaml.CustomBeanWrapper] - TextBlock: unknown field ‘width’ with value ‘424’
2020-03-26 14:08:04,242 DEBUG [gce.imagemosaic] - Requested interpolation: javax.media.jai.InterpolationNearest@anonymised.com
2020-03-26 14:08:04,247 DEBUG [gce.imagemosaic] - Prepping to manage SortBy Clause
2020-03-26 14:08:04,248 DEBUG [geotools.jdbc] - CREATE CONNECTION
2020-03-26 14:08:04,249 DEBUG [data.jdbc] - exporting PropertyName
2020-03-26 14:08:04,249 TRACE [sqlserver.jtds] - Target not a string
2020-03-26 14:08:04,250 TRACE [sqlserver.jtds] - Target is not a Date
2020-03-26 14:08:04,250 DEBUG [data.util] - CRSConverterFactory can be applied from Strings to CRS only.
2020-03-26 14:08:04,251 DEBUG [data.util] - InterpolationConverterFactory can be applied from Strings to Interpolation only.
2020-03-26 14:08:04,251 DEBUG [geotools.jdbc] - SELECT “fid”,ST_AsEWKB(“the_geom”) as “the_geom” FROM “public”.“planet_satellite_imagies_2018” WHERE “the_geom” && ST_GeomFromWKB(?, 3857)
2020-03-26 14:08:04,252 DEBUG [geotools.jdbc] - 1 = POLYGON ((-23090097.50117188 -21616611.023501024, 23246640.53507813 -21616611.023501024, 23246640.53507813 21459968.914635085, -23090097.50117188 21459968.914635085, -23090097.50117188 -21616611.023501024))
2020-03-26 14:08:04,253 WARN [yaml.CustomBeanWrapper] - TextBlock: unknown field ‘width’ with value ‘424’
2020-03-26 14:08:04,254 DEBUG [geotools.jdbc] - CLOSE CONNECTION
2020-03-26 14:08:04,257 WARN [yaml.CustomBeanWrapper] - TextBlock: unknown field ‘width’ with value ‘424’

2020-03-26 14:08:04,261 DEBUG [gce.imagemosaic] - CropRasterArea empty or null
2020-03-26 14:08:04,264 DEBUG [gce.imagemosaic] - Request is empty: RasterLayerRequest description:
SpatialRequestHelper [requestedBBox=ReferencedEnvelope[-2.309009750117188E7 : 2.324664053507813E7, -2.1616611023501016E7 : 2.1459968914635085E7], cropBBox=ReferencedEnvelope[4324501.311667766 : 4412556.768240058, -821850.9280018109 : -714227.5921912305], requestedRasterArea=java.awt.Rectangle[x=0,y=0,width=296,height=275], destinationRasterArea=java.awt.Rectangle[x=175,y=142,width=1,height=0], requestCRS=PROJCS[“WGS 84 / Pseudo-Mercator”,
GEOGCS[“WGS 84”,
DATUM[“World Geodetic System 1984”,
SPHEROID[“WGS 84”, 6378137.0, 298.257223563, AUTHORITY[“EPSG”,“7030”]],
AUTHORITY[“EPSG”,“6326”]],
PRIMEM[“Greenwich”, 0.0, AUTHORITY[“EPSG”,“8901”]],
UNIT[“degree”, 0.017453292519943295],
AXIS[“Geodetic longitude”, EAST],
AXIS[“Geodetic latitude”, NORTH],
AUTHORITY[“EPSG”,“4326”]],
PROJECTION[“Popular Visualisation Pseudo Mercator”, AUTHORITY[“EPSG”,“1024”]],
PARAMETER[“semi_minor”, 6378137.0],
PARAMETER[“latitude_of_origin”, 0.0],
PARAMETER[“central_meridian”, 0.0],
PARAMETER[“scale_factor”, 1.0],
PARAMETER[“false_easting”, 0.0],
PARAMETER[“false_northing”, 0.0],
UNIT[“m”, 1.0],
AXIS[“Easting”, EAST],
AXIS[“Northing”, NORTH],
AUTHORITY[“EPSG”,“3857”]], requestedGridToWorld=PARAM_MT[“Affine”,
PARAMETER[“num_row”, 3],
PARAMETER[“num_col”, 3],
PARAMETER[“elt_0_0”, 156543.03390625003],
PARAMETER[“elt_0_2”, -23011825.984218754],
PARAMETER[“elt_1_1”, -156642.10886594947],
PARAMETER[“elt_1_2”, 21381647.86020211]], coverageProperties=org.geotools.gce.imagemosaic.SpatialRequestHelper$CoverageProperties@anonymised.com, accurateResolution=false, empty=true, needsReprojection=false, ]
ReadType=JAI_IMAGEREAD
2020-03-26 14:08:04,264 DEBUG [gce.imagemosaic] - The response is empty. ==> returning a null GridCoverage
2020-03-26 14:08:04,265 WARN [yaml.CustomBeanWrapper] - TextBlock: unknown field ‘width’ with value ‘424’
2020-03-26 14:08:04,273 WARN [yaml.CustomBeanWrapper] - TextBlock: unknown field ‘width’ with value ‘424’
2020-03-26 14:08:04,277 WARN [yaml.CustomBeanWrapper] - TextBlock: unknown field ‘width’ with value ‘424’
2020-03-26 14:08:04,280 WARN [yaml.CustomBeanWrapper] - TextBlock: unknown field ‘width’ with value ‘424’
2020-03-26 14:08:04,284 WARN [yaml.CustomBeanWrapper] - TextBlock: unknown field ‘width’ with value ‘424’
2020-03-26 14:08:04,285 WARN [yaml.CustomBeanWrapper] - TextBlock: unknown field ‘width’ with value ‘424’
2020-03-26 14:08:04,287 WARN [yaml.CustomBeanWrapper] - LastPage: unknown field ‘rotation’ with value ‘true’
2020-03-26 14:08:04,293 WARN [yaml.CustomBeanWrapper] - TextBlock: unknown field ‘width’ with value ‘424’
}}

Notice the statement:

Request is empty: RasterLayerRequest description:
SpatialRequestHelper [requestedBBox=ReferencedEnvelope[-2.309009750117188E7 : 2.324664053507813E7, -2.1616611023501016E7 : 2.1459968914635085E7], cropBBox=ReferencedEnvelope[4324501.311667766 : 4412556.768240058, -821850.9280018109 : -714227.5921912305], requestedRasterArea=java.awt.Rectangle[x=0,y=0,width=296,height=275], destinationRasterArea=java.awt.Rectangle[x=175,y=142,width=1,height=0]

Add Comment

Add Comment

Get Jira notifications on your phone! Download the Jira Cloud app for Android or iOS


This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100122-sha1:93a3ad8)

Atlassian logo