Connection Configuration on D2000

Connection Configuration on D2000

The connection between SmartWeb and the D2000 core is implemented through the proprietary d2japi library and the D2Connector.exe process running on the D2000 side. SmartWeb can connect in two ways:

  • Direct — SmartWeb actively opens TCP connections to one or more D2Connector.exe processes (configured via smartweb.connections[]).

  • Reverse (listenable) — SmartWeb opens a listening port and waits for D2Connector.exe to connect to it. This mode is suitable when SmartWeb is deployed in a DMZ and the connection must be initiated by D2000 (configured via smartweb.listenableConnection).

Only one of these two modes can be configured at a time.

[!WARNING] For the connection between SmartWeb and D2000 to succeed, the version of the SmartWeb platform must match the version of the D2000 system. For example, with D2000 version 26.0.x you must use the SmartWeb build 26.0.x.Bxx (where xx is the build number of the given version).

Direct connection to D2000

smartweb: # Redundant direct JAPI connections to D2Connector processes on the D2000 side. # At most one connection is active at a time; on a failure SmartWeb switches to the next entry. connections: - name: primary host: d2server.example.com # hostname or IP address port: 3120 certificatePath: config/cert/d2connector-cert.crt # optional public X.509 certificate for TLS - name: backup host: d2server-backup.example.com port: 3120 certificatePath: config/cert/d2connector-cert.crt

The smartweb.connections[] array contains a list of redundant JAPI endpoints. SmartWeb (through the JAPI library) automatically maintains exactly one live connection at any given moment. When the active connection fails, SmartWeb switches to the next entry. All current sessions of universal API clients as well as of web applications are closed and the users are redirected to the login screen — they must log in again.

Property

Description

Property

Description

name

Logical name of the connection (used in logs and monitoring)

host

Hostname or IP address of the D2Connector process

port

TCP port on which D2Connector listens

certificatePath

Optional path to the public X.509 certificate (.crt) used to verify the D2000 side in a TLS-encrypted connection

Reverse connection with D2000

smartweb: # Reverse JAPI connection — SmartWeb opens a port, D2Connector connects to it. listenableConnection: bindingInterface: 0.0.0.0 # network interface to listen on port: 3120 certificatePath: config/cert/d2connector-cert.crt # optional TLS certificate allowedHosts: # optional list of allowed source IPs / hostnames - 168.12.35.40 - d2connector.example.com

Property

Description

Property

Description

bindingInterface

The network interface the listening port is bound to. The value 0.0.0.0 listens on all interfaces, 127.0.0.1 restricts listening to the local machine only.

port

The TCP port number on which SmartWeb waits for an incoming connection from the D2Connector process.

certificatePath

Optional path to the public X.509 certificate (.crt) used for TLS encryption of the reverse channel.

allowedHosts

Optional list of IP addresses or hostnames from which connections are accepted. If omitted, any machine may connect.

TLS encryption of the JAPI connection

For an encrypted JAPI connection (both direct and reverse), the certificatePath property must reference the public X.509 key generated on the D2000 side (d2connector-cert.crt). The procedure for generating and deploying these certificates on the D2000 side is described in the D2000 documentation.