Argus PEP client API  2.3
Macros | Typedefs | Enumerations | Functions | Variables
XACML Constants and Objects Model

The XACML constants and object model (Request, Response, ...) used by the PEP client. More...

Macros

#define PEP_XACML_ERROR   0
 PEP XACML model functions return code ERROR.
#define PEP_XACML_OK   1
 PEP XACML model functions return code OK.

Typedefs

typedef struct xacml_action xacml_action_t
 PEP XACML Action type.
typedef struct xacml_attribute xacml_attribute_t
typedef struct
xacml_attributeassignment 
xacml_attributeassignment_t
 PEP XACML AttributeAssignment type.
typedef enum xacml_decision xacml_decision_t
 PEP XACML Result/Decision element constants.
typedef struct xacml_environment xacml_environment_t
 PEP XACML Environment type.
typedef enum xacml_fulfillon xacml_fulfillon_t
 PEP XACML Obligation/@FulfillOn attribute constants.
typedef struct xacml_obligation xacml_obligation_t
 PEP XACML Obligation type.
typedef struct xacml_request xacml_request_t
 PEP XACML Request type.
typedef struct xacml_resource xacml_resource_t
 PEP XACML Resource type.
typedef struct xacml_response xacml_response_t
 PEP XACML Response type.
typedef struct xacml_result xacml_result_t
 PEP XACML Result type.
typedef struct xacml_status xacml_status_t
 PEP XACML Status type.
typedef struct xacml_statuscode xacml_statuscode_t
 PEP XACML StatusCode type.
typedef struct xacml_subject xacml_subject_t

Enumerations

enum  xacml_decision { XACML_DECISION_DENY = 0, XACML_DECISION_PERMIT, XACML_DECISION_INDETERMINATE, XACML_DECISION_NOT_APPLICABLE }
 PEP XACML Result/Decision element constants. More...
enum  xacml_fulfillon { XACML_FULFILLON_DENY = 0, XACML_FULFILLON_PERMIT }
 PEP XACML Obligation/@FulfillOn attribute constants. More...

Functions

int xacml_action_addattribute (xacml_action_t *action, xacml_attribute_t *attr)
 Adds a XACML Attribute to the XACML Action.
size_t xacml_action_attributes_length (const xacml_action_t *action)
 Returns the number of XACML Attribute contained in the XACML Action.
xacml_action_txacml_action_create (void)
 Creates a XACML Action.
void xacml_action_delete (xacml_action_t *action)
 Deletes the XACML Action.
xacml_attribute_txacml_action_getattribute (const xacml_action_t *action, int attr_idx)
 Gets the XACML Attribute from the XACML Action at the given index.
int xacml_attribute_addvalue (xacml_attribute_t *attr, const char *value)
 Adds a value element to the XACML Attribute.
xacml_attribute_txacml_attribute_clone (const xacml_attribute_t *attr)
 Clone the XACML Attribute.
xacml_attribute_txacml_attribute_create (const char *id)
 Creates and initializes a XACML Attribute.
void xacml_attribute_delete (xacml_attribute_t *attr)
 Deletes the XACML Attribute.
const char * xacml_attribute_getdatatype (const xacml_attribute_t *attr)
 Gets the datatype attribute of the XACML Attribute.
const char * xacml_attribute_getid (const xacml_attribute_t *attr)
 Gets the id attribute of the XACML Attribute.
const char * xacml_attribute_getissuer (const xacml_attribute_t *attr)
 Gets the issuer attribute of the XACML Attribute.
const char * xacml_attribute_getvalue (const xacml_attribute_t *attr, int value_idx)
 Gets the AttributeValue of the XACML Attribute at index.
int xacml_attribute_setdatatype (xacml_attribute_t *attr, const char *datatype)
 Sets the datatype attribute of the XACML Attribute.
int xacml_attribute_setid (xacml_attribute_t *attr, const char *id)
 Sets the id attribute of the XACML Attribute.
int xacml_attribute_setissuer (xacml_attribute_t *attr, const char *issuer)
 Sets the issuer attribute of the XACML Attribute.
size_t xacml_attribute_values_length (const xacml_attribute_t *attr)
 Returns the number of AttributeValue in the XACML Attribute.
int xacml_attributeassignment_addvalue (xacml_attributeassignment_t *attr, const char *value)
xacml_attributeassignment_txacml_attributeassignment_create (const char *id)
 Creates a XACML AttributeAssignment.
void xacml_attributeassignment_delete (xacml_attributeassignment_t *attr)
 Deletes the XACML AttributeAssignment.
const char * xacml_attributeassignment_getdatatype (const xacml_attributeassignment_t *attr)
 Gets the XACML AttributeAssignment/@DataType attribute.
const char * xacml_attributeassignment_getid (const xacml_attributeassignment_t *attr)
 Gets the XACML AttributeAssignment/@AttributeId attribute.
const char * xacml_attributeassignment_getvalue (const xacml_attributeassignment_t *attr,...)
 Gets the value from the XACML AttributeAssignment.
int xacml_attributeassignment_setdatatype (xacml_attributeassignment_t *attr, const char *datatype)
 Sets the XACML AttributeAssignment/@DataType attribute.
int xacml_attributeassignment_setid (xacml_attributeassignment_t *attr, const char *id)
 Sets the XACML AttributeAssignment/@AttributeId attribute.
int xacml_attributeassignment_setvalue (xacml_attributeassignment_t *attr, const char *value)
 Sets the value to the XACML AttributeAssignment.
size_t xacml_attributeassignment_values_length (const xacml_attributeassignment_t *attr)
int xacml_environment_addattribute (xacml_environment_t *env, xacml_attribute_t *attr)
 Adds a XACML Attribute to the XACML Environment.
size_t xacml_environment_attributes_length (const xacml_environment_t *env)
 Returns the number of XACML Attribute contained in the XACML Environment.
xacml_environment_txacml_environment_create (void)
 Creates a XACML Environment.
void xacml_environment_delete (xacml_environment_t *env)
 Deletes the XACML Environment.
xacml_attribute_txacml_environment_getattribute (const xacml_environment_t *env, int attr_idx)
 Gets the XACML Attribute from the XACML Environment at the given index.
int xacml_obligation_addattributeassignment (xacml_obligation_t *obligation, xacml_attributeassignment_t *attr)
 Adds a XACML AttributeAssignment to the XACML Obligation.
size_t xacml_obligation_attributeassignments_length (const xacml_obligation_t *obligation)
 Returns the number of XACML AttributeAssignment in the XACML Obligation.
xacml_obligation_txacml_obligation_create (const char *id)
 Creates a XACML Obligation.
void xacml_obligation_delete (xacml_obligation_t *obligation)
 Deletes the XACML Obligation.
xacml_attributeassignment_txacml_obligation_getattributeassignment (const xacml_obligation_t *obligation, int attr_idx)
 Gets the XACML AttributeAssignment from the Obligation at the given index.
xacml_fulfillon_t xacml_obligation_getfulfillon (const xacml_obligation_t *obligation)
 Gets the XACML Obligation/@FulfillOn attribute.
const char * xacml_obligation_getid (const xacml_obligation_t *obligation)
 Gets the XACML Obligation/@ObligationId attribute.
int xacml_obligation_setfulfillon (xacml_obligation_t *obligation, xacml_fulfillon_t fulfillon)
 Sets the XACML Obligation/@FulfillOn attribute.
int xacml_obligation_setid (xacml_obligation_t *obligation, const char *id)
 Sets the XACML Obligation/@ObligationId attribute.
int xacml_request_addresource (xacml_request_t *request, xacml_resource_t *resource)
 Adds a XACML Resource to the XACML Request.
int xacml_request_addsubject (xacml_request_t *request, xacml_subject_t *subject)
 Adds a XACML Subject to the XACML Request.
xacml_request_txacml_request_create (void)
 Creates a XACML Request.
void xacml_request_delete (xacml_request_t *request)
 Deletes the XACML Request.
xacml_action_txacml_request_getaction (const xacml_request_t *request)
 Gets a XACML Action of the XACML Request.
xacml_environment_txacml_request_getenvironment (const xacml_request_t *request)
 Gets a XACML Environment of the XACML Request.
xacml_resource_txacml_request_getresource (const xacml_request_t *request, int resource_idx)
 Gets the XACML Resource of the XACML Request at the given index.
xacml_subject_txacml_request_getsubject (const xacml_request_t *request, int subject_idx)
 Gets the XACML Subject of the XACML Request at the given index.
size_t xacml_request_resources_length (const xacml_request_t *request)
 Returns the number of XACML Resource contained in the XACML Request.
int xacml_request_setaction (xacml_request_t *request, xacml_action_t *action)
 Sets a XACML Action for the XACML Request.
int xacml_request_setenvironment (xacml_request_t *request, xacml_environment_t *env)
 Sets a XACML Environment for the XACML Request.
size_t xacml_request_subjects_length (const xacml_request_t *request)
 Returns the number of XACML Subject contained in the XACML Request.
int xacml_resource_addattribute (xacml_resource_t *resource, xacml_attribute_t *attr)
 Adds a XACML Attribute to the XACML Resource.
size_t xacml_resource_attributes_length (const xacml_resource_t *resource)
 Returns the number of XACML Attribute contained in the XACML Resource.
xacml_resource_txacml_resource_create (void)
 Creates a XACML Resource.
void xacml_resource_delete (xacml_resource_t *resource)
 Deletes the XACML Resource.
xacml_attribute_txacml_resource_getattribute (const xacml_resource_t *resource, int attr_idx)
 Gets the XACML Attribute from the XACML Resource at the given index.
const char * xacml_resource_getcontent (const xacml_resource_t *resource)
 Gets the XACML Resource/ResourceContent element as string.
int xacml_resource_setcontent (xacml_resource_t *resource, const char *content)
 Sets the XACML Resource/ResourceContent element as string.
int xacml_response_addresult (xacml_response_t *response, xacml_result_t *result)
 Adds a XACML Result associated to the XACML Response.
xacml_response_txacml_response_create (void)
 Creates a XACML Response.
void xacml_response_delete (xacml_response_t *response)
 Deletes the XACML Response.
xacml_request_txacml_response_getrequest (const xacml_response_t *response)
xacml_result_txacml_response_getresult (const xacml_response_t *response, int result_idx)
 Gets the XACML Result from the XACML Response at the given index.
xacml_request_txacml_response_relinquishrequest (xacml_response_t *response)
size_t xacml_response_results_length (const xacml_response_t *response)
 Returns the number of XACML Result in the XACML Response.
int xacml_response_setrequest (xacml_response_t *response, xacml_request_t *request)
int xacml_result_addobligation (xacml_result_t *result, xacml_obligation_t *obligation)
 Adds a XACML Obligation to the XACML Result.
xacml_result_txacml_result_create (void)
 Creates a XACML Result.
void xacml_result_delete (xacml_result_t *result)
 Deletes the XACML Result.
xacml_decision_t xacml_result_getdecision (const xacml_result_t *result)
 Gets the XACML Result/Decision value.
xacml_obligation_txacml_result_getobligation (const xacml_result_t *result, int obligation_idx)
 Gets the XACML Obligation from the XACML Result at the given index.
const char * xacml_result_getresourceid (const xacml_result_t *result)
 Gets the XACML Result/@ResourceId attribute.
xacml_status_txacml_result_getstatus (const xacml_result_t *result)
 Gets the XACML Status from Result.
size_t xacml_result_obligations_length (const xacml_result_t *result)
 Returns the number of XACML Obligation in the XACML Result.
int xacml_result_removeobligation (xacml_result_t *result, int obligation_idx)
 Removes the XACML Obligation from the XACML Result at the given index.
int xacml_result_setdecision (xacml_result_t *result, xacml_decision_t decision)
 Sets the XACML Result/Decision value.
int xacml_result_setresourceid (xacml_result_t *result, const char *resourceid)
 Sets the XACML Result/@ResourceId attribute.
int xacml_result_setstatus (xacml_result_t *result, xacml_status_t *status)
 Sets the XACML Status in the XACML Result.
xacml_status_txacml_status_create (const char *message)
 Creates a XACML Status.
void xacml_status_delete (xacml_status_t *status)
 Deletes the XACML Status.
xacml_statuscode_txacml_status_getcode (const xacml_status_t *status)
 Gets the XACML StatusCode for this XACML Status.
const char * xacml_status_getmessage (const xacml_status_t *status)
 Gets the XACML Status/StatusMessage element (string)
int xacml_status_setcode (xacml_status_t *status, xacml_statuscode_t *statuscode)
 Sets the XACML StatusCode for this XACML Status.
int xacml_status_setmessage (xacml_status_t *status, const char *message)
 Sets the XACML Status/StatusMessage element (string)
xacml_statuscode_txacml_statuscode_create (const char *value)
 Creates a XACML StatusCode.
void xacml_statuscode_delete (xacml_statuscode_t *statuscode)
 Deletes the XACML StatusCode.
xacml_statuscode_txacml_statuscode_getsubcode (const xacml_statuscode_t *statuscode)
 Gets the minor XACML StatusCode for this XACML StatusCode.
const char * xacml_statuscode_getvalue (const xacml_statuscode_t *statuscode)
 Gets the XACML StatusCode/@Value attribute.
int xacml_statuscode_setsubcode (xacml_statuscode_t *statuscode, xacml_statuscode_t *subcode)
 Sets the minor XACML StatusCode for this XACML StatusCode.
int xacml_statuscode_setvalue (xacml_statuscode_t *statuscode, const char *value)
 Sets the XACML StatusCode/@Value attribute.
int xacml_subject_addattribute (xacml_subject_t *subject, xacml_attribute_t *attr)
 Adds a XACML Attribute to the Subject.
size_t xacml_subject_attributes_length (const xacml_subject_t *subject)
 Returns the number of XACML Attribute in the XACML Subject.
xacml_subject_txacml_subject_create (void)
 Creates a XACML Subject.
void xacml_subject_delete (xacml_subject_t *subject)
 Deletes the XACML Subject.
xacml_attribute_txacml_subject_getattribute (const xacml_subject_t *subject, int attr_idx)
 Gets the XACML Attribute from the XACML Subject at index.
const char * xacml_subject_getcategory (const xacml_subject_t *subject)
 Gets the XACML Subject/@SubjectCategory attribute value.
int xacml_subject_setcategory (xacml_subject_t *subject, const char *category)
 Sets the XACML Subject/@SubjectCategory attribute.

Variables

static const char XACML_ACTION_ID [] = "urn:oasis:names:tc:xacml:1.0:action:action-id"
 XACML Action/Attribute action-id identifier (XACML 2.0, B.7)
static const char XACML_DATATYPE_ANYURI [] = "http://www.w3.org/2001/XMLSchema#anyURI"
 XACML data-type anyURI identifier (XACML 2.0, B.3)
static const char XACML_DATATYPE_BASE64BINARY [] = "http://www.w3.org/2001/XMLSchema#base64Binary"
 XACML data-type base64Binary identifier (XACML 2.0, B.3)
static const char XACML_DATATYPE_BOOLEAN [] = "http://www.w3.org/2001/XMLSchema#boolean"
 XACML data-type boolean identifier (XACML 2.0, B.3)
static const char XACML_DATATYPE_DATE [] = "http://www.w3.org/2001/XMLSchema#date"
 XACML data-type date identifier (XACML 2.0, B.3)
static const char XACML_DATATYPE_DATETIME [] = "http://www.w3.org/2001/XMLSchema#dateTime"
 XACML data-type dateTime identifier (XACML 2.0, B.3)
static const char XACML_DATATYPE_DAY_TIME_DURATION [] = "http://www.w3.org/TR/2002/WD-xquery-operators-20020816#dayTimeDuration"
 XACML data-type dayTimeDuration identifier (XACML 2.0, B.3)
static const char XACML_DATATYPE_DNSNAME [] = "urn:oasis:names:tc:xacml:1.0:data-type:dnsName"
 XACML data-type dnsName identifier (XACML 2.0, B.3)
static const char XACML_DATATYPE_DOUBLE [] = "http://www.w3.org/2001/XMLSchema#double"
 XACML data-type double identifier (XACML 2.0, B.3)
static const char XACML_DATATYPE_HEXBINARY [] = "http://www.w3.org/2001/XMLSchema#hexBinary"
 XACML data-type hexBinary identifier (XACML 2.0, B.3)
static const char XACML_DATATYPE_INTEGER [] = "http://www.w3.org/2001/XMLSchema#integer"
 XACML data-type integer identifier (XACML 2.0, B.3)
static const char XACML_DATATYPE_IPADDRESS [] = "urn:oasis:names:tc:xacml:1.0:data-type:ipAddress"
 XACML data-type ipAddress identifier (XACML 2.0, B.3)
static const char XACML_DATATYPE_RFC822NAME [] = "urn:oasis:names:tc:xacml:1.0:data-type:rfc822Name"
 XACML data-type rfc822Name identifier (XACML 2.0, B.3)
static const char XACML_DATATYPE_STRING [] = "http://www.w3.org/2001/XMLSchema#string"
 XACML data-type string identifier (XACML 2.0, B.3)
static const char XACML_DATATYPE_TIME [] = "http://www.w3.org/2001/XMLSchema#time"
 XACML data-type time identifier (XACML 2.0, B.3)
static const char XACML_DATATYPE_X500NAME [] = "urn:oasis:names:tc:xacml:1.0:data-type:x500Name"
 XACML data-type x500Name identifier (XACML 2.0, B.3)
static const char XACML_DATATYPE_YEAR_MONTH_DURATION [] = "http://www.w3.org/TR/2002/WD-xquery-operators-20020816#yearMonthDuration"
 XACML data-type yearMonthDuration identifier (XACML 2.0, B.3)
static const char XACML_ENVIRONMENT_CURRENT_DATE [] = "urn:oasis:names:tc:xacml:1.0:environment:current-date"
 XACML Environment/Attribute current-date identifier (XACML 2.0, B.8)
static const char XACML_ENVIRONMENT_CURRENT_DATETIME [] = "urn:oasis:names:tc:xacml:1.0:environment:current-dateTime"
 XACML Environment/Attribute current-dateTime identifier (XACML 2.0, B.8)
static const char XACML_ENVIRONMENT_CURRENT_TIME [] = "urn:oasis:names:tc:xacml:1.0:environment:current-time"
 XACML Environment/Attribute current-time identifier (XACML 2.0, B.8)
static const char XACML_RESOURCE_ID [] = "urn:oasis:names:tc:xacml:1.0:resource:resource-id"
 XACML Resource/Attribute resource-id identifier (XACML 2.0, B.6)
static const char XACML_STATUSCODE_MISSINGATTRIBUTE [] = "urn:oasis:names:tc:xacml:1.0:status:missing-attribute"
 XACML StatusCode/@Value attribute missing-attribute value (XACML 2.0, B.9)
static const char XACML_STATUSCODE_OK [] = "urn:oasis:names:tc:xacml:1.0:status:ok"
 XACML StatusCode/@Value attribute ok value (XACML 2.0, B.9)
static const char XACML_STATUSCODE_PROCESSINGERROR [] = "urn:oasis:names:tc:xacml:1.0:status:processing-error"
 XACML StatusCode/@Value attribute processing-error value (XACML 2.0, B.9)
static const char XACML_STATUSCODE_SYNTAXERROR [] = "urn:oasis:names:tc:xacml:1.0:status:syntax-error"
 XACML StatusCode/@Value attribute syntax-error value (XACML 2.0, B.9)
static const char XACML_SUBJECT_CATEGORY_ACCESS [] = "urn:oasis:names:tc:xacml:1.0:subject-category:access-subject"
 XACML Subject/@SubjectCategory attribute access-subject value (XACML 2.0, B.2)
static const char XACML_SUBJECT_CATEGORY_CODEBASE [] = "urn:oasis:names:tc:xacml:1.0:subject-category:codebase"
 XACML Subject/@SubjectCategory attribute codebase value (XACML 2.0, B.2)
static const char XACML_SUBJECT_CATEGORY_INTERMEDIARY [] = "urn:oasis:names:tc:xacml:1.0:subject-category:intermediary-subject"
 XACML Subject/@SubjectCategory attribute intermediary-subject value (XACML 2.0, B.2)
static const char XACML_SUBJECT_CATEGORY_RECIPIENT [] = "urn:oasis:names:tc:xacml:1.0:subject-category:recipient-subject"
 XACML Subject/@SubjectCategory attribute recipient-subject value (XACML 2.0, B.2)
static const char XACML_SUBJECT_CATEGORY_REQUESTING_MACHINE [] = "urn:oasis:names:tc:xacml:1.0:subject-category:requesting-machine"
 XACML Subject/@SubjectCategory attribute requesting-machine value (XACML 2.0, B.2)
static const char XACML_SUBJECT_ID [] = "urn:oasis:names:tc:xacml:1.0:subject:subject-id"
 XACML Subject/Attribute subject-id identifier (XACML 2.0, B.4)
static const char XACML_SUBJECT_ID_QUALIFIER [] = "urn:oasis:names:tc:xacml:1.0:subject:subject-id-qualifier"
 XACML Subject/Attribute subject-id-qualifier identifier (XACML 2.0, B.4)
static const char XACML_SUBJECT_KEY_INFO [] = "urn:oasis:names:tc:xacml:1.0:subject:key-info"
 XACML Subject/Attribute key-info identifier (XACML 2.0, B.4)

Detailed Description

The XACML constants and object model (Request, Response, ...) used by the PEP client.

TODO: add object schema with the @image tag

Macro Definition Documentation

#define PEP_XACML_ERROR   0

PEP XACML model functions return code ERROR.

#define PEP_XACML_OK   1

PEP XACML model functions return code OK.

Typedef Documentation

typedef struct xacml_action xacml_action_t

PEP XACML Action type.

typedef struct xacml_attribute xacml_attribute_t

PEP XACML Attribute type.

typedef struct xacml_attributeassignment xacml_attributeassignment_t

PEP XACML AttributeAssignment type.

PEP XACML Result/Decision element constants.

typedef struct xacml_environment xacml_environment_t

PEP XACML Environment type.

PEP XACML Obligation/@FulfillOn attribute constants.

typedef struct xacml_obligation xacml_obligation_t

PEP XACML Obligation type.

typedef struct xacml_request xacml_request_t

PEP XACML Request type.

typedef struct xacml_resource xacml_resource_t

PEP XACML Resource type.

typedef struct xacml_response xacml_response_t

PEP XACML Response type.

typedef struct xacml_result xacml_result_t

PEP XACML Result type.

typedef struct xacml_status xacml_status_t

PEP XACML Status type.

typedef struct xacml_statuscode xacml_statuscode_t

PEP XACML StatusCode type.

typedef struct xacml_subject xacml_subject_t

PEP XACML Subject type.

Enumeration Type Documentation

PEP XACML Result/Decision element constants.

Enumerator:
XACML_DECISION_DENY 

Decision is Deny.

XACML_DECISION_PERMIT 

Decision is Permit.

XACML_DECISION_INDETERMINATE 

Decision is Indeterminate, the PEP was unable to evaluate the request.

XACML_DECISION_NOT_APPLICABLE 

Decision is NotApplicable, the PEP does not have any policy that applies to the request.

PEP XACML Obligation/@FulfillOn attribute constants.

Enumerator:
XACML_FULFILLON_DENY 

Fulfill the Obligation on Deny decision.

XACML_FULFILLON_PERMIT 

Fulfill the Obligation on Permit decision.

Function Documentation

int xacml_action_addattribute ( xacml_action_t action,
xacml_attribute_t attr 
)

Adds a XACML Attribute to the XACML Action.

Parameters
actionpointer to the XACML Action
attrpointer to the XACML Attribute to add
Returns
int PEP_XACML_OK or PEP_XACML_ERROR on error.
Examples:
pep_client_example.c.
size_t xacml_action_attributes_length ( const xacml_action_t action)

Returns the number of XACML Attribute contained in the XACML Action.

Parameters
actionpointer to the XACML Action
Returns
size_t number of XACML Attribute [1..n] contained in the Action or 0.
xacml_action_t* xacml_action_create ( void  )

Creates a XACML Action.

Returns
xacml_action_t * pointer to the new XACML Action or NULL on error.
Examples:
pep_client_example.c.
void xacml_action_delete ( xacml_action_t action)

Deletes the XACML Action.

The XACML Attributes contained in the Action will be deleted.

Parameters
actionpointer to the XACML Action to delete
Examples:
pep_client_example.c.
xacml_attribute_t* xacml_action_getattribute ( const xacml_action_t action,
int  attr_idx 
)

Gets the XACML Attribute from the XACML Action at the given index.

Parameters
actionpointer to the XACML Action
attr_idxindex of the XACML Attribute to get in range [0..length-1].
Returns
xacml_attribute_t * pointer to the XACML Attribute or NULL if index is out of range.
See Also
xacml_action_attributes_length(const xacml_action_t * action) to get the index range.
int xacml_attribute_addvalue ( xacml_attribute_t attr,
const char *  value 
)

Adds a value element to the XACML Attribute.

Parameters
attrpointer to the XACML Attribute
valuethe value (string) to add
Returns
int PEP_XACML_OK or PEP_XACML_ERROR on error.
Examples:
pep_client_example.c.
xacml_attribute_t* xacml_attribute_clone ( const xacml_attribute_t attr)

Clone the XACML Attribute.

Parameters
attrpointer to the XACML Attribute to clone
Returns
xacml_attribute_t * pointer to the new cloned Attribute or NULL on error.
xacml_attribute_t* xacml_attribute_create ( const char *  id)

Creates and initializes a XACML Attribute.

Parameters
idthe mandatory id attribute
Returns
xacml_attribute_t * pointer to the new Attribute or NULL on error.
Examples:
pep_client_example.c.
void xacml_attribute_delete ( xacml_attribute_t attr)

Deletes the XACML Attribute.

Parameters
attrpointer to the XACML Attribute to delete
Note
The XACML containers (Subject, Resource, Action or Environment) will delete the contained Attributes when deleted.
const char* xacml_attribute_getdatatype ( const xacml_attribute_t attr)

Gets the datatype attribute of the XACML Attribute.

Parameters
attrpointer to the XACML Attribute
Returns
const char * the datatype attribute or NULL
const char* xacml_attribute_getid ( const xacml_attribute_t attr)

Gets the id attribute of the XACML Attribute.

Parameters
attrpointer to the XACML Attribute
Returns
const char * the id attribute or NULL
const char* xacml_attribute_getissuer ( const xacml_attribute_t attr)

Gets the issuer attribute of the XACML Attribute.

Parameters
attrpointer to the XACML Attribute
Returns
const char * the issuer attribute or NULL
const char* xacml_attribute_getvalue ( const xacml_attribute_t attr,
int  value_idx 
)

Gets the AttributeValue of the XACML Attribute at index.

Parameters
attrpointer to the XACML Attribute
value_idxindex of the AttributeValue to get in range [0..length-1].
Returns
const char * the AttributeValue or NULL if index is out of range.
See Also
xacml_attribute_values_length(const xacml_attribute_t * attr) to get the index range.
int xacml_attribute_setdatatype ( xacml_attribute_t attr,
const char *  datatype 
)

Sets the datatype attribute of the XACML Attribute.

Default datatype: XACML_DATATYPE_STRING

Parameters
attrpointer to the XACML Attribute
datatypethe datatype attribute (can be NULL)
Returns
int PEP_XACML_OK or PEP_XACML_ERROR on error.
Examples:
pep_client_example.c.
int xacml_attribute_setid ( xacml_attribute_t attr,
const char *  id 
)

Sets the id attribute of the XACML Attribute.

Parameters
attrpointer to the XACML Attribute
idthe id attribute
Returns
int PEP_XACML_OK or PEP_XACML_ERROR on error.
int xacml_attribute_setissuer ( xacml_attribute_t attr,
const char *  issuer 
)

Sets the issuer attribute of the XACML Attribute.

Parameters
attrpointer to the XACML Attribute
issuerthe issuer attribute
Returns
int PEP_XACML_OK or PEP_XACML_ERROR on error.
size_t xacml_attribute_values_length ( const xacml_attribute_t attr)

Returns the number of AttributeValue in the XACML Attribute.

Parameters
attrpointer to the XACML Attribute
Returns
size_t number of AttributeValue [1..n] or 0.
See Also
xacml_attribute_getvalue(const xacml_attribute_t * attr,int index) to get an AttributeValue at a particular index.
int xacml_attributeassignment_addvalue ( xacml_attributeassignment_t attr,
const char *  value 
)
Deprecated:
AttributeAssignment can only have one value, use xacml_attributeassignment_setvalue(xacml_attributeassignment_t * attr, const char *value) instead.

Adds a value to the XACML AttributeAssignment.

Parameters
attrpointer to the XACML AttributeAssignment
valuethe AttributeValue to add.
Returns
int PEP_XACML_OK or PEP_XACML_ERROR on error.
xacml_attributeassignment_t* xacml_attributeassignment_create ( const char *  id)

Creates a XACML AttributeAssignment.

Parameters
idthe mandatory AttributeAssignment/@AttributeId attribute
Returns
xacml_attributeassignment_t * pointer to the new XACML AttributeAssignment or NULL on error.
void xacml_attributeassignment_delete ( xacml_attributeassignment_t attr)

Deletes the XACML AttributeAssignment.

The AttributeValues contained in the AttributeAssignment are also deleted.

Parameters
attrpointer to the XACML AttributeAssignment
const char* xacml_attributeassignment_getdatatype ( const xacml_attributeassignment_t attr)

Gets the XACML AttributeAssignment/@DataType attribute.

Parameters
attrpointer to the XACML AttributeAssignment
Returns
const char * the AttributeAssignment/@DataType attribute or NULL if not set
Examples:
pep_client_example.c.
const char* xacml_attributeassignment_getid ( const xacml_attributeassignment_t attr)

Gets the XACML AttributeAssignment/@AttributeId attribute.

Parameters
attrpointer to the XACML AttributeAssignment
Returns
const char * the AttributeAssignment/@AttributeId attribute or NULL if not set
Examples:
pep_client_example.c.
const char* xacml_attributeassignment_getvalue ( const xacml_attributeassignment_t attr,
  ... 
)

Gets the value from the XACML AttributeAssignment.

Parameters
attrpointer to the XACML AttributeAssignment
...optional index of the value (ignored, back compatibility)
Returns
const char * the value or NULL if no value is set or if an error occurs.
Examples:
pep_client_example.c.
int xacml_attributeassignment_setdatatype ( xacml_attributeassignment_t attr,
const char *  datatype 
)

Sets the XACML AttributeAssignment/@DataType attribute.

Parameters
attrpointer to the XACML AttributeAssignment
datatypethe AttributeAssignment/@DataType attribute to set (can be NULL).
Returns
int PEP_XACML_OK or PEP_XACML_ERROR on error.
int xacml_attributeassignment_setid ( xacml_attributeassignment_t attr,
const char *  id 
)

Sets the XACML AttributeAssignment/@AttributeId attribute.

Parameters
attrpointer to the XACML AttributeAssignment
idthe AttributeAssignment/@AttributeId attribute to set.
Returns
int PEP_XACML_OK or PEP_XACML_ERROR on error.
int xacml_attributeassignment_setvalue ( xacml_attributeassignment_t attr,
const char *  value 
)

Sets the value to the XACML AttributeAssignment.

Parameters
attrpointer to the XACML AttributeAssignment
valuethe value to set.
Returns
int PEP_XACML_OK or PEP_XACML_ERROR on error.
size_t xacml_attributeassignment_values_length ( const xacml_attributeassignment_t attr)
Deprecated:
AttributeAssignment can only have one value, use xacml_attributeassignment_getvalue(const xacml_attributeassignment_t * attr) instead.

Returns the number of values (string) for the XACML AttributeAssignment.

Parameters
attrpointer to the XACML AttributeAssignment
Returns
size_t number of values (always 1) for the AttributeAssignment or 0 on error.
int xacml_environment_addattribute ( xacml_environment_t env,
xacml_attribute_t attr 
)

Adds a XACML Attribute to the XACML Environment.

Parameters
envpointer to the XACML Environment
attrpointer to the XACML Attribute to add
Returns
int PEP_XACML_OK or PEP_XACML_ERROR on error.
size_t xacml_environment_attributes_length ( const xacml_environment_t env)

Returns the number of XACML Attribute contained in the XACML Environment.

Parameters
envpointer to the XACML Environment
Returns
size_t number of XACML Attribute [1..n] contained in the Environment or 0.
xacml_environment_t* xacml_environment_create ( void  )

Creates a XACML Environment.

Returns
xacml_environment_t * pointer to the new XACML Environment or NULL on error.
void xacml_environment_delete ( xacml_environment_t env)

Deletes the XACML Environment.

The XACML Attributes contained in the Environment will be deleted.

Parameters
envpointer to the XACML Environment to delete
xacml_attribute_t* xacml_environment_getattribute ( const xacml_environment_t env,
int  attr_idx 
)

Gets the XACML Attribute from the XACML Environment at the given index.

Parameters
envpointer to the XACML Environment
attr_idxindex of the XACML Attribute to get in range [0..length-1].
Returns
xacml_attribute_t * pointer to the XACML Attribute or NULL if index is out of range.
See Also
xacml_environment_attributes_length(const xacml_environment_t * env) to get the index range.
int xacml_obligation_addattributeassignment ( xacml_obligation_t obligation,
xacml_attributeassignment_t attr 
)

Adds a XACML AttributeAssignment to the XACML Obligation.

Parameters
obligationpointer to the XACML Obligation
attrpointer to the XACML AttributeAssignment to add.
Returns
int PEP_XACML_OK or PEP_XACML_ERROR on error.
size_t xacml_obligation_attributeassignments_length ( const xacml_obligation_t obligation)

Returns the number of XACML AttributeAssignment in the XACML Obligation.

Parameters
obligationpointer to the XACML Obligation
Returns
size_t number of XACML AttributeAssignment [1..n] contained in the Obligation or 0.
See Also
xacml_obligation_getattributeassignment(const xacml_obligation_t * obligation,int index) to get a XACML Constants and Objects Model AttributeAssignment at a particular index.
Examples:
pep_client_example.c.
xacml_obligation_t* xacml_obligation_create ( const char *  id)

Creates a XACML Obligation.

Parameters
idthe mandatory Obligation/@ObligationId attribute
Returns
xacml_obligation_t * pointer to the new XACML Obligation or NULL on error.
void xacml_obligation_delete ( xacml_obligation_t obligation)

Deletes the XACML Obligation.

The contained AttributeAssignments will be recusively deleted.

Parameters
obligationpointer to the XACML Obligation
xacml_attributeassignment_t* xacml_obligation_getattributeassignment ( const xacml_obligation_t obligation,
int  attr_idx 
)

Gets the XACML AttributeAssignment from the Obligation at the given index.

Parameters
obligationpointer to the XACML Obligation
attr_idxindex of the XACML AttributeAssignment to get in range [0..length-1].
Returns
xacml_attributeassignment_t * pointer to the XACML AtttibuteAssignment or NULL if out of range.
See Also
xacml_obligation_attributeassignments_length(const xacml_obligation_t * obligation) to get the index range.
Examples:
pep_client_example.c.
xacml_fulfillon_t xacml_obligation_getfulfillon ( const xacml_obligation_t obligation)

Gets the XACML Obligation/@FulfillOn attribute.

Parameters
obligationpointer to the XACML Obligation
Returns
xacml_fulfillon_t the FulfillOn attribute value.
See Also
xacml_fulfillon for attribute values.
Examples:
pep_client_example.c.
const char* xacml_obligation_getid ( const xacml_obligation_t obligation)

Gets the XACML Obligation/@ObligationId attribute.

Parameters
obligationpointer to the XACML Obligation
Returns
const char * the ObligationId attribute or NULL if not set.
Examples:
pep_client_example.c.
int xacml_obligation_setfulfillon ( xacml_obligation_t obligation,
xacml_fulfillon_t  fulfillon 
)

Sets the XACML Obligation/@FulfillOn attribute.

Parameters
obligationpointer to the XACML Obligation
fulfillonthe FulfillOn attribute to set.
Returns
int PEP_XACML_OK or PEP_XACML_ERROR on error.
See Also
xacml_fulfillon for FulfillOn values.
int xacml_obligation_setid ( xacml_obligation_t obligation,
const char *  id 
)

Sets the XACML Obligation/@ObligationId attribute.

Parameters
obligationpointer to the XACML Obligation
idthe Obligation/@ObligationId attribute
Returns
int PEP_XACML_OK or PEP_XACML_ERROR on error.
int xacml_request_addresource ( xacml_request_t request,
xacml_resource_t resource 
)

Adds a XACML Resource to the XACML Request.

Parameters
requestpointer to the XACML Request
resourcepointer to the XACML Resource to add
Returns
int PEP_XACML_OK or PEP_XACML_ERROR on error.
Examples:
pep_client_example.c.
int xacml_request_addsubject ( xacml_request_t request,
xacml_subject_t subject 
)

Adds a XACML Subject to the XACML Request.

Parameters
requestpointer to the XACML Request
subjectpointer to the XACML Subject to add
Returns
int PEP_XACML_OK or PEP_XACML_ERROR on error.
Examples:
pep_client_example.c.
xacml_request_t* xacml_request_create ( void  )

Creates a XACML Request.

Returns
xacml_request_t * pointer to the new XACML Request or NULL on error.
Examples:
pep_client_example.c.
void xacml_request_delete ( xacml_request_t request)

Deletes the XACML Request.

Contained Subjects, Resources, Action and Environment will be recursively deleted.

Parameters
requestpointer to the XACML Request to delete
Examples:
pep_client_example.c.
xacml_action_t* xacml_request_getaction ( const xacml_request_t request)

Gets a XACML Action of the XACML Request.

Parameters
requestpointer to the XACML Request
Returns
xacml_action_t * pointer to the XACML Action or NULL if not present
xacml_environment_t* xacml_request_getenvironment ( const xacml_request_t request)

Gets a XACML Environment of the XACML Request.

Parameters
requestpointer to the XACML Request
Returns
xacml_environment_t * pointer to the XACML Environment or NULL if not present
xacml_resource_t* xacml_request_getresource ( const xacml_request_t request,
int  resource_idx 
)

Gets the XACML Resource of the XACML Request at the given index.

Parameters
requestpointer to the XACML Request
resource_idxindex of the XACML Resource to get in range [0..length-1]
Returns
xacml_resource_t * pointer the XACML Resource or NULL if index is out of range
See Also
xacml_request_resources_length(const xacml_request_t * request) to get the index range
xacml_subject_t* xacml_request_getsubject ( const xacml_request_t request,
int  subject_idx 
)

Gets the XACML Subject of the XACML Request at the given index.

Parameters
requestpointer to the XACML Request
subject_idxindex of the XACML Subject to get in range [0..length-1]
Returns
xacml_subject_t * pointer the XACML Subject or NULL if index is out of range
See Also
xacml_request_subjects_length(const xacml_request_t * request) to get the index range
size_t xacml_request_resources_length ( const xacml_request_t request)

Returns the number of XACML Resource contained in the XACML Request.

Parameters
requestpointer to the XACML Request
Returns
size_t number of XACML Resource [1..n] contained in the Request or 0.
int xacml_request_setaction ( xacml_request_t request,
xacml_action_t action 
)

Sets a XACML Action for the XACML Request.

Parameters
requestpointer to the XACML Request
actionpointer to the XACML Action to set
Returns
int PEP_XACML_OK or PEP_XACML_ERROR on error.
Examples:
pep_client_example.c.
int xacml_request_setenvironment ( xacml_request_t request,
xacml_environment_t env 
)

Sets a XACML Environment for the XACML Request.

Parameters
requestpointer to the XACML Request
envpointer to the XACML Environment to set
Returns
int PEP_XACML_OK or PEP_XACML_ERROR on error.
size_t xacml_request_subjects_length ( const xacml_request_t request)

Returns the number of XACML Subject contained in the XACML Request.

Parameters
requestpointer to the XACML Request
Returns
size_t number of XACML Subject [1..n] contained in the Request or 0.
int xacml_resource_addattribute ( xacml_resource_t resource,
xacml_attribute_t attr 
)

Adds a XACML Attribute to the XACML Resource.

Parameters
resourcepointer to the XACML Resource
attrpointer to the XACML Attribute to add
Returns
int PEP_XACML_OK or PEP_XACML_ERROR on error.
Examples:
pep_client_example.c.
size_t xacml_resource_attributes_length ( const xacml_resource_t resource)

Returns the number of XACML Attribute contained in the XACML Resource.

Parameters
resourcepointer to the XACML Resource
Returns
size_t number of XACML Attribute [1..n] contained in the Resource or 0.
xacml_resource_t* xacml_resource_create ( void  )

Creates a XACML Resource.

Returns
xacml_resource_t * pointer to the new XACML Resource or NULL on error.
Examples:
pep_client_example.c.
void xacml_resource_delete ( xacml_resource_t resource)

Deletes the XACML Resource.

The XACML Attributes contained in the Resource will be deleted.

Parameters
resourcepointer to the XACML Resource
Examples:
pep_client_example.c.
xacml_attribute_t* xacml_resource_getattribute ( const xacml_resource_t resource,
int  attr_idx 
)

Gets the XACML Attribute from the XACML Resource at the given index.

Parameters
resourcepointer to the XACML Resource
attr_idxindex of the XACML Attribute to get in range [0..length-1].
Returns
xacml_attribute_t * pointer to the XACML Attribute or NULL if index is out of range.
See Also
xacml_resource_attributes_length(const xacml_resource_t * resource) to get the index range.
const char* xacml_resource_getcontent ( const xacml_resource_t resource)

Gets the XACML Resource/ResourceContent element as string.

Parameters
resourcepointer the XACML Resource
Returns
const char * the ResourceContent as string or NULL if not set
int xacml_resource_setcontent ( xacml_resource_t resource,
const char *  content 
)

Sets the XACML Resource/ResourceContent element as string.

Parameters
resourcepointer the XACML Resource
contentthe ResourceContent as string
Returns
int PEP_XACML_OK or PEP_XACML_ERROR on error.
int xacml_response_addresult ( xacml_response_t response,
xacml_result_t result 
)

Adds a XACML Result associated to the XACML Response.

Parameters
responsepointer to the XACML Response
resultpointer to the XACML Result to add.
Returns
int PEP_XACML_OK or PEP_XACML_ERROR on error.
xacml_response_t* xacml_response_create ( void  )

Creates a XACML Response.

Returns
xacml_response_t * pointer to the new XACML Response or NULL on error.
void xacml_response_delete ( xacml_response_t response)

Deletes the XACML Response.

The elements contained in the Response will be recursively deleted.

Parameters
responsepointer to the XACML Response
Examples:
pep_client_example.c.
xacml_request_t* xacml_response_getrequest ( const xacml_response_t response)
xacml_result_t* xacml_response_getresult ( const xacml_response_t response,
int  result_idx 
)

Gets the XACML Result from the XACML Response at the given index.

Parameters
responsepointer to the XACML Response
result_idxindex of the XACML Result to get in range [0..length-1]
See Also
xacml_response_results_length(const xacml_response_t * response) to get the index range.
Examples:
pep_client_example.c.
xacml_request_t* xacml_response_relinquishrequest ( xacml_response_t response)
size_t xacml_response_results_length ( const xacml_response_t response)

Returns the number of XACML Result in the XACML Response.

Parameters
responsepointer to the XACML Response
Returns
size_t number of XACML Result [1..n] contained in the Response or 0.
See Also
xacml_response_getresult(const xacml_response_t * response, int index) to get a XACML Constants and Objects Model Result at a particular index.
Examples:
pep_client_example.c.
int xacml_response_setrequest ( xacml_response_t response,
xacml_request_t request 
)
int xacml_result_addobligation ( xacml_result_t result,
xacml_obligation_t obligation 
)

Adds a XACML Obligation to the XACML Result.

Parameters
resultpointer to the XACML Result
obligationpointer to the XACML Obligation to add
Returns
int PEP_XACML_OK or PEP_XACML_ERROR on error.
xacml_result_t* xacml_result_create ( void  )

Creates a XACML Result.

Returns
xacml_result_t * pointer to the new XACML Result or NULL on error.
void xacml_result_delete ( xacml_result_t result)

Deletes the XACML Result.

The contained Obligations will be recursively deleted.

Parameters
resultpointer to the XACML Result
xacml_decision_t xacml_result_getdecision ( const xacml_result_t result)

Gets the XACML Result/Decision value.

Parameters
resultpointer to the XACML Result
Returns
xacml_decision_t the XACML Result/Decision or -1 if result is NULL..
See Also
xacml_decision for valid Decision constants.
Examples:
pep_client_example.c.
xacml_obligation_t* xacml_result_getobligation ( const xacml_result_t result,
int  obligation_idx 
)

Gets the XACML Obligation from the XACML Result at the given index.

Parameters
resultpointer to the XACML Result
obligation_idxindex of the XACML Obligation to get in range [0..length-1]
See Also
xacml_result_obligations_length(const xacml_result_t * result) to get the index range.
Examples:
pep_client_example.c.
const char* xacml_result_getresourceid ( const xacml_result_t result)

Gets the XACML Result/@ResourceId attribute.

Parameters
resultpointer to the XACML Result
Returns
const char * the ResourceId attribute or NULL if not set.
Examples:
pep_client_example.c.
xacml_status_t* xacml_result_getstatus ( const xacml_result_t result)

Gets the XACML Status from Result.

Parameters
resultpointer to the XACML Result
Returns
xacml_status_t * pointer to the XACML Status or NULL if not set.
See Also
xacml_status_t XACML Constants and Objects Model Status
Examples:
pep_client_example.c.
size_t xacml_result_obligations_length ( const xacml_result_t result)

Returns the number of XACML Obligation in the XACML Result.

Parameters
resultpointer to the XACML Result
Returns
size_t number of XACML Obligation [1..n] contained in the Result or 0.
See Also
xacml_result_getobligation(const xacml_result_t * result, int index) to get a XACML Constants and Objects Model Obligation at a particular index.
Examples:
pep_client_example.c.
int xacml_result_removeobligation ( xacml_result_t result,
int  obligation_idx 
)

Removes the XACML Obligation from the XACML Result at the given index.

Parameters
resultpointer to the XACML Result
obligation_idxindex of the XACML Obligation to get in range [0..length-1]
Returns
int PEP_XACML_OK or PEP_XACML_ERROR on error.
See Also
xacml_result_obligations_length(const xacml_result_t * result) to get the index range.
int xacml_result_setdecision ( xacml_result_t result,
xacml_decision_t  decision 
)

Sets the XACML Result/Decision value.

Parameters
resultpointer to the XACML Result
decisionthe XACML Result/Decision to set.
Returns
int PEP_XACML_OK or PEP_XACML_ERROR on error.
See Also
xacml_decision for valid Decision constants.
int xacml_result_setresourceid ( xacml_result_t result,
const char *  resourceid 
)

Sets the XACML Result/@ResourceId attribute.

Parameters
resultpointer to the XACML Result
resourceidthe ResourceId attribute to set
Returns
int PEP_XACML_OK or PEP_XACML_ERROR on error.
int xacml_result_setstatus ( xacml_result_t result,
xacml_status_t status 
)

Sets the XACML Status in the XACML Result.

Parameters
resultpointer to the XACML Result
statuspointer to the XACML Status
Returns
int PEP_XACML_OK or PEP_XACML_ERROR on error.
See Also
xacml_status_t XACML Constants and Objects Model Status
xacml_status_t* xacml_status_create ( const char *  message)

Creates a XACML Status.

Parameters
messagethe Status/StatusMessage element (string)
Returns
xacml_status_t * pointer to the new XACML Status or NULL on error.
void xacml_status_delete ( xacml_status_t status)

Deletes the XACML Status.

The StatusCode contained in the Status is recursively deleted.

Parameters
statuspointer to the XACML Status
xacml_statuscode_t* xacml_status_getcode ( const xacml_status_t status)

Gets the XACML StatusCode for this XACML Status.

Parameters
statuspointer to the XACML Status
Returns
xacml_statuscode_t * pointer to the XACML StatusCode or NULL if not set
Examples:
pep_client_example.c.
const char* xacml_status_getmessage ( const xacml_status_t status)

Gets the XACML Status/StatusMessage element (string)

Parameters
statuspointer to the XACML Status
Returns
const char * the StatusMessage or NULL if not set.
Examples:
pep_client_example.c.
int xacml_status_setcode ( xacml_status_t status,
xacml_statuscode_t statuscode 
)

Sets the XACML StatusCode for this XACML Status.

Parameters
statuspointer to the XACML Status
statuscodepointer to the XACML StatusCode to set
Returns
int PEP_XACML_OK or PEP_XACML_ERROR on error.
int xacml_status_setmessage ( xacml_status_t status,
const char *  message 
)

Sets the XACML Status/StatusMessage element (string)

Parameters
statuspointer to the XACML Status
messagethe StatusMessage to set.
Returns
int PEP_XACML_OK or PEP_XACML_ERROR on error.
xacml_statuscode_t* xacml_statuscode_create ( const char *  value)

Creates a XACML StatusCode.

Parameters
valuethe Status/@Value attribute
Returns
xacml_statuscode_t * pointer to the new XACML StatusCode or NULL on error.
void xacml_statuscode_delete ( xacml_statuscode_t statuscode)

Deletes the XACML StatusCode.

Optional minor child StatusCode (subcode) is recursively deleted.

Parameters
statuscodepointer the XACML StatusCode
xacml_statuscode_t* xacml_statuscode_getsubcode ( const xacml_statuscode_t statuscode)

Gets the minor XACML StatusCode for this XACML StatusCode.

Parameters
statuscodepointer the XACML StatusCode
Returns
xacml_statuscode_t * pointer to the minor child XACML StatusCode or NULL if not present.
Examples:
pep_client_example.c.
const char* xacml_statuscode_getvalue ( const xacml_statuscode_t statuscode)

Gets the XACML StatusCode/@Value attribute.

Parameters
statuscodepointer the XACML StatusCode
Returns
const char * the StatusCode/@Value attribute or NULL if not set.
See Also
XACML_STATUSCODE_OK value constant
XACML_STATUSCODE_MISSINGATTRIBUTE value constant
XACML_STATUSCODE_SYNTAXERROR value constant
XACML_STATUSCODE_PROCESSINGERROR value constant
Examples:
pep_client_example.c.
int xacml_statuscode_setsubcode ( xacml_statuscode_t statuscode,
xacml_statuscode_t subcode 
)

Sets the minor XACML StatusCode for this XACML StatusCode.

Parameters
statuscodepointer the XACML StatusCode
subcodepointer to the minor child XACML StatusCode to set.
Returns
int PEP_XACML_OK or PEP_XACML_ERROR on error.
int xacml_statuscode_setvalue ( xacml_statuscode_t statuscode,
const char *  value 
)

Sets the XACML StatusCode/@Value attribute.

Parameters
statuscodepointer the XACML StatusCode
valuethe StatusCode/@Value attribute to set.
Returns
int PEP_XACML_OK or PEP_XACML_ERROR on error.
See Also
XACML_STATUSCODE_OK value constant
XACML_STATUSCODE_MISSINGATTRIBUTE value constant
XACML_STATUSCODE_SYNTAXERROR value constant
XACML_STATUSCODE_PROCESSINGERROR value constant
int xacml_subject_addattribute ( xacml_subject_t subject,
xacml_attribute_t attr 
)

Adds a XACML Attribute to the Subject.

Parameters
subjectpointer to the XACML Subject
attrpointer to the XACML Attribute to add
Returns
int PEP_XACML_OK or PEP_XACML_ERROR on error.
See Also
Attribute
Examples:
pep_client_example.c.
size_t xacml_subject_attributes_length ( const xacml_subject_t subject)

Returns the number of XACML Attribute in the XACML Subject.

Parameters
subjectpointer to the XACML Subject
Returns
size_t number of XACML Attribute [1..n] contained in the Subject or 0.
See Also
xacml_subject_getattribute(const xacml_subject_t * subject, int index) to get a XACML Constants and Objects Model Attribute at a particular index.
xacml_subject_t* xacml_subject_create ( void  )

Creates a XACML Subject.

Returns
xacml_subject_t * pointer to the new XACML Subject or NULL on error.
Examples:
pep_client_example.c.
void xacml_subject_delete ( xacml_subject_t subject)

Deletes the XACML Subject.

Parameters
subjectpointer to the XACML Subject
Note
The XACML container (Request) will delete the contained XACML Subjects when deleted.
Examples:
pep_client_example.c.
xacml_attribute_t* xacml_subject_getattribute ( const xacml_subject_t subject,
int  attr_idx 
)

Gets the XACML Attribute from the XACML Subject at index.

Parameters
subjectpointer to the XACML Subject
attr_idxindex of the XACML Attribute to get in range [0..length-1].
Returns
xacml_attribute_t * pointer to the XACML Attribute or NULL if index is out of range.
See Also
xacml_subject_attributes_length(const xacml_subject_t * subject) to get the index range.
const char* xacml_subject_getcategory ( const xacml_subject_t subject)

Gets the XACML Subject/@SubjectCategory attribute value.

Parameters
subjectpointer to the XACML Subject
Returns
const char * the SubjectCategory attribute value or NULL
int xacml_subject_setcategory ( xacml_subject_t subject,
const char *  category 
)

Sets the XACML Subject/@SubjectCategory attribute.

Parameters
subjectpointer to the XACML Subject
categorythe SubjectCategory attribute
Returns
int PEP_XACML_OK or PEP_XACML_ERROR on error.
See Also
XACML_SUBJECT_CATEGORY_ACCESS constant
XACML_SUBJECT_CATEGORY_INTERMEDIARY constant
XACML_SUBJECT_CATEGORY_RECIPIENT constant
XACML_SUBJECT_CATEGORY_CODEBASE constant
XACML_SUBJECT_CATEGORY_REQUESTING_MACHINE constant

Variable Documentation

const char XACML_ACTION_ID[] = "urn:oasis:names:tc:xacml:1.0:action:action-id"
static

XACML Action/Attribute action-id identifier (XACML 2.0, B.7)

Examples:
pep_client_example.c.
const char XACML_DATATYPE_ANYURI[] = "http://www.w3.org/2001/XMLSchema#anyURI"
static

XACML data-type anyURI identifier (XACML 2.0, B.3)

const char XACML_DATATYPE_BASE64BINARY[] = "http://www.w3.org/2001/XMLSchema#base64Binary"
static

XACML data-type base64Binary identifier (XACML 2.0, B.3)

const char XACML_DATATYPE_BOOLEAN[] = "http://www.w3.org/2001/XMLSchema#boolean"
static

XACML data-type boolean identifier (XACML 2.0, B.3)

const char XACML_DATATYPE_DATE[] = "http://www.w3.org/2001/XMLSchema#date"
static

XACML data-type date identifier (XACML 2.0, B.3)

const char XACML_DATATYPE_DATETIME[] = "http://www.w3.org/2001/XMLSchema#dateTime"
static

XACML data-type dateTime identifier (XACML 2.0, B.3)

const char XACML_DATATYPE_DAY_TIME_DURATION[] = "http://www.w3.org/TR/2002/WD-xquery-operators-20020816#dayTimeDuration"
static

XACML data-type dayTimeDuration identifier (XACML 2.0, B.3)

const char XACML_DATATYPE_DNSNAME[] = "urn:oasis:names:tc:xacml:1.0:data-type:dnsName"
static

XACML data-type dnsName identifier (XACML 2.0, B.3)

const char XACML_DATATYPE_DOUBLE[] = "http://www.w3.org/2001/XMLSchema#double"
static

XACML data-type double identifier (XACML 2.0, B.3)

const char XACML_DATATYPE_HEXBINARY[] = "http://www.w3.org/2001/XMLSchema#hexBinary"
static

XACML data-type hexBinary identifier (XACML 2.0, B.3)

const char XACML_DATATYPE_INTEGER[] = "http://www.w3.org/2001/XMLSchema#integer"
static

XACML data-type integer identifier (XACML 2.0, B.3)

const char XACML_DATATYPE_IPADDRESS[] = "urn:oasis:names:tc:xacml:1.0:data-type:ipAddress"
static

XACML data-type ipAddress identifier (XACML 2.0, B.3)

const char XACML_DATATYPE_RFC822NAME[] = "urn:oasis:names:tc:xacml:1.0:data-type:rfc822Name"
static

XACML data-type rfc822Name identifier (XACML 2.0, B.3)

const char XACML_DATATYPE_STRING[] = "http://www.w3.org/2001/XMLSchema#string"
static

XACML data-type string identifier (XACML 2.0, B.3)

const char XACML_DATATYPE_TIME[] = "http://www.w3.org/2001/XMLSchema#time"
static

XACML data-type time identifier (XACML 2.0, B.3)

const char XACML_DATATYPE_X500NAME[] = "urn:oasis:names:tc:xacml:1.0:data-type:x500Name"
static

XACML data-type x500Name identifier (XACML 2.0, B.3)

Examples:
pep_client_example.c.
const char XACML_DATATYPE_YEAR_MONTH_DURATION[] = "http://www.w3.org/TR/2002/WD-xquery-operators-20020816#yearMonthDuration"
static

XACML data-type yearMonthDuration identifier (XACML 2.0, B.3)

const char XACML_ENVIRONMENT_CURRENT_DATE[] = "urn:oasis:names:tc:xacml:1.0:environment:current-date"
static

XACML Environment/Attribute current-date identifier (XACML 2.0, B.8)

const char XACML_ENVIRONMENT_CURRENT_DATETIME[] = "urn:oasis:names:tc:xacml:1.0:environment:current-dateTime"
static

XACML Environment/Attribute current-dateTime identifier (XACML 2.0, B.8)

const char XACML_ENVIRONMENT_CURRENT_TIME[] = "urn:oasis:names:tc:xacml:1.0:environment:current-time"
static

XACML Environment/Attribute current-time identifier (XACML 2.0, B.8)

const char XACML_RESOURCE_ID[] = "urn:oasis:names:tc:xacml:1.0:resource:resource-id"
static

XACML Resource/Attribute resource-id identifier (XACML 2.0, B.6)

Examples:
pep_client_example.c.
const char XACML_STATUSCODE_MISSINGATTRIBUTE[] = "urn:oasis:names:tc:xacml:1.0:status:missing-attribute"
static

XACML StatusCode/@Value attribute missing-attribute value (XACML 2.0, B.9)

const char XACML_STATUSCODE_OK[] = "urn:oasis:names:tc:xacml:1.0:status:ok"
static

XACML StatusCode/@Value attribute ok value (XACML 2.0, B.9)

const char XACML_STATUSCODE_PROCESSINGERROR[] = "urn:oasis:names:tc:xacml:1.0:status:processing-error"
static

XACML StatusCode/@Value attribute processing-error value (XACML 2.0, B.9)

const char XACML_STATUSCODE_SYNTAXERROR[] = "urn:oasis:names:tc:xacml:1.0:status:syntax-error"
static

XACML StatusCode/@Value attribute syntax-error value (XACML 2.0, B.9)

const char XACML_SUBJECT_CATEGORY_ACCESS[] = "urn:oasis:names:tc:xacml:1.0:subject-category:access-subject"
static

XACML Subject/@SubjectCategory attribute access-subject value (XACML 2.0, B.2)

const char XACML_SUBJECT_CATEGORY_CODEBASE[] = "urn:oasis:names:tc:xacml:1.0:subject-category:codebase"
static

XACML Subject/@SubjectCategory attribute codebase value (XACML 2.0, B.2)

const char XACML_SUBJECT_CATEGORY_INTERMEDIARY[] = "urn:oasis:names:tc:xacml:1.0:subject-category:intermediary-subject"
static

XACML Subject/@SubjectCategory attribute intermediary-subject value (XACML 2.0, B.2)

const char XACML_SUBJECT_CATEGORY_RECIPIENT[] = "urn:oasis:names:tc:xacml:1.0:subject-category:recipient-subject"
static

XACML Subject/@SubjectCategory attribute recipient-subject value (XACML 2.0, B.2)

const char XACML_SUBJECT_CATEGORY_REQUESTING_MACHINE[] = "urn:oasis:names:tc:xacml:1.0:subject-category:requesting-machine"
static

XACML Subject/@SubjectCategory attribute requesting-machine value (XACML 2.0, B.2)

const char XACML_SUBJECT_ID[] = "urn:oasis:names:tc:xacml:1.0:subject:subject-id"
static

XACML Subject/Attribute subject-id identifier (XACML 2.0, B.4)

Examples:
pep_client_example.c.
const char XACML_SUBJECT_ID_QUALIFIER[] = "urn:oasis:names:tc:xacml:1.0:subject:subject-id-qualifier"
static

XACML Subject/Attribute subject-id-qualifier identifier (XACML 2.0, B.4)

const char XACML_SUBJECT_KEY_INFO[] = "urn:oasis:names:tc:xacml:1.0:subject:key-info"
static

XACML Subject/Attribute key-info identifier (XACML 2.0, B.4)