.NET Based OPC UA Client/Server SDK
3.3.0.530
|
This example shows how to register the server application at a Global Discovery Server (GDS) and receive and use a signed certificate and a trust list managed by the GDS.
When implementing the Push Management, the GDS will be responsible for updating the server certificate and trust list. When implementing the Pull Management, the server itself is responsible for getting the certificate and the trust list from the GDS.
The GDS application must be elevated as SecurityAdmin to be able to push a certificate or a trust list to the server. The Role assignment to a specific user or the GDS application shall be configured in the RoleConfiguration file.
When specifying a user, the user credentials must be known by the GDS. The credentials can be set in the GDS Configuration Tool. Alternatively the Role SecurityAdmin can be assigned to GDS application. In this case the server ApplicationUri of the GDS must be known on server side.
The Push Configuring the servers is described in the documentation of the GDS.
The data entered in "Step 3: Configure Push" is dependent on the role configuration. If the GDS application gets the SecurityAdmin Role by its ApplicationUri, the Authentication Settings can be set to Anonymous.
The server application can register itself at the GDS using the class GdsRegisterManagement. An instance of this class shall be set at ApplicationInstanceBase.GdsHandler before the application has been started. Additionally the EndpointUrl of the GDS has to be set in the application settings of the server application.
The class GdsRegisterManagement has several EventHandlers that can be implemented by the application.
After the server has been started for the first time, the server application will be visible in the Pending List in the GDS Configuration Tool. After accepting the registration the GDS Model can be changed to "Push Model".
The server application can register itself at the GDS and do the complete GDS handling itself using the class GdsPullManagement. An instance of this class shall be set at ApplicationInstanceBase.GdsHandler before the application has been started. Additionally the EndpointUrl of the GDS has to be set in the application settings of the server application.
The class GdsPullManagement has several EventHandlers that can be implemented by the application.
After the server has been started for the first time, the server application will be visible in the Pending Lists for applications to register and certificate signing requests in the GDS Configuration Tool. After accepting both, the server will receive a new certificate and trust list.