Config - UoGSOCIS/website GitHub Wiki
Site configuration
/config.ini
All site configuration is done through the config.ini
file in the root
of the project. This impacts a number of modules across the web
application. Configuration options and an example configuration are below.
Config Properties
database
Property |
Description |
connections |
(integer) number of connections in the connection pool |
db |
(string) name of the database to use |
host |
(string) mongodb server host name |
user |
(string) username to use when accessing tables |
passwd |
(string) the password used to log into the mongodb server |
server
Property |
Description |
port |
(integer) the port number to run the server on |
mode |
(string) either "development" or "production" |
verbose |
(boolean) enable or disable verbose logging |
logs
Property |
Description |
logdir |
(string) path to the directory where log files should be stored |
mail
Property |
Description |
host |
(string) SMTP server host name |
port |
(integer) SMTP port |
auth |
(boolean) indicates if authorization via login is required to send mail |
user |
(string) username to use to log into mail server |
passwd |
(string) password to use to log into mail server |
session
Property |
Description |
secret |
(string) the session secret; should be randomly generated |
jwt
Property |
Description |
aud |
(string) The expected value for the aud claim in the JSON Web Tokens |
iss |
(string) A string that is the valid issuer for the token |
publicKey |
(string) This is the path to RSA public key used to verify signatures, for the authentication system within the site |
privateKey |
(string this key must match the publicKey . This is the path to RSA private key used to sign tokens within the site |
google
Property |
Description |
aud |
(string) The expected value for the aud claim in the JSON Web Tokens |
iss |
([string]) An array of strings that contain the valid issuers for the token |
keyURL |
(string) the URL where the JSON Web Key can be retrieved from to verify the JWT signature |
publicKey |
(string) optional, if this is present then the keyURL will not be used. This is the path to RSA public key used to verify signatures |
privateKey |
(string) optional, this key must match the publicKey . This is the path to RSA private key used to sign tokens |
Example config.ini
[database]
connections = 500
db = socis_app
host = localhost
user = root
passwd = mongoDbRootPassword
[server]
port = 3000
mode = development
verbose = false
[logs]
logdir = /tmp/socis_logs
[mail]
host = smtp.example.com
port = 25
auth = false
user = false
passwd = false
[session]
secret = keyboard cat
[jwt]
aud=socis.ca
iss=socis.ca
publicKey=authentication/public.pem
privateKey=authentication/private.rsa
[google]
keyURL=https://www.googleapis.com/oauth2/v3/certs
iss[]=accounts.google.com
iss[]=https://accounts.google.com
aud=<google client id>