yumapro
24.10-3
YumaPro SDK
|
The External ACM handler provides the required access control APIs outside of the server control. More...
Typedefs | |
typedef boolean(* | agt_acm_extern_rpc_fn_t) (xml_msg_hdr_t *msg, const xmlChar *user, const obj_template_t *rpcobj) |
Check if the specified user is allowed to invoke an RPC. More... | |
typedef boolean(* | agt_acm_extern_notif_fn_t) (const xmlChar *user, const obj_template_t *notifobj) |
Check if the specified user is allowed to receive a notification event. More... | |
typedef boolean(* | agt_acm_extern_write_fn_t) (xml_msg_hdr_t *msg, const xmlChar *user, const val_value_t *newval, const val_value_t *curval, op_editop_t editop) |
Check if the specified user is allowed to access a value node. More... | |
typedef boolean(* | agt_acm_extern_read_fn_t) (xml_msg_hdr_t *msg, const xmlChar *user, const val_value_t *val) |
Check if the specified user is allowed to read a value node. More... | |
Functions | |
status_t | agt_acm_extern_init2 (void) |
Phase 2 : Initialize the external data model configuration data structures. More... | |
void | agt_acm_extern_init0 (void) |
Init 0 Pre-init 1 phase. More... | |
status_t | agt_acm_extern_init1 (void) |
Phase 1: Load the external data module. More... | |
void | agt_acm_extern_cleanup (void) |
Cleanup the external access control module. More... | |
status_t | agt_acm_extern_init_msg_cache (ses_cb_t *scb, xml_msg_hdr_t *msg) |
Malloc and initialize an agt_acm_cache_t struct and attach it to the incoming message. More... | |
void | agt_acm_extern_register_callbacks (agt_acm_extern_rpc_fn_t rpcfn, agt_acm_extern_notif_fn_t notfn, agt_acm_extern_write_fn_t writefn, agt_acm_extern_read_fn_t readfn) |
Register the external callbacks for ACM implementation. More... | |
boolean | agt_acm_extern_rpc_allowed (xml_msg_hdr_t *msg, const xmlChar *user, const obj_template_t *rpcobj) |
Check if the specified user is allowed to invoke an RPC. More... | |
boolean | agt_acm_extern_notif_allowed (const xmlChar *user, const obj_template_t *notifobj) |
Check if the specified user is allowed to receive a notification event. More... | |
boolean | agt_acm_extern_val_write_allowed (xml_msg_hdr_t *msg, const xmlChar *user, const val_value_t *newval, const val_value_t *curval, op_editop_t editop) |
Check if the specified user is allowed to access a value node. More... | |
boolean | agt_acm_extern_val_read_allowed (xml_msg_hdr_t *msg, const xmlChar *user, const val_value_t *val) |
Check if the specified user is allowed to read a value node. More... | |
The External ACM handler provides the required access control APIs outside of the server control.
The vendor callbacks are required to check access rights each time access is requested by a client.
typedef boolean(* agt_acm_extern_notif_fn_t) (const xmlChar *user, const obj_template_t *notifobj) |
Check if the specified user is allowed to receive a notification event.
user | user name string |
notifobj | obj_template_t for the notification event to check |
typedef boolean(* agt_acm_extern_read_fn_t) (xml_msg_hdr_t *msg, const xmlChar *user, const val_value_t *val) |
Check if the specified user is allowed to read a value node.
msg | XML header from incoming message in progress |
user | user name string |
val | val_value_t in progress to check |
typedef boolean(* agt_acm_extern_rpc_fn_t) (xml_msg_hdr_t *msg, const xmlChar *user, const obj_template_t *rpcobj) |
Check if the specified user is allowed to invoke an RPC.
msg | XML header in incoming message in progress |
user | user name string |
rpcobj | obj_template_t for the RPC method to check |
typedef boolean(* agt_acm_extern_write_fn_t) (xml_msg_hdr_t *msg, const xmlChar *user, const val_value_t *newval, const val_value_t *curval, op_editop_t editop) |
Check if the specified user is allowed to access a value node.
The val->obj template will be checked against the val->editop requested access and the user's configured max-access
msg | XML header from incoming message in progress |
user | user name string to check for access |
newval | val_value_t in progress to check (may be NULL, if curval set) |
curval | val_value_t in progress to check (may be NULL, if newval set) |
editop | requested CRUD operation |
void agt_acm_extern_cleanup | ( | void | ) |
Cleanup the external access control module.
Will be called during server terminatation.
void agt_acm_extern_init0 | ( | void | ) |
Init 0 Pre-init 1 phase.
Pre-Phase 1:
status_t agt_acm_extern_init1 | ( | void | ) |
Phase 1: Load the external data module.
status_t agt_acm_extern_init2 | ( | void | ) |
Phase 2 : Initialize the external data model configuration data structures.
status_t agt_acm_extern_init_msg_cache | ( | ses_cb_t * | scb, |
xml_msg_hdr_t * | msg | ||
) |
Malloc and initialize an agt_acm_cache_t struct and attach it to the incoming message.
[in,out] | scb | session control block to use scb->acm_cache pointer may be set, if it was NULL |
[in,out] | msg | message to use msg->acm_cache pointer set |
boolean agt_acm_extern_notif_allowed | ( | const xmlChar * | user, |
const obj_template_t * | notifobj | ||
) |
Check if the specified user is allowed to receive a notification event.
user | user name string |
notifobj | obj_template_t for the notification event to check |
void agt_acm_extern_register_callbacks | ( | agt_acm_extern_rpc_fn_t | rpcfn, |
agt_acm_extern_notif_fn_t | notfn, | ||
agt_acm_extern_write_fn_t | writefn, | ||
agt_acm_extern_read_fn_t | readfn | ||
) |
Register the external callbacks for ACM implementation.
A NULL callback means that type of access will always be granted!!!
rpcfn | check-rpc function callback |
notfn | check-notification function callback |
writefn | check-val-write function callback |
readfn | check-val-write function callback |
boolean agt_acm_extern_rpc_allowed | ( | xml_msg_hdr_t * | msg, |
const xmlChar * | user, | ||
const obj_template_t * | rpcobj | ||
) |
Check if the specified user is allowed to invoke an RPC.
msg | XML header in incoming message in progress |
user | user name string |
rpcobj | obj_template_t for the RPC method to check |
boolean agt_acm_extern_val_read_allowed | ( | xml_msg_hdr_t * | msg, |
const xmlChar * | user, | ||
const val_value_t * | val | ||
) |
Check if the specified user is allowed to read a value node.
msg | XML header from incoming message in progress |
user | user name string |
val | val_value_t in progress to check |
boolean agt_acm_extern_val_write_allowed | ( | xml_msg_hdr_t * | msg, |
const xmlChar * | user, | ||
const val_value_t * | newval, | ||
const val_value_t * | curval, | ||
op_editop_t | editop | ||
) |
Check if the specified user is allowed to access a value node.
The val->obj template will be checked against the val->editop requested access and the user's configured max-access
msg | XML header from incoming message in progress |
user | user name string |
newval | val_value_t in progress to check (may be NULL, if curval set) |
curval | val_value_t in progress to check (may be NULL, if newval set) |
editop | requested CRUD operation |