...
This section contains another JSON object named "LogLevel", which defines the level of detail of the log outputs. The property "Default" contains the standard setting, other existing properties define different settings for certain .NET namespaces. The following values are supported for the level of detail: "Trace", "Debug", "Information", "Warning" and "Error".
Example:
Code Block |
---|
... |
...
"Logging": { |
...
"LogLevel": { |
...
"Default": "Information", |
...
"IdentityServer4": "Warning", |
...
"Microsoft": "Warning", |
...
"Microsoft.Hosting.Lifetime": "Information" |
...
} |
...
}, |
...
... |
If required, the level of detail can be specified depending on the logging target (console, event log, etc.). Further information can be found under the following link:
...
This section provides configurations for the Connect Server's built-in Identity Server used for authenticating users. The default configuration is useful for development environments or for closed networks since it does not require any additional adjustments. However, if the Connect Server is to be accessible via the Internet, these settings should be adapted. More information about this can be found at the following link:
...
Example:
Code Block | ||
---|---|---|
| ||
... |
...
"IdentityServer": { |
...
"Key": { |
...
"Type": "Development" |
...
}, |
...
"Clients": { |
...
"GalileoGroup.Connect.Server.Frontend": { |
...
"Profile": "IdentityServerSPA" |
...
} |
...
} |
...
}, |
...
... |
The “AllowedHosts” section (JSON value of type String)
This section allows you to restrict the host names to which the web server is bound. Thus, access via unwanted host names or via IP addresses can be prevented. Multiple values can be separated by a semicolon. For more information, see the following link:
...
Example:
Code Block | ||
---|---|---|
| ||
... |
...
"AllowedHosts": "connect.mycompany.com;localhost", |
...
... |
The “Connect” section (JSON object)
...
This section contains settings for error analysis. The following settings are currently supported:
Property | Type | Function |
EnableHttpRequestLogging | Boolean | Enables logging of all incoming http requests. |
The “Passwords” section (JSON object)
...
The following variables are predefined by the Connect Framework, but can be redefined:
Variable | Default value |
ApplicationPath | The installation directory of the Connect Server. |
CertificatePath | {ApplicationPath}/Certificates |
RepositoryPath | {ApplicationPath}/Repositories |
These defaults are always used if no other variable value is defined or if the variable has been assigned the value “auto”.
...
This section contains configuration data for connecting to the databases used by the application. For each database, a child JSON object must be created whose name corresponds to the internal ID of the associated database. The Connect Server uses the following databases:
Database ID | Function |
Identity | Identity Server Users and Permissions |
Monitoring | Database for the collection of monitoring data |
Operations | Database for storing expiration data |
The following information can be stored for each database:
Property | Type | Function |
Type | String | Type of database. Normally "Sqlite" is used here, "SqlServer" is currently supported experimentally. Support for "MySql" is planned, but currently the final implementation of the EF Core Adapter for .NET 5.0 is not yet available. |
ConnectionString | String | The connection string for the database to use. |
LogLevel | String | The desired level of detail for database-specific log output. The values "Trace", "Debug", "Information", "Warning" and "Error" are supported. |
EnableSensitiveDataLogging | Boolean | If this value is set to "true", field contents are also output during logging, otherwise they are always suppressed. |
EnableDetailedErrors | Boolean | If this value is set to "true", detailed error messages from the database are output during logging. |
The "SupportedLanguages" section (JSON array with values of type String)
...
This section is used to configure the integrated web server. The following values can be stored here:
Property | Type | Function |
Type | String | To use the integrated web server, use the value "Kestrel". Since this is the default setting, the value "Kestrel" is also used if this property is missing. On Windows, the value "IIS" can be used to enable hosting within IIS. In this scenario, the endpoints configured here are ignored, as these are defined via the bindings in IIS. You can find more information about hosting in IIS under the following link: https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-5.0 |
RootPath | String | Specifies the root directory of the web server. It is recommended not to change this value, as this may cause page effects when hosting the WebAssembly based frontend. |
Endpoints | Array | This array of JSON objects specifies the endpoints of the integrated web server. The property "Uri" contains the URI of the desired endpoint. Schema and host are mandatory, the specification of a port is optional. If no port is specified, the respective default ports (80 for HTTP and 443 for HTTPS) are used. If no IP address is specified as the host, the specified name is converted into an IP address using DNS lockup. The IP addresses 0.0.0.0 or * represent all available IP addresses of the server. When using HTTPS, the property "CertificateSource" must also be specified, which can have different values. Which value must be specified is defined by where the certificate is located. If the certificate is located in the store, the value must correspond to the requestor. For example, if the requestor of the certificate is "CN = localhost", the value for "CertificateSource" must be "localhost". The direct path to a certificate or its file name can also be specified. If only a file name is specified, this is searched for in the path defined by the "CertificatePath" path variable. For this the value can be e.g. like "test.cer|" or "test.cer|NochEinPassword". Here "test.cer" is the filename of the certificate and "NochEinPassword" is the password to access the private key of the certificate. The separator "|" is mandatory, no matter if a password is entered or not. If there is no password, the value ends with a "|". The use of multiple certificates on the same endpoint is currently not supported. If an endpoint can be reached via different hostnames, these must be listed in a certificate. Wildcard certificates are supported without restrictions. |
Special considerations when configuring the Identity Server
...
If a value with the name "AutoCreate" and the value "true" is created within the "Key" section, then, if the referenced certificate file does not exist, a self-signed certificate is generated at startup. This behavior is primarily intended to allow the server to start without manual configuration changes.
Example:
Code Block | ||
---|---|---|
| ||
... |
...
"IdentityServer": { |
...
"Key": { |
...
"Type": "File", |
...
"FilePath": "connect.pfx", |
...
"Password": "Connect!", |
...
"AutoCreate": true |
...
}, |
...
... |
If there is no file with the name "connect.pfx" in the directory specified under "CertificatePath", a self-signed certificate is created at startup and stored using this name. The password "Connect!" specified here is used for the encryption of the private key.
...
The following example shows the possible Connect-specific configuration settings:
Code Block | ||
---|---|---|
| ||
... |
...
"Connect": { |
...
"Server": { |
...
"BaserUri": "connect.mycompany.com", |
...
"Debug": { |
...
"EnableHttpRequestLogging": false |
...
}, |
...
"Passwords": { |
...
"EnableEncryption": false, |
...
"EncryptionAlgorithm": "None", |
...
"EncryptionKey": "" |
...
}, |
...
"Paths": { |
...
"ApplicationPath": "auto", |
...
"CertificatePath": "{ApplicationPath}/Certificates", |
...
"RepositoryPath": "{ApplicationPath}/Repositories" |
...
}, |
...
"Database": { |
...
"Identity": { |
...
"Type": "Sqlite", |
...
"ConnectionString": "Data Source={RepositoryPath}/identity.db", |
...
"LogLevel": "Error", |
...
"EnableSensitiveDataLogging": false, |
...
"EnableDetailedErrors": false |
...
}, |
...
"Monitoring": { |
...
"Type": "Sqlite", |
...
"ConnectionString": "Data Source={RepositoryPath}/monitoring.db", |
...
"LogLevel": "Error", |
...
"EnableSensitiveDataLogging": false, |
...
"EnableDetailedErrors": false |
...
}, |
...
"Operations": { |
...
"Type": "Sqlite", |
...
"ConnectionString": "Data Source={RepositoryPath}/operations.db", |
...
"LogLevel": "Error", |
...
"EnableSensitiveDataLogging": false, |
...
"EnableDetailedErrors": false |
...
} |
...
}, |
...
"SupportedLanguages": [ "de", "en", "it", "es", "fr", "nl" ] |
...
, "Webserver": { |
...
"Type": "Kestrel", |
...
"RootPath": "{ApplicationPath}/wwwroot", |
...
"Endpoints": [ |
...
{ |
...
"Uri": "http://*:8080" |
...
}, |
...
{ |
...
"Uri": "https://*:8443", |
...
"CertificateSource": "certificate.pfx|" |
...
} |
...
] |
...
} |
...
} |
...
} |
...
... |
Overriding configuration settings
...
You can find more information on this topic at the following link:
...
Example:
Code Block | ||
---|---|---|
| ||
SET DOTNET_Connect__Server__Webserver__Type=IIS |
Override via the command line
...
You can find more information on this topic at the following link:
...
Example:
Code Block | ||
---|---|---|
| ||
GalileoGroup.Connect.Server.Backend.exe Connect:Server:Webserver:Type=IIS |