Skip to content

Conversation

@XOlifreX
Copy link

@XOlifreX XOlifreX commented Jul 2, 2021

In the project I work on currently we have a LDS deployed on a Kubernetes cluster in the cloud. When trying to register a server on it, every time the LDS would take its local hostname, a name that cannot be resolved by any server who's on a different network.

This pull request adds a way to define custom hostnames to the OPCUADiscoveryServer class in the same manner the OPCUAServer can. Now you can pass a custom hostname that does get resolved outside of the network.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@erossignon erossignon force-pushed the master branch 2 times, most recently from 1f58db1 to 5e26575 Compare December 12, 2021 22:29
@erossignon erossignon force-pushed the master branch 3 times, most recently from 6a9a170 to d9492e4 Compare July 12, 2022 22:50
@erossignon erossignon force-pushed the master branch 2 times, most recently from bbf625a to 8328c4d Compare February 17, 2023 07:30
@erossignon erossignon force-pushed the master branch 2 times, most recently from bf76eee to 1b97628 Compare May 4, 2023 06:16
@erossignon erossignon force-pushed the master branch 2 times, most recently from 72e61b9 to cb01c1a Compare October 2, 2023 16:26
@erossignon erossignon force-pushed the master branch 2 times, most recently from 3e9da89 to 8166185 Compare November 30, 2023 07:17
@erossignon
Copy link
Member

ALthough I understand the need to be able to access the LocalDiscovery server under different hostname. I don't think it is appropriate to use the OPCUAServerEndpointOptions interface to convey, this information; OPCUAServerEndpointOptions is used for fullblown servers and contains options that are irrelevant for LDS only servers.

We will need to find a more subtil approach.

Copy link
Member

@erossignon erossignon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pleas also add relevant units test to verify that the alternate hostnames are properly exposed and present in the auto-generated certificate.

endPoint.addStandardEndpointDescriptions({
securityModes: this._primaryEndpoint.securityModes,
securityPolicies: this._primaryEndpoint.securityPolicies,
disableDiscovery: this._primaryEndpoint.disableDiscovery,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure disableDiscovery is relevant for a ... discovery server

}

export interface OPCUADiscoveryServerOptions extends OPCUABaseServerOptions {
export interface OPCUADiscoveryServerOptions extends OPCUABaseServerOptions, OPCUAServerEndpointOptions {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rather add a àlthername hostname property to the OPCUADiscoveryServerOptions interface

OPCUAServerEndpointOptions contains too many options that are not relevant to LDS server.


super(options);

this._primaryEndpoint = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

super.options already contains a copy of the options parameter.
No need to duplicate here .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants