33#ifndef SOPC_USER_MANAGER_H_
34#define SOPC_USER_MANAGER_H_
89 bool* pbOperationAuthorized);
207 uint32_t attributeId,
208 bool* pbOperationAuthorized);
enum _SOPC_ReturnStatus SOPC_ReturnStatus
Common enumerations for S2OPC.
Defines the common declarations for the PKI objects. The structures and macros defined in this file a...
Defines the logged-in (server-side) user.
struct SOPC_User SOPC_User
Logged in (successfully) user structure.
Definition sopc_user.h:40
void SOPC_UserWithAuthorization_Free(SOPC_UserWithAuthorization **ppUserWithAuthorization)
Free a SOPC_UserWithAuthorization and its embedded user when needed.
struct SOPC_UserAuthentication_Functions SOPC_UserAuthentication_Functions
SOPC_ReturnStatus SOPC_UserAuthentication_ValidateUserIdentity_Func(SOPC_UserAuthentication_Manager *authenticationManager, const SOPC_ExtensionObject *pUser, SOPC_UserAuthentication_Status *pUserAuthenticated)
Definition sopc_user_manager.h:77
SOPC_ReturnStatus SOPC_UserAuthorization_IsAuthorizedOperation(SOPC_UserWithAuthorization *userWithAuthorization, SOPC_UserAuthorization_OperationType operationType, const SOPC_NodeId *nodeId, uint32_t attributeId, bool *pbOperationAuthorized)
Authorize an operation with the chosen authorization manager.
void SOPC_UserAuthentication_PKIProviderUpdateCb(uintptr_t updateParam)
Callback instance to be used on user PKI update.
SOPC_UserAuthorization_Manager * SOPC_UserWithAuthorization_GetManager(SOPC_UserWithAuthorization *userWithAuthorization)
Return the user part of the user with authorization manager.
SOPC_UserWithAuthorization * SOPC_UserWithAuthorization_CreateFromIdentityToken(const SOPC_ExtensionObject *pUserIdentity, SOPC_UserAuthorization_Manager *authorizationManager)
Creates a SOPC_UserWithAuthorization from an OpcUa_IdentityToken and an authorization manager.
const SOPC_User * SOPC_UserWithAuthorization_GetUser(SOPC_UserWithAuthorization *userWithAuthorization)
Return the authorization manager associated with the user.
SOPC_ReturnStatus SOPC_UserAuthorization_AuthorizeOperation_Func(SOPC_UserAuthorization_Manager *authorizationManager, SOPC_UserAuthorization_OperationType operationType, const SOPC_NodeId *nodeId, uint32_t attributeId, const SOPC_User *pUser, bool *pbOperationAuthorized)
Definition sopc_user_manager.h:83
void SOPC_UserAuthorization_Free_Func(SOPC_UserAuthorization_Manager *authorizationManager)
Definition sopc_user_manager.h:82
void SOPC_UserAuthentication_Free_Func(SOPC_UserAuthentication_Manager *authenticationManager)
Definition sopc_user_manager.h:76
SOPC_ReturnStatus SOPC_UserAuthentication_IsValidUserIdentity(SOPC_UserAuthentication_Manager *authenticationManager, const SOPC_ExtensionObject *pUser, SOPC_UserAuthentication_Status *pUserAuthenticated)
Authenticate a user with the chosen authentication manager.
struct SOPC_UserAuthorization_Functions SOPC_UserAuthorization_Functions
SOPC_UserAuthentication_Status
The user authentication status code, see SOPC_UserAuthentication_IsValidUserIdentity.
Definition sopc_user_manager.h:63
@ SOPC_USER_AUTHENTICATION_OK
Definition sopc_user_manager.h:73
@ SOPC_USER_AUTHENTICATION_ACCESS_DENIED
Definition sopc_user_manager.h:71
@ SOPC_USER_AUTHENTICATION_SIGNATURE_INVALID
Definition sopc_user_manager.h:72
@ SOPC_USER_AUTHENTICATION_REJECTED_TOKEN
Definition sopc_user_manager.h:65
@ SOPC_USER_AUTHENTICATION_INVALID_TOKEN
Definition sopc_user_manager.h:64
SOPC_UserAuthorization_OperationType
The operation type to authorize, see SOPC_UserAuthorization_IsAuthorizedOperation.
Definition sopc_user_manager.h:47
@ SOPC_USER_AUTHORIZATION_OPERATION_EXECUTABLE
Definition sopc_user_manager.h:51
@ SOPC_USER_AUTHORIZATION_OPERATION_WRITE
Definition sopc_user_manager.h:49
@ SOPC_USER_AUTHORIZATION_OPERATION_READ
Definition sopc_user_manager.h:48
@ SOPC_USER_AUTHORIZATION_OPERATION_ADDNODE
Definition sopc_user_manager.h:52
void SOPC_UserAuthorization_FreeManager(SOPC_UserAuthorization_Manager **ppAuthorizationManager)
Deletes a SOPC_UserAuthorization_Manager using its pFuncFree.
void SOPC_UserAuthentication_FreeManager(SOPC_UserAuthentication_Manager **ppAuthenticationManager)
Deletes a SOPC_UserAuthentication_Manager using its pFuncFree.
SOPC_UserAuthorization_Manager * SOPC_UserAuthorization_CreateManager_AllowAll(void)
A helper implementation that always authorize an operation.
SOPC_UserAuthentication_Manager * SOPC_UserAuthentication_CreateManager_AllowAll(void)
A helper implementation that always authentication positively a user.
SOPC_UserWithAuthorization * SOPC_UserWithAuthorization_CreateLocal(SOPC_UserAuthorization_Manager *authorizationManager)
Creates a SOPC_UserWithAuthorization for a local user.
An ExtensionObject is a container for any Structured DataTypes which cannot be encoded as one of the ...
Definition sopc_builtintypes.h:262
This structure describes a basic NodeID in OPC UA.
Definition sopc_builtintypes.h:189
The PKIProvider object for the Public Key Infrastructure.
Definition sopc_pki_struct_lib_internal.h:39
Definition sopc_user_manager.h:92
SOPC_UserAuthentication_ValidateUserIdentity_Func * pFuncValidateUserIdentity
Called to authorize a user connection, when receiving an ActivateSession request.
Definition sopc_user_manager.h:116
SOPC_UserAuthentication_Free_Func * pFuncFree
Deallocation function, called upon SOPC_UserAuthentication_Manager destruction.
Definition sopc_user_manager.h:98
Definition sopc_user_manager.h:149
const SOPC_UserAuthentication_Functions * pFunctions
Definition sopc_user_manager.h:151
void * pData
Definition sopc_user_manager.h:157
SOPC_PKIProvider * pUsrPKI
Definition sopc_user_manager.h:154
Definition sopc_user_manager.h:120
SOPC_UserAuthorization_Free_Func * pFuncFree
Deallocation function, called upon SOPC_UserAuthorization_Manager destruction.
Definition sopc_user_manager.h:126
SOPC_UserAuthorization_AuthorizeOperation_Func * pFuncAuthorizeOperation
Called to authorize a read or a write operation in the address space.
Definition sopc_user_manager.h:145
Definition sopc_user_manager.h:161
const SOPC_UserAuthorization_Functions * pFunctions
Definition sopc_user_manager.h:163
void * pData
Definition sopc_user_manager.h:166
Definition sopc_user_manager_internal.h:31
SOPC_UserAuthorization_Manager * authorizationManager
Definition sopc_user_manager_internal.h:33