Skip to content

Role

Canonical path: o6.server.Role

Root shortcut: o6.Role

Role dataclass

One OPC UA role in the server's role set.

Roles are compared and hashed by NodeId when both sides have one, and by name otherwise, so a role built by hand matches the same role as the server stored it. The well-known roles are available from o6.roles, and server-specific roles are registered through server.roles.add(...).

The criteria fields decide which sessions the server grants the role to.

See Role-based access control.

Attributes

name instance-attribute

name

BrowseName of the role. A plain string is read as namespace 0.

id class-attribute instance-attribute

id = None

NodeId of the role node. None until the server assigns one.

identities class-attribute instance-attribute

identities = ()

Identity mapping rules that grant this role to a session.

applications class-attribute instance-attribute

applications = ()

Application URIs the role applies to. Empty means every application.

applicationsExclude class-attribute instance-attribute

applicationsExclude = False

Treat applications as a deny list instead of an allow list.

endpoints class-attribute instance-attribute

endpoints = ()

Endpoints the role applies to. Empty means every endpoint.

endpointsExclude class-attribute instance-attribute

endpointsExclude = False

Treat endpoints as a deny list instead of an allow list.

Functions

__init__

__init__(
    name,
    id=None,
    identities=(),
    applications=(),
    applicationsExclude=False,
    endpoints=(),
    endpointsExclude=False,
)

__post_init__

__post_init__()