open62541 1.3.12
Open source implementation of OPC UA
Loading...
Searching...
No Matches
accesscontrol.h
Go to the documentation of this file.
1/** This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 *
5 * Copyright 2017 (c) Fraunhofer IOSB (Author: Julius Pfrommer)
6 * Copyright 2017 (c) Stefan Profanter, fortiss GmbH
7 */
8
9#ifndef UA_PLUGIN_ACCESS_CONTROL_H_
10#define UA_PLUGIN_ACCESS_CONTROL_H_
11
12#include <open62541/util.h>
13
15
16struct UA_AccessControl;
18
19
20
22 void *context;
23 void (*clear)(UA_AccessControl *ac);
24
25 /* Supported login mechanisms. The server endpoints are created from here. */
28
29 /* Authenticate a session. The session context is attached to the session
30 * and later passed into the node-based access control callbacks. The new
31 * session is rejected if a StatusCode other than UA_STATUSCODE_GOOD is
32 * returned. */
34 const UA_EndpointDescription *endpointDescription,
35 const UA_ByteString *secureChannelRemoteCertificate,
36 const UA_NodeId *sessionId,
37 const UA_ExtensionObject *userIdentityToken,
38 void **sessionContext);
39
40 /* Deauthenticate a session and cleanup */
42 const UA_NodeId *sessionId, void *sessionContext);
43
44 /* Access control for all nodes*/
46 const UA_NodeId *sessionId, void *sessionContext,
47 const UA_NodeId *nodeId, void *nodeContext);
48
49 /* Additional access control for variable nodes */
51 const UA_NodeId *sessionId, void *sessionContext,
52 const UA_NodeId *nodeId, void *nodeContext);
53
54 /* Additional access control for method nodes */
56 const UA_NodeId *sessionId, void *sessionContext,
57 const UA_NodeId *methodId, void *methodContext);
58
59 /* Additional access control for calling a method node in the context of a
60 * specific object */
62 const UA_NodeId *sessionId, void *sessionContext,
63 const UA_NodeId *methodId, void *methodContext,
64 const UA_NodeId *objectId, void *objectContext);
65
66 /* Allow adding a node */
68 const UA_NodeId *sessionId, void *sessionContext,
69 const UA_AddNodesItem *item);
70
71 /* Allow adding a reference */
73 const UA_NodeId *sessionId, void *sessionContext,
74 const UA_AddReferencesItem *item);
75
76 /* Allow deleting a node */
78 const UA_NodeId *sessionId, void *sessionContext,
79 const UA_DeleteNodesItem *item);
80
81 /* Allow deleting a reference */
83 const UA_NodeId *sessionId, void *sessionContext,
84 const UA_DeleteReferencesItem *item);
85
86 /* Allow browsing a node */
88 const UA_NodeId *sessionId, void *sessionContext,
89 const UA_NodeId *nodeId, void *nodeContext);
90
91#ifdef UA_ENABLE_SUBSCRIPTIONS
92 /* Allow transfer of a subscription to another session. The Server shall
93 * validate that the Client of that Session is operating on behalf of the
94 * same user */
96 const UA_NodeId *oldSessionId, void *oldSessionContext,
97 const UA_NodeId *newSessionId, void *newSessionContext);
98#endif
99
100#ifdef UA_ENABLE_HISTORIZING
101 /* Allow insert,replace,update of historical data */
103 const UA_NodeId *sessionId, void *sessionContext,
104 const UA_NodeId *nodeId,
105 UA_PerformUpdateType performInsertReplace,
106 const UA_DataValue *value);
107
108 /* Allow delete of historical data */
110 const UA_NodeId *sessionId, void *sessionContext,
111 const UA_NodeId *nodeId,
112 UA_DateTime startTimestamp,
113 UA_DateTime endTimestamp,
114 bool isDeleteModified);
115#endif
116};
117
119
120#endif /* UA_PLUGIN_ACCESS_CONTROL_H_ */
#define _UA_BEGIN_DECLS
#undef UA_DEBUG_DUMP_PKGS
Definition config.h:89
#define _UA_END_DECLS
Definition config.h:96
void(* closeSession)(UA_Server *server, UA_AccessControl *ac, const UA_NodeId *sessionId, void *sessionContext)
void(* clear)(UA_AccessControl *ac)
UA_Boolean(* getUserExecutable)(UA_Server *server, UA_AccessControl *ac, const UA_NodeId *sessionId, void *sessionContext, const UA_NodeId *methodId, void *methodContext)
UA_Boolean(* allowTransferSubscription)(UA_Server *server, UA_AccessControl *ac, const UA_NodeId *oldSessionId, void *oldSessionContext, const UA_NodeId *newSessionId, void *newSessionContext)
UA_Byte(* getUserAccessLevel)(UA_Server *server, UA_AccessControl *ac, const UA_NodeId *sessionId, void *sessionContext, const UA_NodeId *nodeId, void *nodeContext)
size_t userTokenPoliciesSize
UA_Boolean(* getUserExecutableOnObject)(UA_Server *server, UA_AccessControl *ac, const UA_NodeId *sessionId, void *sessionContext, const UA_NodeId *methodId, void *methodContext, const UA_NodeId *objectId, void *objectContext)
UA_Boolean(* allowBrowseNode)(UA_Server *server, UA_AccessControl *ac, const UA_NodeId *sessionId, void *sessionContext, const UA_NodeId *nodeId, void *nodeContext)
UA_Boolean(* allowAddReference)(UA_Server *server, UA_AccessControl *ac, const UA_NodeId *sessionId, void *sessionContext, const UA_AddReferencesItem *item)
UA_Boolean(* allowDeleteReference)(UA_Server *server, UA_AccessControl *ac, const UA_NodeId *sessionId, void *sessionContext, const UA_DeleteReferencesItem *item)
UA_Boolean(* allowHistoryUpdateDeleteRawModified)(UA_Server *server, UA_AccessControl *ac, const UA_NodeId *sessionId, void *sessionContext, const UA_NodeId *nodeId, UA_DateTime startTimestamp, UA_DateTime endTimestamp, bool isDeleteModified)
UA_UInt32(* getUserRightsMask)(UA_Server *server, UA_AccessControl *ac, const UA_NodeId *sessionId, void *sessionContext, const UA_NodeId *nodeId, void *nodeContext)
UA_Boolean(* allowDeleteNode)(UA_Server *server, UA_AccessControl *ac, const UA_NodeId *sessionId, void *sessionContext, const UA_DeleteNodesItem *item)
UA_Boolean(* allowAddNode)(UA_Server *server, UA_AccessControl *ac, const UA_NodeId *sessionId, void *sessionContext, const UA_AddNodesItem *item)
UA_StatusCode(* activateSession)(UA_Server *server, UA_AccessControl *ac, const UA_EndpointDescription *endpointDescription, const UA_ByteString *secureChannelRemoteCertificate, const UA_NodeId *sessionId, const UA_ExtensionObject *userIdentityToken, void **sessionContext)
UA_UserTokenPolicy * userTokenPolicies
UA_Boolean(* allowHistoryUpdateUpdateData)(UA_Server *server, UA_AccessControl *ac, const UA_NodeId *sessionId, void *sessionContext, const UA_NodeId *nodeId, UA_PerformUpdateType performInsertReplace, const UA_DataValue *value)
_UA_BEGIN_DECLS typedef bool UA_Boolean
This Source Code Form is subject to the terms of the Mozilla Public License, v.
Definition types.h:26
uint32_t UA_UInt32
Definition types.h:56
int64_t UA_DateTime
Definition types.h:144
uint32_t UA_StatusCode
Definition types.h:77
uint8_t UA_Byte
Definition types.h:36