Skip to main content
Version: 2.8

WebControl Driver Configuration

Plugin Configuration

The plugin configuration file is named settings.json located in <install directory>\Config\HumanOS.UHAL.WebControl\. It contains all global settings of the plugin.

See Generic Plugin Configuration for more details.

Plugin Configuration Extension

The WebControl Plugin extends the Generic Plugin Configuration with

  • Whitelist of Trusted Certificates

Figure 1: Configuration model of this plugin

Extension: Whitelist of Trusted Certificates

Typically, the web control verifies the certificates of HTTPS connections automatically. The default behavior of verification errors is to deny the connection. However, to use self-signed certificates you have to trust or whitelist them.

CAUTION

We don't recommend to use this feature!

Best practice is to put your certificate into the trusted certificate store and NOT white list them. Use the white listing only for development and testing!

Put the hash of the certificate to the CertificateWhiteList.

Example:

{
"Disabled": false,
"CertificateWhiteList": [
"03a6177445cf31a5f0cf18c811457c9b8e8f08e8",
"7604E6613BE789D5A92DEA1BBD1FD067ABCFD22C"
],
"Devices": [
{
"MainTaskProcessor": {
"Name": "Main TaskProcessor",
"ProcessingPriority": "Normal",
"MaxSchedulingTimeSlice": 200,
"MinSchedulingTimeSlice": 10
}
}
]
}

Device Information File

The device information file is used to configure the access to the http devices. It contains:

  • Id: unique device id (GUID), which MUST match the device license id.
  • DriverId: BE79A86B-38EE-4FAA-805A-1DB46A06E65D
  • Address: Connection address
  • Data Access
  • Commands

See Device Information Model for more details.

Connection Address

The address contains the base URL, including http:// or https://.

Additional Properties

Following properties precise the connection:

NameDescriptionData Type
AcceptAccepted content type, e.g. application/jsonSystem.String
ContentTypeContent type, e.g. application/jsonSystem.String
IgnoreCertificateErrorsFlag, to ignore certificate errors coming from the REST API server,System.Boolean
UHAL:LogFileNameAdditional log file to trace HTTP requests and responsesSystem.String
UHAL:LogFileRetentionLog file retention time in daysSystem.Int32
UHAL:LogMinimumTraceMinimum trace level, like "Information", "Debug", "Warning" or "Error"System.String

Example:

{
"Name": "WebControl 1",
"Id": "50EFD36B-95D4-450F-A1FB-16969CE70DB9",
"DriverId": "BE79A86B-38EE-4FAA-805A-1DB46A06E65D",
"Address": "http://localhost:48888",
"Properties": [
{
"Name": "UHAL:LogFileName",
"Value": "$(AppConfig:CommonAppPath)TestLogFile.txt"
},
{
"Name": "UHAL:LogFileRetention",
"Value": 1,
"DataType": "System.Int32"
},
{
"Name": "UHAL:LogMinimumTrace",
"Value": "Information"
}
]
}

Properties for Additional Header Fields

Additional header fields can be added with special properties named CustomHeader:<HeaderFieldName>.

Example:

{
"Name": "CustomHeader:my-token",
"Value": "7337djdsjduu22ejs"
}

Monitoring the Server Connection

The web control plugin provides the possibility to monitor the connection to the target server.

The device information can be extended with following properties:

NameDescriptionData Type
Monitored.AddressSubpath to be used for monitoring. Use / to use the server address directly.System.String
Monitored.MethodHttp Method to be used. Default is GET.System.String
Monitored.RequestContentHttp payload for methods POST, PUT, etc. Default is empty.System.String

Examle:

{
"Id": "1922232b-edf8-4019-b8ae-80a6dcedcb7c",
"Name": "TestServer",
"DriverId": "BE79A86B-38EE-4FAA-805A-1DB46A06E65D",
"Address": "https://192.168.0.99:8080",
"Properties": [
{
"Name": "Accept",
"Value": "application/json"
},
{
"Name": "ContentType",
"Value": "application/json"
},
{
"DataType": "System.String",
"Name": "Monitored.Address",
"Value": "api/ctdc/sections"
},
{
"DataType": "System.String",
"Name": "Monitored.Method",
"Value": "GET"
},
{
"DataType": "System.String",
"Name": "Monitored.RequestContent",
"Value": ""
}
],
...
}