Skip to content

Documentation and up-to-date example for authorization and encryption for client missing #1921

@aliksimon

Description

@aliksimon

Describe the bug

The function asyncua.crypto.cert_gen.setup_self_signed_certificate used in the example for client with encryption does not exist.

To Reproduce

Open python console, run:

import asyncua
help(asyncua.crypto.cert_gen.setup_self_signed_certificate)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'asyncua.crypto' has no attribute 'cert_gen'

help(asyncua.crypto)
Help on package asyncua.crypto in asyncua:

NAME
    asyncua.crypto

PACKAGE CONTENTS
    cert_gen
    permission_rules
    security_policies
[...]

Expected behavior

A docstring a shown instead an AttributeError.

Or rather: the function is not used in the example and instead existing functions are used.

Version

Python-Version: 3.10.19

opcua-asyncio Version: 1.1.8

The actual problem:
There is no documentation about how to use certificates to ensure:

  • the client knows that the server is who it claims (authentification)
  • the server knows that the client is who it claims and is allowed to read (authentification)
  • the data transferred is encrypted

I would expect documentation here: https://opcua-asyncio.readthedocs.io/en/latest/api/asyncua.crypto.html but the page is basically empty, and here https://opcua-asyncio.readthedocs.io/en/latest/usage/client/overview.html but it's a todo.

If I understand it (with your help probably) I can also contribute a PR for the docs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions