Skip to content

Configuration

samatrhea edited this page Mar 29, 2021 · 5 revisions

Configuration

The COMET Web Services are configured using multiple json files. The main application is configured using the config.json in the root of the application. The authentication providers are configured using their respective configuration files. The Community Edition provides support for COMET Database authentication, the Enterprise Edition provides support for other authentication providers such as LDAP.

Main Configuration

The main configuration is used to setup the so-called Midtier, the application server itself, the Backtier, for connecting the the database, and default values. The following provides an example of the full configuration file with the complete set of options. Some options should not be used in production. A description of each of the configuration settings is provided as well.

{
  "Midtier": {
    "Protocol": "http",
    "HostName": "localhost",
    "Port": 5000,
    "UploadDirectory": "upload",
    "FileStorageDirectory": "storage"
  },
  "Backtier": {
    "HostName": "cdp4-postgresql",
    "Port": 5432,
    "UserName": "cdp4",
    "Password": "cdp4",
    "Database": "cdp4server",
    "DatabaseRestore": "cdp4serverrestore",
    "DatabaseManage": "cdp4manage",
    "StatementTimeout": 180,
    "LogSqlCommands": false,
    "IsDbSeedEnabled": false,
    "IsDbRestoreEnabled": false
  },
  "Defaults": {
    "PersonPassword": "pass",
    "DevServerPath": "http://localhost:4200/app",
    "LocationServicePath": "http://freegeoip.net/json/",
    "ContributorsCacheTimeout":  60 
  } 
}

Midtier

The Midtier section is used to configure the application server

  • Protocol: The HTTP protocol that should be used; possible values are http and https. It is advised to use http and to make use of a reverse proxy server such as Nginx to provide the SSL capability.
  • HostName: The hostname of the server, this can be a FQDN or an IPv4 IP address. When used in combination with a reverse proxy localhost is a good choice.
  • Port: The port on which the server is listening. When used in combination with a reverse proxy that handles HTTPS any value will do that is not in conflict with a used port. Your best bet is to select a value above 1000.
  • UploadDirectory: The directory used to upload temporary files, this is a relative path with respect to the root of the application.
  • FileStorageDirectory: The directory used to store files, this is a relative path with respect to the root of the application.

Backtier

The Midtier section is used to configure the connection to the database

  • HostName: The hostname or IP address of the PostgreSQL database, this can be a FQDN or an IPv4 IP address, when the midtier and backtier are installed on the same box your best choice is 127.0.0.1
  • Port: The port on which the PostgreSQL cluster is listening.
  • UserName: The username that is used to connect to the PostgreSQL database. The default installation uses "cdp4".
  • Password: The password that is used to connect to the PostgreSQL database. The default installation uses "cdp4".
  • Database: The name of the COMET database on the PostgreSQL cluster. The default installation uses "cdp4server".
  • DatabaseRestore: The name of the COMET Restore database on the PostgreSQL cluster. The default installation uses "cdp4serverrestore".
  • DatabaseManage: The name of the COMET management database on the PostgreSQL cluster. The default installation uses "cdp4manage".
  • StatementTimeout: The time to wait (in seconds) while trying to execute a command before terminating the attempt and generating an error. The default installation uses 180. Setting this value to zero means infinity.
  • LogSqlCommands: a value indicating whether SQL commands should by logged in the COMET Services log file, this is an experimental feature and should be set to false,
  • IsDbSeedEnabled: a value indicating whether the COMET Services can be seed with an ECSS-E-TM-10-25A Annex C.3 file. This should only be used when setting up a new server and loading the data from an Annex C.3 file, during production this value should be set to false,
  • IsDbRestoreEnabled: a value indicating whether the COMET Services can be restored. This is used during testing and development to quickly reset the content of the database. During production this value should be set to false.

Authentication Configuration

The authentication configuration is placed in the same folder as the Authentication plugin. The Community Edition only supports COMET Database Authentication. Multiple authentication plugins can be installed at the same time. The configuration files can be used to determine the rank (priority) in which authentication should occur. A typical scenario would be to use 1 LDAP server and as fallback the COMET Database Authentication plugin.

The default configuration is the following:

{
   "AuthenticatorConnectorProperties": [{
      "Rank": 0,
      "IsEnabled": true,
      "Name": "Basic Authentication",
      "Description": "Provides basic password authentication against the Person retrieved from the database."
   }]
}
  • Rank: the order in which the plugins should be executed, 0 is first
  • IsEnabled: a value indicating whether the plugin is enabled. The default installation uses true
  • Name: A descriptive name of the plugin, this value should not be changed from "Basic Authentication"
  • Description: a description of the authentication plugin, this value should not be changed from "Provides basic password authentication against the Person retrieved from the database."
Clone this wiki locally