GeoServer Layer Management Guide

This guide walks you through the process of managing layers in GeoServer, including uploading layers, setting classification metadata, and configuring access rules.

Uploading and Managing Layers

Through the Web Interface

  1. Log in to the GeoServer Web Interface

  2. Navigate to Data > Layers

  3. Click Add a new layer

  4. Select your data source (nasa:blue_marble)

  5. Configure the layer settings:

    • Name and title

    • Coordinate reference system

    • Bounding box

    • Coverage parameters and band details

Through the REST API

# Upload a new layer (example for Blue Marble)
curl -v -XPUT -H 'Content-type: text/plain' \
     -H "Authorization: Bearer $AUTH_TOKEN" \
     -d $GEOTIFF_PATH \
     map.$DF_HOST/geoserver/rest/workspaces/$WORKSPACE/coveragestores/$STORE/external.geotiff?configure=first\&coverageName=$LAYER_NAME

# List all layers
curl -H "Authorization: Bearer $AUTH_TOKEN" \
    http://map.$DF_HOST/geoserver/rest/layers

# Get layer details
curl -H "Authorization: Bearer $AUTH_TOKEN" \
    http://map.$DF_HOST/geoserver/rest/layers/$LAYER_NAME

Setting Classification Metadata

Users that have been given access to the layer administration page should be able to set a classification keyword on a layer. Users must take precaution to avoid setting an invalid classification, or setting multiple classifications on a layer. Failure to do so will put the layer in an invalid state that will require intervention from the SDL admin to correct. For more information, see the "Troubleshooting" section below.

Through the Web Interface

  1. Navigate to Layers > [the layer to classify]

  2. Under Keywords, create a new keyword for the classication:

    • Type the layer classification into the New Keyword text box

    • In the dropdown, select "English"

    • Type "Classification" into the Vocabulary text box

  3. Once all information has been inserted, click Add Keyword and confirm the classification appears under the Current Keywords field

  4. Click Save at the bottom of the page.

Through the REST API

TBD

Troubleshooting

When a layer’s classification is misconfigured, the layer becomes invisible to end users. Once a layer is in this state, a user will have to submit a ticket to SDL support for to recover the layer. The ticket should be titled "Suspected Layer Classification Misconfiguration" and should include the following information:

  1. The name of the layer

  2. The desired classification level of the layer

  3. An email used to alert the user that the request has been fulfilled

Configuring Layer Access Rules

Through GeoFence UI

  1. Navigate to Security > GeoFence Data Rules

  2. Click Add New Rule

  3. Configure the rule:

    • Select Priority

    • Select the Role/User

    • Select services and requests to allow/deny

    • Select the workspace and layer

    • Define access type (ALLOW, DENY, LIMIT)

    • Save the rule

Through the REST API

# Create a new access rule (Example for ALLOW all)
curl -XPOST -H "Content-type: application/json" \
  -H "Authorization: Bearer $AUTH_TOKEN" \
  -d '{
      "Rule": {
      "priority":0,
      "userName":"*",
      "roleName":"*",
      "service":"*",
      "request":"*",
      "workspace":"*",
      "layer":"*",
      "access":"ALLOW"
    }
  }' \
  http://map.$DF_HOST/geoserver/rest/geofence/rules

# List all rules
curl -H "Authorization: Bearer $AUTH_TOKEN" \
  http://map.$DF_HOST/geoserver/rest/geofence/rules

# Update an existing rule. Unspecified fields remain unchanged
curl -XPOST -H "Content-type: application/json" \
  -H "Authorization: Bearer $AUTH_TOKEN" \
  -d '{
    "rule": {
      "roleName": "$ROLE_NAME"
      "layer": "$LAYER_NAME",
      "access": "DENY",
    }
  }' \
  http://map.$DF_HOST/geoserver/rest/geofence/rules/id/$RULE_ID