Pre-Shared Keys (PSK)

Pre-Shared Keys are set up on one side as a server and on the other side for authentication and authorization.

Setting up Pre-Shared Keys as a server

Pre-Shared Keys are normally used with server connections.
The configuration takes place via an entry in the route configuration.

To do this, the following entries can be made in the file C:\TwinCAT\3.x\Target\StaticRoutes.xml :

<?xml version="1.0"?>
<TcConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<RemoteConnections>
<Server>
<Tls>
<Psk>
<Identity>MY_IDENTITY</Identity>
<Pwd>MySecret</Pwd>
</Psk>
<Psk>
<Identity>MY_IDENTITY2</Identity>
<Pwd>MyOtherSecret</Pwd>
</Psk>
</Tls>
</Server>
</RemoteConnections>
</TcConfig>

Saved changes are accepted when the TwinCAT router is initialized, which takes place, for example, during the transition RUN->CONFIG or CONFIG->CONFIG.

Use of a Pre-Shared Key server

When adding a route, the entry Pre-Shared Key (PSK) is selected and the corresponding credentials are entered.

Pre-Shared Keys (PSK) 1:

If this is successful, a specific route is stored in the target system and is used for the future establishment of connections.