Uploaded image for project: 'GeoServer'
  1. GEOS-8246

GetFeatureInfo fails on pre-genalized data store when the user is anonymous

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.12-beta
    • Component/s: Main
    • Labels:
      None

      Description

      The error looks as follows:

      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
      	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
      	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
      	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
      	at org.eclipse.jetty.server.Server.handle(Server.java:499)
      	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
      	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
      	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: java.lang.IllegalArgumentException: SecureFeatureSources has been fed with unexpected AccessLimits class class org.geoserver.security.WorkspaceAccessLimits
      	at org.geoserver.security.decorators.SecuredFeatureSource.getReadQuery(SecuredFeatureSource.java:128)
      	at org.geoserver.security.decorators.SecuredFeatureSource.getFeatures(SecuredFeatureSource.java:83)
      	at org.geoserver.security.decorators.SecuredSimpleFeatureSource.getFeatures(SecuredSimpleFeatureSource.java:46)
      	at org.geotools.data.gen.PreGeneralizedFeatureSource.getFeatures(PreGeneralizedFeatureSource.java:222)
      	at org.geoserver.feature.retype.RetypingFeatureSource.getFeatures(RetypingFeatureSource.java:182)
      	at org.vfny.geoserver.global.GeoServerFeatureSource.getFeatures(GeoServerFeatureSource.java:459)
      

      This happens because the pre-generalized store picks a DataStore via the Repository interface, and then grabs the feature sources out of it, instead of asking the Catalog directly like the rest of the code does.

      The ReadOnlyDataStore in turn fails to build an appropriate policy type for the returned secured feature source, causing the error above.

        Attachments

          Activity

            People

            • Assignee:
              aaime Andrea Aime
              Reporter:
              aaime Andrea Aime
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: