Diffusion C API
6.8.3
|
Functions | |
SECURITY_STORE_T * | security_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_T * | security_store_dup (const SECURITY_STORE_T *store) |
The returned structure is unsynchronized, so appropriate mutexes should be use if the structure is to be used concurrently. 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_isolated_paths (const SECURITY_STORE_T store) |
Get the isolated paths 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... | |
DECLARATION_DEPRECATED (TOPIC_PERMISSIONS_T **get_security_default_topic_permissions(const SECURITY_STORE_T store, const char *role_name)) PATH_PERMISSIONS_T **get_security_default_path_permissions(const SECURITY_STORE_T store | |
Get an array of default topic permissions assigned to a role. More... | |
DECLARATION_DEPRECATED (TOPIC_PERMISSIONS_T **get_security_topic_permissions(const SECURITY_STORE_T store, const char *role_name, const char *topic_name)) PATH_PERMISSIONS_T **get_security_path_permissions(const SECURITY_STORE_T store | |
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_T * | update_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... | |
DEPRECATED (SCRIPT_T *update_security_store_default_topic_permissions(SCRIPT_T *script, const char *role_name, const SET_T *permissions)) SCRIPT_T *update_security_store_default_path_permissions(SCRIPT_T *script | |
Updates a script to assign default topic permissions to a security role. More... | |
DEPRECATED (SCRIPT_T *update_security_store_topic_permissions(SCRIPT_T *script, const char *role_name, const char *topic_path, const SET_T *permissions)) SCRIPT_T *update_security_store_path_permissions(SCRIPT_T *script | |
Updates a script to assign permissions for named role and topic. More... | |
DEPRECATED (SCRIPT_T *update_security_store_remove_topic_permissions(SCRIPT_T *script, const char *role_name, const char *topic_path)) SCRIPT_T *update_security_store_remove_path_permissions(SCRIPT_T *script | |
Updates a script to remove permissions for a named role and topic. More... | |
SCRIPT_T * | update_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_T * | update_security_store_role_locked_by_principal (SCRIPT_T *script, const char *role_name, const char *locking_principal) |
Updates a script to restrict a role so it can only be edited by a specific principal. More... | |
SCRIPT_T * | update_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_T * | update_security_store_anonymous_session_roles (SCRIPT_T *script, const LIST_T *roles) |
Updates a script to set the roles assigned to anonymous sessions. More... | |
SCRIPT_T * | update_security_store_isolate_path (SCRIPT_T *script, const char *path) |
Set a path not to inherit path permissions from its parent paths or the default path permissions. More... | |
SCRIPT_T * | update_security_store_deisolate_path (SCRIPT_T *script, const char *path) |
Re-instate inheritance of path permission assignments from parents of the given path. More... | |
DECLARATION_DEPRECATED | ( | TOPIC_PERMISSIONS_T ** | get_security_default_topic_permissionsconst SECURITY_STORE_T store,const char *role_name | ) | const |
Get an array of default topic permissions assigned to a role.
store | A security store. |
role_name | The name of the role in the store. |
Get the default path permissions assigned to a role.
store | A security store. |
role_name | The name of the role in the store. |
DECLARATION_DEPRECATED | ( | TOPIC_PERMISSIONS_T ** | get_security_topic_permissionsconst SECURITY_STORE_T store,const char *role_name,const char *topic_name | ) | const |
Get an array of topic permissions assigned to a role, for a specified topic.
store | A security store. |
role_name | The name of the role in the store. |
topic_name | The name of the topic to look up. |
Get the path permissions assigned to a role, for a specified topic.
store | A security store. |
role_name | The name of the role in the store. |
topic_name | The name of the topic to look up. |
DEPRECATED | ( | SCRIPT_T * | update_security_store_default_topic_permissionsSCRIPT_T *script,const char *role_name,const SET_T *permissions | ) |
Updates a script to assign default topic permissions to a security role.
The collection of permissions to be assigned should be passed in a set created with set_new_int().
script | The script to update. |
role_name | The role which will receive the new permissions. |
permissions | A set of TOPIC_PERMISSIONS_T specifying the permissions to assign. |
Updates a script to assign default path permissions to a security role.
The collection of permissions to be assigned should be passed in a set created with set_new_int().
script | The script to update. |
role_name | The role which will receive the new permissions. |
permissions | A set of PATH_PERMISSIONS_T specifying the permissions to assign. |
DEPRECATED | ( | SCRIPT_T * | update_security_store_topic_permissionsSCRIPT_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.
script | The script to update. |
role_name | The role which will receive the new permissions. |
topic_path | The path to the topic for which the permissions will apply. |
permissions | A set of TOPIC_PERMISSIONS_T specifying the permissions to assign. |
Updates a script to assign permissions for named role and topic.
script | The script to update. |
role_name | The role which will receive the new permissions. |
path | The path to the topic for which the permissions will apply. |
permissions | A set of PATH_PERMISSIONS_T specifying the permissions to assign. |
DEPRECATED | ( | SCRIPT_T * | update_security_store_remove_topic_permissionsSCRIPT_T *script,const char *role_name,const char *topic_path | ) |
Updates a script to remove permissions for a named role and topic.
script | The script to update. |
role_name | The role for which permissions will be removed. |
topic_path | The path for which permissions will be removed. |
Updates a script to remove permissions for a named role and topic.
script | The script to update. |
role_name | The role for which permissions will be removed. |
path | The path for which permissions will be removed. |
char** get_security_default_anonymous_roles | ( | const SECURITY_STORE_T | store | ) |
Get the default roles for anonymous connections.
store | A security store. |
char** get_security_default_named_roles | ( | const SECURITY_STORE_T | store | ) |
Get the default roles for connections made with a principal.
store | A security store. |
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.
store | A security store. |
role_name | The name of the role in the store. |
char** get_security_included_roles | ( | const SECURITY_STORE_T | store, |
const char * | role_name | ||
) |
Get the names of other roles that this role includes.
store | A security store. |
role_name | The name of the role in the store. |
char** get_security_isolated_paths | ( | const SECURITY_STORE_T | store | ) |
Get the isolated paths defined in the security store.
store | A security store. |
char** get_security_role_names | ( | const SECURITY_STORE_T | store | ) |
Get the names of all roles defined in the security store.
store | A security store. |
void get_security_store | ( | SESSION_T * | session, |
const GET_SECURITY_STORE_PARAMS_T | params | ||
) |
Get the server's security store.
session | The current session. If NULL, this function returns immediately. |
params | Parameter structure containing callbacks to receive the contents of the security store. |
SECURITY_STORE_T* security_store_create | ( | void | ) |
Create a new, empty security store structure.
The returned structure is unsynchronized, so appropriate mutexes should be use if the structure is to be used concurrently.
SECURITY_STORE_T* security_store_dup | ( | const SECURITY_STORE_T * | store | ) |
The returned structure is unsynchronized, so appropriate mutexes should be use if the structure is to be used concurrently.
security_store_free
should be called on this pointer when no longer needed.
store | The security store to be copied. |
void security_store_free | ( | SECURITY_STORE_T * | store | ) |
Free all memory associated with a security store structure.
store | The security store to be freed. |
void update_security_store | ( | SESSION_T * | session, |
const UPDATE_SECURITY_STORE_PARAMS_T | params | ||
) |
Send updates to the security store.
If the server is configured for topic replication, then the changes will be replicated to all members of the cluster.
session | The current session. If NULL, this function returns immediately. |
params | Parameter structure describing the updates to perform and callbacks to handle success or failure notifications. |
SCRIPT_T* update_security_store_anonymous_session_roles | ( | SCRIPT_T * | script, |
const LIST_T * | roles | ||
) |
Updates a script to set the roles assigned to anonymous sessions.
script | The script to update. |
roles | A list of strings representing the roles which are assigned to anonymous sessions. |
SCRIPT_T* update_security_store_deisolate_path | ( | SCRIPT_T * | script, |
const char * | path | ||
) |
Re-instate inheritance of path permission assignments from parents of the given path.
script | The script to update. |
path | The path |
SCRIPT_T* update_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.
script | The script to update. |
role_name | The role which will receive the new permissions. |
permissions | A set of GLOBAL_PERMISSIONS_T specifying the permissions to assign. |
SCRIPT_T* update_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.
script | The script to update. |
role_name | The role name which will include other roles. |
included_roles | A list of strings representing the roles to be included in the named role. |
SCRIPT_T* update_security_store_isolate_path | ( | SCRIPT_T * | script, |
const char * | path | ||
) |
Set a path not to inherit path permissions from its parent paths or the default path permissions.
script | The script to update. |
path | The path |
SCRIPT_T* update_security_store_named_session_roles | ( | SCRIPT_T * | script, |
const LIST_T * | roles | ||
) |
Updates a script to set the roles assigned to named sessions.
script | The script to update. |
roles | A list of strings representing the roles which are assigned to authenticated (named) sessions. |
SCRIPT_T* update_security_store_role_locked_by_principal | ( | SCRIPT_T * | script, |
const char * | role_name, | ||
const char * | locking_principal | ||
) |
Updates a script to restrict a role so it can only be edited by a specific principal.
script | The script to update. |
role_name | The role name which will include other roles. |
locking_principal | The locking principal. |