Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing SecurityLevel of the EndpointDescription #1360

Merged
merged 1 commit into from
Jul 20, 2023

Conversation

bitkeeper
Copy link
Contributor

According to Part 4 - 7.10 this should be an a number that indicates how secure the EndPoint is. The current implementation used a level of 0 for every EndPoint.
The number is Server implementation specific, how higher the number how safer the security is.
See https://reference.opcfoundation.org/Core/Part4/v104/docs/7.10

Case:
Hit this issue when implementing a server which supports a GDS push application/certificate with the Ua GDS Server. Ua GDS server ignores endpoints with a security level of 0.

According to Part 4 - 7.10 this should be an a number that indicates how secure the EndPoint is. The number is Server implementation specific, how higher the number how saver.
@@ -402,6 +402,63 @@ async def _setup_server_nodes(self):
ua.MessageSecurityMode.Sign, self.certificate, self.iserver.private_key,
permission_ruleset=self._permission_ruleset))


@staticmethod
def lookup_security_level_for_policy_type( security_policy_type: ua.SecurityPolicyType ) -> ua.Byte:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure if server.py is the right location for the two helper methods. The helpers are only relevant for the Server and server tests.
Maybe the there is better location in an other file with more helpers?

Considered the following locations:

  • uatypes: ua.SecurityPolicyType is implemented in there, but only contains type related stuff
  • uacrypto: looking at the other members is doesn't belong here also

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 either. we just leave it here..

@oroulet oroulet merged commit e1dc3be into FreeOpcUa:master Jul 20, 2023
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.

2 participants