configuration.md

August 25, 2015 ยท View on GitHub

Configuration

Server Settings

Anvil Connect loads its configuration from a JSON file in the config directory of the current working directory for the process. File names must match the NODE_ENV value. If NODE_ENV is not set, config/development.json will be loaded.

SettingTypeDefaultDescription
issuerstring(none)URI used to identify issuer of authentication
portinteger3000Port the Connect server is bound to
cookie_secretstring(generated)Secret string used to sign secure cookies
session_secretstring(generated)Secret string used to sign session ID cookies
client_registrationstringscopedType of client registration - dynamic, token, or scoped (Explanation)
trusted_registration_scopestringrealmScope used to identify trusted clients.

OpenID Metadata

OpenID Provider Metadata default values can be overridden by defining them in the configuration file. Don't change these unless you know what you're doing.

Configuring Redis

Configuring the mailer

Configuring the logger

Key pairs

If you generated a deployment repository with nv init, a new RSA key pair will be generated for you in connect/config/keys. This pair of files is required for signing and verifying tokens. If the server does not find key pairs when starting, it will attempt to generate them for you using the OpenSSL package installed on your system. Mac and most Unix and Linux based systems include OpenSSL by default. You can also install it on Windows.

If you want to provide your own RSA key pair files, you can generate them manually with OpenSSL.

$ cd PROJECT_ROOT
$ mkdir -p connect/config/keys
$ openssl genrsa -out connect/config/keys/private.pem 4096
$ openssl rsa -pubout -in connect/config/keys/private.pem -out connect/config/keys/public.pem