travelling

Basic

TRAVELLING_PORT

Travelling’s serving port. </br>

Default: 443

TRAVELLING_IP

Travelling’s serving IP. </br>

Default: 0.0.0.0

TRAVELLING_KEY

The path to the SSL key that is used for https </br>

Default: travelling/localhost.key

TRAVELLING_CERT

The path to the SSL cert that is used for https </br>

Default: travelling/localhost.csr

TRAVELLING_HTTPS

Enables https serving. </br>

Default: travelling/localhost.csr

TRAVELLING_SERVICE_NAME

Changes the service’s urls and other functionality around it’s name. </br>

Default: travelling


Misc

TRAVELLING_MISC_CLOUDFLAREIP

If cloudflare sits infront of Travelling set this to true, so users have their real IP assigned to them. </br>

Default: false


Cors

Recommended to keep this disabled due to security reasons. Only enable this if you really need it and know the risks.

TRAVELLING_CORS_ENABLE

Allows external services to make api calls to Travelling. </br>

Default: false

TRAVELLING_CORS_HEADER_ORIGIN

_Full host path or wildstar _ host pathed subdomains to allow. This is returned back with all requests.* </br>

Default: Rewrites the origin to whatever external host is making the call. This allows all external calls allowed and is not recommended. </br> > Example: *.domain.com

TRAVELLING_CORS_HEADER_METHODS

access-control-allow-methods header that is returned back with all requests. </br>

Default: Rewrites it’s self to the access-control-request-method header request or sets to * if there is no request. </br> > Example: GET,DELETE

TRAVELLING_CORS_HEADER_CREDENTIALS

access-control-allow-credentials header that is returned back with all routes under /travelling/api/v1/auth/ </br>

Default: true </br>

TRAVELLING_CORS_HEADER_MAX_AGE

access-control-max-age header that is returned back with all CORS options request. </br>

Default: 3600 </br>


Logging

For maximum performance it is recommended to disable TRAVELLING_LOG_FASTIFY_LOGGER_REQUEST and TRAVELLING_LOG_FASTIFY_LOGGER

TRAVELLING_LOG_ENABLE

Enables TRAVELLING_LOG_LOGGER. </br>

Default: true

TRAVELLING_LOG_LOGGER

An absolute file path to a custom node.js logger. This must not be set for the settings TRAVELLING_LOG_LEVEL & TRAVELLING_LOG_COLORS to function. It also needs to support the same interface as Node’s built in console logger. </br>

Default: travelling/include/utils/logger.js

TRAVELLING_LOG_COLORS

Enables console colors to be used with TRAVELLING_LOG_LOGGER. </br>

Default: true

TRAVELLING_LOG_LEVEL

Sets the log level for TRAVELLING_LOG_LOGGER. The options are trace,debug,info,warn,error,fatal. </br>

Default: info

TRAVELLING_LOG_REQUESTS

Enables logging of every request of all requests with TRAVELLING_LOG_LOGGER. </br>

Default: true

TRAVELLING_LOG_UNAUTHORIZED_ACCESS

Enables logging of every unauthorized access requests made with TRAVELLING_LOG_LOGGER. </br>

Default: true


Fastify Logger

TRAVELLING_LOG_FASTIFY_LOGGER

Enables logging for fastify’s built-in pino logger. This can be set to a true/false value or a absolute path of a javascript file to set pino’s settings / implement a custom logger from the pino interface. </br>

Default: false </br> > Example: js file setting pino settings.

module.exports = {
  level: 'info'
};
TRAVELLING_LOG_FASTIFY_LOGGER_REQUEST

Enables logging of every request and response in pino’s format. Recommended not to have this and TRAVELLING_LOG_LOGGER enabled at once </br>

Default: true

TRAVELLING_LOG_FASTIFY_LOGGER_REQ_ID_HEADER

The name of the header that gets set by pino’s correlation id system. </br>

Default: travelling-req-id </br>

TRAVELLING_LOG_FASTIFY_LOGGER_REQ_ID_LOG_LABEL

The name of the property that gets set by pino’s correlation id system. </br>

Default: travellingReqID </br>


Portal

TRAVELLING_PORTAL_ENABLE

Enables the portal which has the client for login/logout/register/forgotPassword/oauth2Code functionality. This should always be enabled. </br>

Default: true

TRAVELLING_PORTAL_PATH

The route that travelling will serve the client at. </br>

Default: /travelling/portal/

TRAVELLING_PORTAL_HOST

This is used once on the first startup of Travelling during group initialization. This sets the remote host of a custom client to be served under the TRAVELLING_PORTAL_HOST path. </br>

Default: travelling/localhost.key

TRAVELLING_PORTAL_FILE_PATH

The absolute filepath to the root directory of the client files. Recommended not to be changed unless unless there is a need for a fully custom rewrite of Travelling’s client pages. </br>

Default: travelling/client/dist

The absolute filepath to the logo to be displayed on the client side. </br>

Default: travelling/client/assets/logo.svg

TRAVELLING_PORTAL_STYLES

The absolute filepath to the css file to be displayed on the client side. </br>

Default: travelling/client/assets/styles.css

TRAVELLING_PORTAL_ICON

The absolute filepath to the faveicon to be displayed on the client side. </br>

Default: travelling/client/assets/favicon.ico


Proxy

TRAVELLING_PROXY_TIMEOUT

How long in seconds the proxy should wait on a request to finish. 0 is Infinity </br>

Default: 0

TRAVELLING_PROXY_SEND_TRAVELLING_HEADERS

Allows Travelling to send permission/user/group based headers along with the proxy route </br>

Default: false

Header Description
un User’s Username.
uid User’s Id.
gn User’s Group’s name that allowed the request.
gt User’s Group’s type that allowed the request.
perm Permission’s name that allowed the request.

Redis

TRAVELLING_REDIS_ENABLE

Enables redis to be used when multiple instances of travelling are running and being load balanced against. </br>

Default: false Uses in memory store which could be problematic depending on how many groups and routes there are.

TRAVELLING_REDIS_URL

The URL to a redis instance to be used by travelling as a data store. </br>

Default: redis://127.0.0.1:6379/

TRAVELLING_REDIS_EVENTS_URL

The URL to a redis instance to be used by travelling as a pub/sub event system. </br>

Default: redis://127.0.0.1:6379/


Travelling uses a dual cookie system. One is a persistent token cookie for longterm login and the other is a short lived session cookie made to put less load on the system and speed things up making it not need to decrypt the token cookie every request.

The session secret used to generate the session cookie with. This needs to stay a secret and should be changed ever so often for security reasons </br>

Default: ` ` This needs to be set!

How long the session cookie will last for in seconds. Recommended to set it to the average number of seconds a user tends to use your service for. </br>

Default: 300

The token secret used to generate the persistent token cookie with. This needs to stay a secret and should be changed ever so often for security reasons </br>

Default: null This needs to be set!

The token salt used to generate the persistent token cookie with. This needs to stay a secret and should be changed ever so often for security reasons </br>

Default: null This needs to be set!

How long the persistent token cookie will last for in days. </br>

Default: 30

Adds JavaScript accessible cookie, called trav:ls, contianing the expiration of the trav:tok cookie. </br>

Default: true

How long the persistent token cookie will last for in days. </br>

Default: null

Enables cookie linked to remote ip’s. Disabling this removes one more layer of protection against CRSF attacks, but might be needed depending on your Cors settings. </br>

Default: true


USER

TRAVELLING_USER_ISOLATE_BY_DOMAIN

This allows users that have same username/email to register and be isolated by the domain property. This is useful if you have multiple websites and you want to keep your users isolated from each other. </br>

Default: false

TRAVELLING_USER_USERNAME_MINCHAR

The minimum amount of characters a username has to have. </br>

Default: 4

TRAVELLING_USER_USERNAME_ENABLE

Require users to have usernames </br>

Default: true

TRAVELLING_USER_LOCKED_MESSAGE

Require users to have usernames </br>

Default: Failed login attempts exceeded the limit. Contact your admin to get your account unlocked.


Authentication

TRAVELLING_PASSWORD_CONSECUTIVE

Disables user’s passwords from having any consecutive characters. </br>

Default: false

TRAVELLING_PASSWORD_MINCHAR

The minimum amount of characters a user’s password has to have </br>

Default: 8

TRAVELLING_PASSWORD_MAXCHAR

The maximum amount of characters a user’s password is allowed to have. Leaving this unset makes it unlimited </br>

Default: ` `

TRAVELLING_PASSWORD_SPECIAL

The minimum amount of special characters a user’s password has to have. </br>

Default: 30

TRAVELLING_PASSWORD_NUMBER

The minimum amount of numbers characters a user’s password has to have. </br>

Default: 1

TRAVELLING_PASSWORD_LOWERCASE

The minimum amount of lowercase characters a user’s password has to have. </br>

Default: 1

TRAVELLING_PASSWORD_UPPERCASE

The minimum amount of uppercase characters a user’s password has to have. </br>

Default: 1

TRAVELLING_LOGIN_MAX_LOGIN_ATTEMPTS

The maximum amount of failed login attempts until a user is locked. </br>

Default: 10


OAUTH2

TRAVELLING_TOKEN_ACCESS_EXPIRATION

How long a OAUTH2 Access token will last for in minutes. </br>

Default: 1440

TRAVELLING_TOKEN_CODE_EXPIRATION

How long a OAUTH2 Code token will last for in minutes. </br>

Default: 5

TRAVELLING_TOKEN_CODE_AUTHORIZE_FLOW

Enforces the user to click a authorize button to allow a client to login for the user. </br>

Default: true


Postgres

TRAVELLING_DATABASE_URL

The Postgres connection url for Travelling to connect to. </br>

Default: null

TRAVELLING_DATABASE_USER

The Postgres user. </br>

Default: null

TRAVELLING_DATABASE_PASSWORD

The Postgres password. </br>

Default: null

TRAVELLING_DATABASE_PORT

The Postgres port. </br>

Default: null

TRAVELLING_DATABASE_NAME

The Postgres databases name. </br>

Default: null

TRAVELLING_DATABASE_HOST

The Postgres host. </br>

Default: null

TRAVELLING_PG_CRYPTO_IMPLEMENTATION

The absolute path to the encryption interface that is used for Travelling’s database encryption fields. If a custom implementation is wanted please check out travelling/include/utils/cryptointerface.js for methods needed to be functional. </br>

Default: travelling/include/utils/cryptointerface.js

TRAVELLING_PG_CRYPTO_IMPLEMENTATION_SECRET

The secret used inside TRAVELLING_PG_CRYPTO_IMPLEMENTATION. This needs to stay a secret and should be changed ever so often for security reasons. </br>

Default: null This needs to be set!

TRAVELLING_PG_CRYPTO_IMPLEMENTATION_SALT

The salt used inside TRAVELLING_PG_CRYPTO_IMPLEMENTATION. This needs to stay a secret and should be changed ever so often for security reasons. </br>

Default: null This needs to be set!

TRAVELLING_PG_CRYPTO_ENCRYPT_USER_DATA

Enables the user_data field inside the user object to be encrypted. If sensitive data is stored in within that field it is recommended to enable this. </br>

Default: false


Email

TRAVELLING_EMAIL_VALIDATION_EXTERNAL_ENABLE

Enable external email endpoint for email validation </br>

Default: false

TRAVELLING_EMAIL_VALIDATION_EXTERNAL_ENDPOINT

Full url for endpoint for email validation </br>

Default: null

TRAVELLING_EMAIL_VALIDATION_EXTERNAL_EMAIL_IN_ENDPOINT

Appends the users email to the end of the supplied endpoint. EX: http://test.com/email/test@test.com </br>

Default: true

TRAVELLING_EMAIL_VALIDATION_EXTERNAL_EMAIL_IN_BODY

Sends the users email as text as a body to the supplied endpoint </br>

Default: false

TRAVELLING_EMAIL_VALIDATION_EXTERNAL_METHOD

Supplied endpoint’s HTTP Method to use </br>

Default: GET

TRAVELLING_EMAIL_FROM

The email that will be used as the from address. Recommended to set it to a no-reply email address </br>

Default: null

TRAVELLING_EMAIL_RECOVERY_EXPIRATION

The number of seconds for the email recovery link to last for. Recommended to keep this somewhat short-lived for security reasons. </br>

Default: 900

TRAVELLING_EMAIL_ACTIVATION_EXPIRATION

The number of seconds for the email activation link to last for. </br>

Default: 86400

TRAVELLING_EMAIL_TEST_ENABLE

Enables the use of a test email service that will display the login credentials inside the log at start. This is used by our integration test. However, it is helpful to enable this if custom Templates are written. Only one type of email support should be used Test, SMTP or AWS. </br>

Default: false

TRAVELLING_EMAIL_SMTP_ENABLE

Enables the use of a SMTP email service. Only one type of email support should be used Test, SMTP or AWS. </br>

Default: false

TRAVELLING_EMAIL_SMTP_HOST

The host of the SMTP service. </br>

Default: 127.0.0.1

TRAVELLING_EMAIL_SMTP_PORT

The port of the SMTP service. </br>

Default: 465

TRAVELLING_EMAIL_SMTP_SECURE

Enables TLS for SMTP. </br>

Default: true

TRAVELLING_EMAIL_SMTP_AUTH_USER

Username for SMTP service. </br>

Default: null

TRAVELLING_EMAIL_SMTP_SECURE

Password for SMTP service. </br>

Default: null

TRAVELLING_EMAIL_SMTP_TLS_REJECT_UNAUTHORIZED

Enables rejection of TLS certs that are self served or invalid. Recommended to keep it enabled for security reasons. </br>

Default: true

TRAVELLING_EMAIL_AWS_ENABLE

Enables the use of the AWS SES email service. Only one type of email support should be used Test, SMTP or AWS. </br>

Default: false

TRAVELLING_EMAIL_AWS_CONFIG

The absolute path to the AWS json credentials config to use for accessing the SES service. See AWS’s configuration documentation on the format of this file. </br>

Default: null // This needs to be set to use AWS SES email service.

Templates

Templates all use html/handlebars. Check out the example default templates inside the travelling/templates/ folder for examples.

Reset Template Variables:

Variable Description
` | This is the user object for the reset email. Use dot notation to access any of its properties for example:`.  
| This is the config object for Travelling. Use dot notation to access any of its properties for example.  
` ` The reset token that Travelling needs to reset the password. Recommended to just copy and paste the full a href from the TRAVELLING_EMAIL_RESET_PASSWORD_TEMPLATE_BODY.
`` This is the IP object from the user requesting the reset password. The following properties are valid. query,city, regionName, country.

Activation Template Variables:

Variable Description
` | This is the user object for the activation email. Use dot notation to access any of its properties for example:`.  
| This is the config object for Travelling. Use dot notation to access any of its properties for example.  
` ` The reset token that Travelling needs to activate the user’s account. Recommended to just copy and paste the full a href from the TRAVELLING_EMAIL_ACTIVATION_TEMPLATE_BODY.
TRAVELLING_EMAIL_RESET_PASSWORD_TEMPLATE_BODY

The absolute path to the email reset password template body. This is used as the body inside all reset password emails. </br>

Default: travelling/templates/email-reset-password-body.html

TRAVELLING_EMAIL_RESET_PASSWORD_TEMPLATE_SUBJECT

The absolute path to the email reset password template subject. This is used as the subject line inside all reset password emails. </br>

Default: templates/email-reset-password-subject.html

TRAVELLING_EMAIL_ACTIVATION_TEMPLATE_BODY

The absolute path to the email activation template body. This is used as the body inside all activation emails. </br>

Default: templates/email-activation-body.html

TRAVELLING_EMAIL_ACTIVATION_TEMPLATE_SUBJECT

The absolute path to the email activation template subject.This is used as the subject line inside all activation emails. </br>

Default: templates/email-activation-subject.html


Registration

TRAVELLING_REGISTRATION_REQUIRE_EMAIL_ACTIVATION

Enables the requirement of each newly registered user to activate their account through the email link. </br>

Default: false

TRAVELLING_REGISTRATION_REQUIRE_MANUAL_ACTIVATION

Enables the requirement of each newly registered user to have a active user with permissions to unlock their account for them. </br>

Default: false