Geoserver Catalog MIXED mode in Data Security section is perfect for my purposes since I want to trigger an alert for authentication whenever a specific layer is requested.

Since I need to create Geoserver Users using a REST API from another server I need to use Geofence.

When defining rules in Geofence, there's an option to modify the catalog mode for a specific layer.

I expected this "authentication alert" to appear when the catalog mode in Geofence rules is defined as MIXED. But this is not happening, instead, I receive this error:

<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE ServiceExceptionReport SYSTEM "http://localhost:8080/geoserver/schemas/wms/1.1.1/WMS_exception_1_1_1.dtd"> <ServiceExceptionReport version="1.1.1" >   <ServiceException code="LayerNotDefined" locator="layers">
      Could not find layer workspace:layer

Interestingly, If I navigate to the dev tools and check for the request, I'm getting some kind of token in the body:

enter image description here

So my questions:

  • Is this the expected behaviour?
  • Or i'm doing something wrong?
  • What is this token I'm receiving?
  • 1
    As per the Tour there should be only one question asked per question. – PolyGeo May 27 '17 at 19:12

You should create a rule for the anonymous user which:

  • allows access to the layer
  • (rule detail) catalog mode: mixed
  • (rule detail) CQL read: EXCLUDE

The "EXCLUDE" filter will make GeoServer evaluate the catalog mode.

You'll also need specific rules for authenticated users (or groups) for accessing the layer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.