Diffusion C API  5.9.24
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
svc-security-control.h File Reference

Services for querying and updating the security store. More...

Data Structures

struct  security_store_role_s
 
struct  security_store_s
 
struct  svc_get_security_store_request_s
 Structure describing the "get security store" request. More...
 
struct  svc_get_security_store_response_s
 Structure describing a "get security store" response. More...
 
struct  get_security_store_params_s
 Structure passed when requesting the security store. More...
 
struct  svc_update_security_store_request_s
 Structure describing an "update security store" request. More...
 
struct  svc_update_security_store_response_s
 Structure describing the response to an "update security store" request. More...
 
struct  update_security_store_params_s
 Structure passed when updating the security store. More...
 

Typedefs

typedef struct
svc_get_security_store_request_s 
SVC_GET_SECURITY_STORE_REQUEST_T
 Structure describing the "get security store" request.
 
typedef struct
svc_get_security_store_response_s 
SVC_GET_SECURITY_STORE_RESPONSE_T
 Structure describing a "get security store" response.
 
typedef int(* on_get_security_store_cb )(SESSION_T *session, const SECURITY_STORE_T store, void *context)
 Callback for get_security_store(). More...
 
typedef struct
get_security_store_params_s 
GET_SECURITY_STORE_PARAMS_T
 Structure passed when requesting the security store.
 
typedef struct
svc_update_security_store_request_s 
SVC_UPDATE_SECURITY_STORE_REQUEST_T
 Structure describing an "update security store" request.
 
typedef struct
svc_update_security_store_response_s 
SVC_UPDATE_SECURITY_STORE_RESPONSE_T
 Structure describing the response to an "update security store" request.
 
typedef int(* on_update_security_store_cb )(SESSION_T *session, const LIST_T *error_reports, void *context)
 Callback for update_security_store(). More...
 
typedef struct
update_security_store_params_s 
UPDATE_SECURITY_STORE_PARAMS_T
 Structure passed when updating the security store.
 

Enumerations

enum  GLOBAL_PERMISSIONS_T
 Permissions that protect globally scoped, access-controlled operations.
 
enum  TOPIC_PERMISSIONS_T
 Permissions protecting access-controlled operations that are evaluated for a specific topic path or message path.
 

Functions

SECURITY_STORE_Tsecurity_store_create (void)
 Create a new, empty security store structure. More...
 
void security_store_free (SECURITY_STORE_T *store)
 Free all memory associated with a security store structure. More...
 
SECURITY_STORE_Tsecurity_store_dup (const SECURITY_STORE_T *store)
 Copy an existing security store structure. More...
 
void get_security_store (SESSION_T *session, const GET_SECURITY_STORE_PARAMS_T params)
 Get the server's security store. More...
 
char ** get_security_default_anonymous_roles (const SECURITY_STORE_T store)
 Get the default roles for anonymous connections. More...
 
char ** get_security_default_named_roles (const SECURITY_STORE_T store)
 Get the default roles for connections made with a principal. More...
 
char ** get_security_role_names (const SECURITY_STORE_T store)
 Get the names of all roles defined in the security store. More...
 
char ** get_security_included_roles (const SECURITY_STORE_T store, const char *role_name)
 Get the names of other roles that this role includes. More...
 
GLOBAL_PERMISSIONS_T ** get_security_global_permissions (const SECURITY_STORE_T store, const char *role_name)
 Get an array of global permissions assigned to a role. More...
 
TOPIC_PERMISSIONS_T ** get_security_default_topic_permissions (const SECURITY_STORE_T store, const char *role_name)
 Get an array of default topic permissions assigned to a role. More...
 
TOPIC_PERMISSIONS_T ** get_security_topic_permissions (const SECURITY_STORE_T store, const char *role_name, const char *topic_name)
 Get an array of topic permissions assigned to a role, for a specified topic. More...
 
void update_security_store (SESSION_T *session, const UPDATE_SECURITY_STORE_PARAMS_T params)
 Send updates to the security store. More...
 
SCRIPT_Tupdate_security_store_global_role_permissions (SCRIPT_T *script, const char *role_name, const SET_T *permissions)
 Updates a script to assign global permissions to a security role. More...
 
SCRIPT_Tupdate_security_store_default_topic_permissions (SCRIPT_T *script, const char *role_name, const SET_T *permissions)
 Updates a script to assign default topic permissions to a security role. More...
 
SCRIPT_Tupdate_security_store_topic_permissions (SCRIPT_T *script, const char *role_name, const char *topic_path, const SET_T *permissions)
 Updates a script to assign permissions for named role and topic. More...
 
SCRIPT_Tupdate_security_store_remove_topic_permissions (SCRIPT_T *script, const char *role_name, const char *topic_path)
 Updates a script to remove permissions for a named role and topic. More...
 
SCRIPT_Tupdate_security_store_include_roles (SCRIPT_T *script, const char *role_name, const LIST_T *included_roles)
 Updates a script to include other roles within a role. More...
 
SCRIPT_Tupdate_security_store_named_session_roles (SCRIPT_T *script, const LIST_T *roles)
 Updates a script to set the roles assigned to named sessions. More...
 
SCRIPT_Tupdate_security_store_anonymous_session_roles (SCRIPT_T *script, const LIST_T *roles)
 Updates a script to set the roles assigned to anonymous sessions. More...
 

Detailed Description

Services for querying and updating the security store.

Typedef Documentation

typedef int(* on_get_security_store_cb)(SESSION_T *session, const SECURITY_STORE_T store, void *context)

Callback for get_security_store().

Parameters
sessionThe current active session.
responseThe response containing the security store contents. This structure will be freed on exit so a copy should be taken if it needs to be used outside of the scope of the callback.
contextUser-supplied context from the get_security_store() call.
Returns
HANDLER_SUCCESS or HANDLER_FAILURE.
typedef int(* on_update_security_store_cb)(SESSION_T *session, const LIST_T *error_reports, void *context)

Callback for update_security_store().

Parameters
sessionThe current active session.
error_reportsAny errors that have occurred while processing the updated.
contextUser-supplied context from the update_security_store() call.
Returns
HANDLER_SUCCESS or HANDLER_FAILURE.