Configuration file
The Sage X3 Versions 7 and above web server platform is based on node.js, and uses a configuration file called 'nodelocal.js', which is located in the default 'node.js' directory. In this file, some default values can be set up. They are listed as follows:
This lists all allowed authentication methods. It can be a string (for only 1 method) or an array. The values of the string (or array elements) can be:
"basic"
for basic authentication,"oauth2"
Authentication with an OAuth2 server,"bearer"
Authentication with OAuth2 bearer token for Web services (see documentation for OAuth2 for more details)"saml2"
Authentication with a SAML2 identity provider,"certificate"
Authentication using a client certificate from SSL with client authentication. The common name from the certificate's subject's DN will be taken as login user. This method has precedence over other authentication methods when a client connects via SSL with client authentication."sage-id"
Authentication with Sage IDFor Sage ID authentication, there must also be the a section "sage_id" providing "baseUrl", "pfxFile" and "passphrase".
When a client connects using SSL with client authentication, user specific login (including basic authentication) is only possible when "certificate" is no valid authentication method, otherwise the program will automatically authenticate with the common name from the certificate.
For non interactive users (e. g. REST client, Web service client), only the methods "certificate" and "basic" are possible.
Usually, during the login process, a login name which contains @
, is searched in the email field of the user table, and when it does not contain @
, it will be searched in the login field of the user table. There are some exceptions:
* users whose login field contains @
and whose email field is empty, will be found
* when there is the setting authAlwaysLogin: true
in the session
section, then always the login field will be searched.
The Versions 7 and above platform can work and be configured with different databases, but a first database must be set up through the setup process to store fundamental data and settings. The following values are set (in the collaboration
section):
driver
: Database driver (currently only mongodb
is supported).hostname
: Name of the host with a database (for example, localhost
).port
: Port for the database contact on the database host (for example, 27017
).dataset
: Internal name of the database used (for example, syracuse
).The automatic traces generated for diagnoses purpose are set up in a traces
section, with the following properties:
maxSize
and maxFiles
) to define the trace file rotation policy.level
structure in which, for every category, a level is given directly (or given in a sub-structure per category).This gives a section like this one:
traces: {
maxSize: "5m",
maxFiles: 3,
levels: {
// Example for tracers with submodules
orm: { // Object-relational mapping
factory: "info", // Syracuse entities management
x3: "debug", // X3 entities management
mongodb: "error", // MongoDB interactions
},
// Example for tracers without submodule
search: "debug", // Elastic search communication
}
},