Skip to content

GeoFence installation

Emanuele Tajariol edited this page Jul 16, 2021 · 1 revision

In order to install GeoFence, you need the geofence.war file.
Please refer to the main page, where you can find links to the downloadable resources, or to the Building instructions page if you like to build GeoFence by yourself.

Beside the GeoFence main webapp, you will also need the GeoServer module (called "probe"), that allows GeoServer to know about GeoFence and perform the authorization requests. As for the .war file, you can find the links for downloading the needed files in the project main page, or you can build them by yourself.

Installing GeoFence webapp

If you are using Apache Tomcat you may simply deploy the geofence.war file into the webapps/ directory, and the default configurations will be used.

The only thing you have to take care about is the TCP port where GeoFence will be published by Tomcat. GeoServer will need to communicate with GeoFence: the default port where GeoServer expects to find GeoFence is 8081 (you will be able to reconfigure this value).
You may find and edit this information in the file YOUR_CATALINA_BASE/conf/server.xml, in lines like these ones:

    <Connector port="8081" protocol="HTTP/1.1" 
               connectionTimeout="20000" 
               redirectPort="8443" />

When running different instances of tomcat, edit the server.xml file to avoid port conflicts.
Please remember that tomcat will by default open a port for server communication (default 8085), one port for incoming AJP requests (default 8009) and one port for HTTP requests (default 8080). If you plan to use to default values for the GeoServer instance, make sure you redefine these values for the GeoFence instance.

Installing GeoFence probe into GeoServer

You may install one of the GeoServer .war files pre-packaged with the GeoFence probe (links provided on this page), or you may install the needed .jar dependencies into your deployed GeoServer webapp.

Like the other GeoServer extensions, you need the .zip file containing the jar files that implements the GeoFence-GeoServer integration. You can find the .zip file for your geoserver version in the download section.

You will have to:

  • unzip the archive into the WEB-INF/lib directory of the GeoServer installation, and
  • restart GeoServer.

Basic configuration

What you have once you install the GeoFence webapp and the probe is the basic default configuration. It means that, on GeoFence side you'll have:

On GeoServer side you have the authorization probe configured with the default values as well. Once installed, GeoServer recognizes there is an authorization manager and will use it whenever a request to access any resource is made.

Please note that in GeoServer the GeoFence authentication mechanism is installed, but not configured for use yet. It means you still have the set of user defined in GeoServer.
By "GeoFence authentication" we mean the mechanism by which GeoServer will ask GeoFence whether the presented user credentials are valid or not.

First steps

In order to create some sample data in GeoFence and to test if everything is working properly, follow the instructions on page First steps.

Further configurations

You may want to refer to the GeoFence Configuration page after installing GeoFence.