Server Configuration

SemSpect Neo4j Server Configuration #

SemSpect comes with two deployment modes: as Graph App for usage with Neo4j Desktop and as Web App hosted by a Neo4j database server for usage with any Web browser.

This section describes:

  • how to configure Neo4j in order to run the SemSpect plugin in server mode
  • how to set the SemSpect privileges to users and roles

Remark: the server mode requires a valid SemSpect server license.

Neo4j Configuration #

To use the integrated HTTP server (as the Neo4j Browser does), the DBMS must be configured to grant access to SemSpect over the Neo4j HTTP connector.

The particula Neo4j configuration settings depend on the Neo4j version (do not simply copy the specified settings into the corresponding neo4j.conf file, but add the missing settings to the existing places):

  • Neo4j 4.2 & 4.3
dbms.unmanaged_extension_classes=de.derivo.semspect.server.neo4japp.server=/semspect
dbms.security.http_auth_allowlist=/,/browser.*,/semspect.*
dbms.security.procedures.unrestricted=jwt.security.*,semspect.*
  • Neo4j 4.0 & 4.1
dbms.unmanaged_extension_classes=de.derivo.semspect.server.neo4japp.server=/semspect
dbms.security.http_auth_whitelist=/,/browser.*,/semspect.*
  • Neo4j 3.5
dbms.unmanaged_extension_classes=de.derivo.semspect.server.neo4japp.server=/browser/semspect

SemSpect will then be available under http://<server>:<port>/semspect/, were the port is the advertised address of the HTTP connector (same port as for Neo4j Browser, default 7474).

SemSpect Server Configuration File #

The configuration is a YAML file (default: semspect_config.yaml) with the following structure:

---
version: 2                         # format of the configuration file

# optional license configuration
license:
  file: "path to semspect license" # default semspect.lic
  session-keep-alive-minutes: 15   # default 5

# optional semspect features configutation for users
settings:

  # default feature settings
  semspect: true                   # enable/disable semspect 
  features:                        # enable/disable individual features. 
    FEATURE_KEY_1: true            # e.g. customCategories: true|false
    FEATURE_KEY_2: true

  # role feature settings
  roles:                           # overwrite 'default-settings' 
  - role: "admin"
    semspect: true
    features:
      FEATURE_KEY_1: true
      FEATURE_KEY_2: true
    
  # user feature settings    
  users:                           # overwrite roles and 'default'-settings
  - user: "neo4j"
    semspect: true
    features:
      FEATURE_KEY_1: true
      FEATURE_KEY_2: true

Some features you might want to turn off for some users are:

  • customCategories to enable/disable the usage of SemSpect labels.’
    (Reminder: The SemSpect labels are query based and will be recomputed after each modification of the graph data)
  • savedExplorations to enable/disable the storage of explorations
  • showQuery to enable/disable access to the Cypher queries
  • showObjectIdInteractionsSetting to enable/disable the settings to show the neo4j Object IDs

If you want the SemSpect configuration to be stored outside the plugin folder, add the following line to the Neo4j configuration settings of your DBMS:

dbms.jvm.additional=-Dde.derivo.semspect.server.configuration.path=/the_path_to/my_semspect_config.yaml

This path also specifies the location of your license file (if not specified in your configuration file as described above). Note that for dbms.jvm.additional you have to provide a separate entry in the neo4j.conf for every parameter you want so set.

To test the configuration (syntax check) after modification use the following java command from the command line in the folder where the plugin and configuration are located:

java -cp semspect_neo4j-plugin-1.3.0.jar de.derivo.semspect.server.TestConfiguration

If your configuration is located outsite the plugin folder, add the following parameter to the java command:

-Dde.derivo.semspect.server.configuration.path=/the_path_to/my_semspect_config.yaml

#e.g.
java -Dde.derivo.semspect.server.configuration.path=/tmp/my_config.yaml -cp semspect_neo4j-plugin-1.3.0.jar de.derivo.semspect.server.TestConfiguration

To trigger a reloading of the configuration without restarting the DBMS use following command in Neo4j Browser:

CALL semspect.reloadConfig 

SemSpect Data Files #

If you want the SemSpect data folder to be stored outside the plugin folder, add the following line to the Neo4j configuration settings of your database:

dbms.jvm.additional=-Dde.derivo.semspect.server.data.path=/path/to/your/semspect_data