From this menu the Kestrel Web Server used by Linkar Web Services is configured. It is an editor of the appsettings.json file.
Kestrel
Linkar Configuration
From this section we define the Authentication Mode with which the APIs that will be executed in the same LinkarWS instance will work.
Field
|
Type
|
Description
|
Admin Mode
|
Switch
|
Use this option to enable/disable access to LinkarWS Manager, to avoid unwanted login attempts. If this option is disabled, it will be necessary to access the AppSettings.json file and set the 'AdminMode' field to true in order to access LinkarWS Manager again.
|
Authentication Mode
|
Required
|
None, ApiKey, OAuth 2.0, IdentityServer4
|
Create Service
Delete Service
|
Button
|
The Create Service option allows the installation of a Service from where LinkarWS is executed. The Service data is mandatory.
The Delete button will delete the service, but it has to be stopped first.
|
Service Name
|
Required in Service Mode
|
The name of the Service. Only numbers and letters are accepted
|
Service Display Name
|
Required in Service Mode
|
The literal that will appear in the machine's list of services
|
Service Description
|
Required in Service Mode
|
A brief description of what the API does
|
In case of choosing OAuth 2.0 Authentication Mode, below fields are required:
Field
|
Type
|
Description
|
Symmetric Security Key
|
Required
|
Key used to both encrypt and decrypt the information coming from the Client. It must be at least 64 characters long.
More information at https://openid.net/specs/openid-connect-core-1_0.html#SymmetricKeyEntropy
|
Token Expiration
|
Required
|
Lifespan in which the token generated by the authentication will be valid. The value must be expressed in minutes.
|
Issuer
|
Required
|
Issuer Identifier for the Issuer of the response. The iss value is a case sensitive URL using the https scheme that contains scheme, host and, optionally, port number and path components and no query or fragment components. For instance https://myoauth20.api.com
More info in https://openid.net/specs/openid-connect-core-1_0.html#IssuerIdentifier
|
Audience
|
Required
|
The audience value is a string in most of the cases.
It's the base address of the resource being accessed, such as https://test-api.
The audience (presented as the aud claim in the access token) defines the intended consumer of the token.
This is typically the resource server (API, in the dashboard) that a client (Application) would like to access.
More info in https://www.rfc-editor.org/rfc/rfc7519#section-4.1.3
|
The fields for the IdentityServer4 Authentication are:
Field
|
Type
|
Description
|
Default Scheme
|
Required
|
Value provided by IdentityServer4.
More info at https://identityserver4.readthedocs.io/en/latest/index.html
|
Authentication Scheme
|
Required
|
Value provided by IdentityServer4.
More info at https://identityserver4.readthedocs.io/en/latest/index.html
|
Authority
|
Required
|
Value provided by IdentityServer4.
More info at https://identityserver4.readthedocs.io/en/latest/index.html
|
API Name
|
Required
|
Value provided by IdentityServer4.
More info at https://identityserver4.readthedocs.io/en/latest/index.html
|
|
Allowed Hosts
The computer on which the LinkarWS application is installed can have multiple hosts linked to it. If you want the LinkarWS application to only respond to one or several of these hosts, you can use this property to indicate it. To do so, the host name is indicated and if there are several hosts, they must be separated by semi-colons. For example "linkarws.com;localhost". When this property has the value "*", it means that the application will accept requests from any host linked to the equipment.
Important: this parameter is not used to filter external url's that make requests to Kestrel
You can find more information here
|
Serilog Configuration
Serilog is a .NET framework for the creation of Logs generated by Kestrel. In this section the basic options are configured:
.
Field
|
Type
|
Description
|
Serilog Path
|
Required
|
Path to the folder where the logs will be saved.
|
outputTemplate
|
Required
|
Format of the file name. More information at https://github.com/serilog/serilog/wiki/Configuration-BasicsAPI
|
fileSizeLimitBytes
|
Required
|
Maximum size limit of the log file
|
rollOnFileSizeLimit
|
Required
|
Roll when the file reaches fileSizeLimitBytes.
|
rollingInterval
|
Required
|
Create a log by day or other interval (Minute, Hour, Day, Month, Year).
|
retainedFileCountLimit
|
Required
|
Value indicating the maximum number of log files to keep..
|
restrictedToMinimumLevel
|
Required
|
Allows to filter the number of logs to write based on their importance: Verbose, Debug, Information, Warning, Error, Fatal.
By default LinkarWS uses Warning mode
|
The Serilog node > restrictedtoMinimumLevel node specifies the type of detail to be recorded.
Level
|
Use
|
Verbose
|
The noisiest level, rarely (if ever) enabled in a production application.
|
Debug
|
Used for internal system events that are not necessary to observe from the outside, but useful for determining how something happened.
|
Information
|
Describes what happens in the system that corresponds to its responsibilities and functions. Generally, these are the observable operations that the system can carry out.
|
Warning
|
Event level used when the service is degraded, compromised or is performing outside expected parameters.
|
Error
|
Level used when functionality is not available or expectations fail.
|
Fatal
|
The most critical level. Fatal events require immediate attention.
|
More information at https://github.com/serilog/serilog-sinks-file
You can add more parameters manually in the appsettings.json file at your own risk, more information at https://serilog.net/
|