Skip to content

GSIP 188

Nuno Oliveira edited this page Jan 30, 2020 · 5 revisions

GSIP 188 - Hidden and filtering only fields on vector layers

Overview

This is a proposal for adding a new layer configuration option for marking attributes as hidden for read and write operations, and only available for filtering or rendering. This new option will work for both complex and simple features.

Proposed By

Fernando Miño Nuno Oliveira

Assigned to Release

This proposal is for:

  • GeoServer 2.17-RC
  • GeoServer 2.16.3

State

  • Under Discussion
  • In Progress
  • Completed
  • Rejected
  • Deferred

Motivation

I would like to propose adding a per-layer configuration option for hiding attributes from output responses and writing (transactions) but having them available for filtering and rendering, this will work on both simple and complex features.

A few uses cases where having this option will come handy:

  • Layer definition using CQL filtering on hidden attribute on alias-named layer (republished) without output the filter-attribute on output responses or modifying it.
  • Allow users create a layer with filtering capabilities over some attributes but unable to modify them.

Proposal

Complex and simple features are mutable types, so an effective approach for hiding certain paths could be removing attributes on them using a paths-black-list after filtering/sort process.

I'm thinking to do this hiding process on a FeatureSource Wrapper/Decorator, following same approach as some Geoserver security classes and extending abstract class:

org.geoserver.security.decorators.DecoratingFeatureSource

About the paths-black-list, I'm planning to add it into the Layer Configuration Page. On Simple Features Layer, add a checkbox on fields datagrid for hide it on output:

hidden

On Complex Features Layer:

  • Add a editable List of Prefix and Namespace URIs.
  • Add a List Component of strings and a Input Text component for adding hidden attribute xpaths (also an option for deleting paths from black list).

hidden

Changes allowing this will start at resource pool level.

About FeatureType:

The plan is to hide data and not its structure/defined fields, so not mutate FeatureType structure. Schema will be remain as its initial state always.

About transactions:

On transactions (writes) hidden attributes will not be modified.

Backwards Compatibility

This new enhancement is planned with backward compatibility in mind: when no hidden attributes configuration is explicitly present, this functionality will not be executed.

Feedback

Voting

Project Steering Committee:

  • Alessio Fabiani:
  • Andrea Aime:
  • Ian Turton:
  • Jody Garnett:
  • Jukka Rahkonen:
  • Kevin Smith:
  • Simone Giannecchini:
  • Torben Barsballe:
  • Nuno Oliveira:

Links