46 #define PEP_XACML_OK 1
48 #define PEP_XACML_ERROR 0
xacml_fulfillon
PEP XACML Obligation/@FulfillOn attribute constants.
Definition: xacml.h:708
struct xacml_resource xacml_resource_t
PEP XACML Resource type.
Definition: xacml.h:252
xacml_statuscode_t * xacml_statuscode_getsubcode(const xacml_statuscode_t *statuscode)
Gets the minor XACML StatusCode for this XACML StatusCode.
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.
int xacml_statuscode_setvalue(xacml_statuscode_t *statuscode, const char *value)
Sets the XACML StatusCode/@Value attribute.
int xacml_action_addattribute(xacml_action_t *action, xacml_attribute_t *attr)
Adds a XACML Attribute to the XACML Action.
enum xacml_fulfillon xacml_fulfillon_t
PEP XACML Obligation/@FulfillOn attribute constants.
xacml_result_t * xacml_result_create(void)
Creates a XACML Result.
void xacml_response_delete(xacml_response_t *response)
Deletes the XACML Response.
struct xacml_action xacml_action_t
PEP XACML Action type.
Definition: xacml.h:315
int xacml_status_setcode(xacml_status_t *status, xacml_statuscode_t *statuscode)
Sets the XACML StatusCode for this XACML Status.
int xacml_response_addresult(xacml_response_t *response, xacml_result_t *result)
Adds a XACML Result associated to the XACML Response.
int xacml_result_removeobligation(xacml_result_t *result, int obligation_idx)
Removes the XACML Obligation from the XACML Result at the given index.
static const char XACML_SUBJECT_KEY_INFO[]
XACML Subject/Attribute key-info identifier (XACML 2.0, B.4)
Definition: xacml.h:180
void xacml_attribute_delete(xacml_attribute_t *attr)
Deletes the XACML Attribute.
int xacml_attribute_setid(xacml_attribute_t *attr, const char *id)
Sets the id attribute of the XACML Attribute.
static const char XACML_DATATYPE_IPADDRESS[]
XACML data-type ipAddress identifier (XACML 2.0, B.3)
Definition: xacml.h:56
void xacml_environment_delete(xacml_environment_t *env)
Deletes the XACML Environment.
static const char XACML_SUBJECT_ID_QUALIFIER[]
XACML Subject/Attribute subject-id-qualifier identifier (XACML 2.0, B.4)
Definition: xacml.h:179
int xacml_result_setstatus(xacml_result_t *result, xacml_status_t *status)
Sets the XACML Status in the XACML Result.
static const char XACML_ENVIRONMENT_CURRENT_DATETIME[]
XACML Environment/Attribute current-dateTime identifier (XACML 2.0, B.8)
Definition: xacml.h:370
void xacml_request_delete(xacml_request_t *request)
Deletes the XACML Request.
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.
void xacml_subject_delete(xacml_subject_t *subject)
Deletes the XACML Subject.
int xacml_attributeassignment_setid(xacml_attributeassignment_t *attr, const char *id)
Sets the XACML AttributeAssignment/@AttributeId attribute.
int xacml_result_setresourceid(xacml_result_t *result, const char *resourceid)
Sets the XACML Result/@ResourceId attribute.
const char * xacml_attribute_getdatatype(const xacml_attribute_t *attr)
Gets the datatype attribute of the XACML Attribute.
const char * xacml_attribute_getissuer(const xacml_attribute_t *attr)
Gets the issuer attribute of the XACML Attribute.
Fulfill the Obligation on Permit decision.
Definition: xacml.h:710
xacml_action_t * xacml_request_getaction(const xacml_request_t *request)
Gets a XACML Action of the XACML Request.
static const char XACML_STATUSCODE_SYNTAXERROR[]
XACML StatusCode/@Value attribute syntax-error value (XACML 2.0, B.9)
Definition: xacml.h:517
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.
size_t xacml_resource_attributes_length(const xacml_resource_t *resource)
Returns the number of XACML Attribute contained in the XACML Resource.
int xacml_request_setenvironment(xacml_request_t *request, xacml_environment_t *env)
Sets a XACML Environment for the XACML Request.
xacml_response_t * xacml_response_create(void)
Creates a XACML Response.
static const char XACML_DATATYPE_INTEGER[]
XACML data-type integer identifier (XACML 2.0, B.3)
Definition: xacml.h:60
static const char XACML_SUBJECT_CATEGORY_INTERMEDIARY[]
XACML Subject/@SubjectCategory attribute intermediary-subject value (XACML 2.0, B.2)
Definition: xacml.h:182
int xacml_resource_setcontent(xacml_resource_t *resource, const char *content)
Sets the XACML Resource/ResourceContent element as string.
void xacml_action_delete(xacml_action_t *action)
Deletes the XACML Action.
xacml_decision
PEP XACML Result/Decision element constants.
Definition: xacml.h:793
int xacml_subject_addattribute(xacml_subject_t *subject, xacml_attribute_t *attr)
Adds a XACML Attribute to the Subject.
int xacml_attributeassignment_setvalue(xacml_attributeassignment_t *attr, const char *value)
Sets the value to the XACML AttributeAssignment.
const char * xacml_attributeassignment_getdatatype(const xacml_attributeassignment_t *attr)
Gets the XACML AttributeAssignment/@DataType attribute.
int xacml_result_setdecision(xacml_result_t *result, xacml_decision_t decision)
Sets the XACML Result/Decision value.
const char * xacml_attribute_getid(const xacml_attribute_t *attr)
Gets the id attribute of the XACML Attribute.
static const char XACML_DATATYPE_RFC822NAME[]
XACML data-type rfc822Name identifier (XACML 2.0, B.3)
Definition: xacml.h:55
size_t xacml_obligation_attributeassignments_length(const xacml_obligation_t *obligation)
Returns the number of XACML AttributeAssignment in the XACML Obligation.
static const char XACML_DATATYPE_DAY_TIME_DURATION[]
XACML data-type dayTimeDuration identifier (XACML 2.0, B.3)
Definition: xacml.h:68
int xacml_attribute_setissuer(xacml_attribute_t *attr, const char *issuer)
Sets the issuer attribute of the XACML Attribute.
xacml_attributeassignment_t * xacml_attributeassignment_create(const char *id)
Creates a XACML AttributeAssignment.
static const char XACML_STATUSCODE_MISSINGATTRIBUTE[]
XACML StatusCode/@Value attribute missing-attribute value (XACML 2.0, B.9)
Definition: xacml.h:516
int xacml_environment_addattribute(xacml_environment_t *env, xacml_attribute_t *attr)
Adds a XACML Attribute to the XACML Environment.
int xacml_attributeassignment_setdatatype(xacml_attributeassignment_t *attr, const char *datatype)
Sets the XACML AttributeAssignment/@DataType attribute.
const char * xacml_subject_getcategory(const xacml_subject_t *subject)
Gets the XACML Subject/@SubjectCategory attribute value.
static const char XACML_DATATYPE_STRING[]
XACML data-type string identifier (XACML 2.0, B.3)
Definition: xacml.h:58
xacml_decision_t xacml_result_getdecision(const xacml_result_t *result)
Gets the XACML Result/Decision value.
xacml_obligation_t * xacml_obligation_create(const char *id)
Creates a XACML Obligation.
static const char XACML_ENVIRONMENT_CURRENT_TIME[]
XACML Environment/Attribute current-time identifier (XACML 2.0, B.8)
Definition: xacml.h:368
int xacml_attribute_setdatatype(xacml_attribute_t *attr, const char *datatype)
Sets the datatype attribute of the XACML Attribute.
xacml_environment_t * xacml_environment_create(void)
Creates a XACML Environment.
static const char XACML_STATUSCODE_OK[]
XACML StatusCode/@Value attribute ok value (XACML 2.0, B.9)
Definition: xacml.h:515
static const char XACML_DATATYPE_BOOLEAN[]
XACML data-type boolean identifier (XACML 2.0, B.3)
Definition: xacml.h:59
size_t xacml_attributeassignment_values_length(const xacml_attributeassignment_t *attr)
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.
xacml_status_t * xacml_status_create(const char *message)
Creates a XACML Status.
int xacml_request_setaction(xacml_request_t *request, xacml_action_t *action)
Sets a XACML Action for the XACML Request.
int xacml_attribute_addvalue(xacml_attribute_t *attr, const char *value)
Adds a value element to the XACML Attribute.
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.
static const char XACML_DATATYPE_X500NAME[]
XACML data-type x500Name identifier (XACML 2.0, B.3)
Definition: xacml.h:54
int xacml_response_setrequest(xacml_response_t *response, xacml_request_t *request)
Fulfill the Obligation on Deny decision.
Definition: xacml.h:709
xacml_action_t * xacml_action_create(void)
Creates a XACML Action.
int xacml_obligation_addattributeassignment(xacml_obligation_t *obligation, xacml_attributeassignment_t *attr)
Adds a XACML AttributeAssignment to the XACML Obligation.
Decision is Permit.
Definition: xacml.h:795
int xacml_statuscode_setsubcode(xacml_statuscode_t *statuscode, xacml_statuscode_t *subcode)
Sets the minor XACML StatusCode for this XACML StatusCode.
size_t xacml_action_attributes_length(const xacml_action_t *action)
Returns the number of XACML Attribute contained in the XACML Action.
xacml_statuscode_t * xacml_statuscode_create(const char *value)
Creates a XACML StatusCode.
int xacml_obligation_setid(xacml_obligation_t *obligation, const char *id)
Sets the XACML Obligation/@ObligationId attribute.
void xacml_attributeassignment_delete(xacml_attributeassignment_t *attr)
Deletes the XACML AttributeAssignment.
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.
struct xacml_attribute xacml_attribute_t
Definition: xacml.h:75
static const char XACML_SUBJECT_CATEGORY_ACCESS[]
XACML Subject/@SubjectCategory attribute access-subject value (XACML 2.0, B.2)
Definition: xacml.h:181
size_t xacml_response_results_length(const xacml_response_t *response)
Returns the number of XACML Result in the XACML Response.
const char * xacml_attribute_getvalue(const xacml_attribute_t *attr, int value_idx)
Gets the AttributeValue of the XACML Attribute at index.
Decision is Deny.
Definition: xacml.h:794
int xacml_resource_addattribute(xacml_resource_t *resource, xacml_attribute_t *attr)
Adds a XACML Attribute to the XACML Resource.
int xacml_request_addresource(xacml_request_t *request, xacml_resource_t *resource)
Adds a XACML Resource to the XACML Request.
size_t xacml_attribute_values_length(const xacml_attribute_t *attr)
Returns the number of AttributeValue in the XACML Attribute.
static const char XACML_DATATYPE_DOUBLE[]
XACML data-type double identifier (XACML 2.0, B.3)
Definition: xacml.h:61
void xacml_result_delete(xacml_result_t *result)
Deletes the XACML Result.
size_t xacml_result_obligations_length(const xacml_result_t *result)
Returns the number of XACML Obligation in the XACML Result.
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.
static const char XACML_DATATYPE_YEAR_MONTH_DURATION[]
XACML data-type yearMonthDuration identifier (XACML 2.0, B.3)
Definition: xacml.h:69
struct xacml_result xacml_result_t
PEP XACML Result type.
Definition: xacml.h:804
size_t xacml_subject_attributes_length(const xacml_subject_t *subject)
Returns the number of XACML Attribute in the XACML Subject.
Decision is Indeterminate, the PEP was unable to evaluate the request.
Definition: xacml.h:796
xacml_statuscode_t * xacml_status_getcode(const xacml_status_t *status)
Gets the XACML StatusCode for this XACML Status.
xacml_status_t * xacml_result_getstatus(const xacml_result_t *result)
Gets the XACML Status from Result.
xacml_attribute_t * xacml_attribute_create(const char *id)
Creates and initializes a XACML Attribute.
const char * xacml_attributeassignment_getid(const xacml_attributeassignment_t *attr)
Gets the XACML AttributeAssignment/@AttributeId attribute.
void xacml_status_delete(xacml_status_t *status)
Deletes the XACML Status.
Decision is NotApplicable, the PEP does not have any policy that applies to the request.
Definition: xacml.h:797
int xacml_obligation_setfulfillon(xacml_obligation_t *obligation, xacml_fulfillon_t fulfillon)
Sets the XACML Obligation/@FulfillOn attribute.
size_t xacml_request_subjects_length(const xacml_request_t *request)
Returns the number of XACML Subject contained in the XACML Request.
static const char XACML_DATATYPE_TIME[]
XACML data-type time identifier (XACML 2.0, B.3)
Definition: xacml.h:62
static const char XACML_RESOURCE_ID[]
XACML Resource/Attribute resource-id identifier (XACML 2.0, B.6)
Definition: xacml.h:257
static const char XACML_DATATYPE_ANYURI[]
XACML data-type anyURI identifier (XACML 2.0, B.3)
Definition: xacml.h:65
struct xacml_subject xacml_subject_t
Definition: xacml.h:173
const char * xacml_resource_getcontent(const xacml_resource_t *resource)
Gets the XACML Resource/ResourceContent element as string.
int xacml_result_addobligation(xacml_result_t *result, xacml_obligation_t *obligation)
Adds a XACML Obligation to the XACML Result.
struct xacml_request xacml_request_t
PEP XACML Request type.
Definition: xacml.h:413
static const char XACML_DATATYPE_BASE64BINARY[]
XACML data-type base64Binary identifier (XACML 2.0, B.3)
Definition: xacml.h:67
struct xacml_environment xacml_environment_t
PEP XACML Environment type.
Definition: xacml.h:363
xacml_resource_t * xacml_resource_create(void)
Creates a XACML Resource.
static const char XACML_ACTION_ID[]
XACML Action/Attribute action-id identifier (XACML 2.0, B.7)
Definition: xacml.h:320
void xacml_statuscode_delete(xacml_statuscode_t *statuscode)
Deletes the XACML StatusCode.
struct xacml_status xacml_status_t
PEP XACML Status type.
Definition: xacml.h:575
enum xacml_decision xacml_decision_t
PEP XACML Result/Decision element constants.
xacml_attribute_t * xacml_subject_getattribute(const xacml_subject_t *subject, int attr_idx)
Gets the XACML Attribute from the XACML Subject at index.
int xacml_status_setmessage(xacml_status_t *status, const char *message)
Sets the XACML Status/StatusMessage element (string)
static const char XACML_STATUSCODE_PROCESSINGERROR[]
XACML StatusCode/@Value attribute processing-error value (XACML 2.0, B.9)
Definition: xacml.h:518
struct xacml_obligation xacml_obligation_t
PEP XACML Obligation type.
Definition: xacml.h:717
const char * xacml_status_getmessage(const xacml_status_t *status)
Gets the XACML Status/StatusMessage element (string)
const char * xacml_statuscode_getvalue(const xacml_statuscode_t *statuscode)
Gets the XACML StatusCode/@Value attribute.
static const char XACML_SUBJECT_CATEGORY_RECIPIENT[]
XACML Subject/@SubjectCategory attribute recipient-subject value (XACML 2.0, B.2) ...
Definition: xacml.h:183
int xacml_request_addsubject(xacml_request_t *request, xacml_subject_t *subject)
Adds a XACML Subject to the XACML Request.
static const char XACML_SUBJECT_CATEGORY_REQUESTING_MACHINE[]
XACML Subject/@SubjectCategory attribute requesting-machine value (XACML 2.0, B.2) ...
Definition: xacml.h:185
xacml_request_t * xacml_response_getrequest(const xacml_response_t *response)
int xacml_subject_setcategory(xacml_subject_t *subject, const char *category)
Sets the XACML Subject/@SubjectCategory attribute.
size_t xacml_request_resources_length(const xacml_request_t *request)
Returns the number of XACML Resource contained in the XACML Request.
xacml_subject_t * xacml_subject_create(void)
Creates a XACML Subject.
int xacml_attributeassignment_addvalue(xacml_attributeassignment_t *attr, const char *value)
static const char XACML_DATATYPE_DNSNAME[]
XACML data-type dnsName identifier (XACML 2.0, B.3)
Definition: xacml.h:57
struct xacml_statuscode xacml_statuscode_t
PEP XACML StatusCode type.
Definition: xacml.h:510
void xacml_obligation_delete(xacml_obligation_t *obligation)
Deletes the XACML Obligation.
static const char XACML_DATATYPE_DATE[]
XACML data-type date identifier (XACML 2.0, B.3)
Definition: xacml.h:63
void xacml_resource_delete(xacml_resource_t *resource)
Deletes the XACML Resource.
static const char XACML_DATATYPE_DATETIME[]
XACML data-type dateTime identifier (XACML 2.0, B.3)
Definition: xacml.h:64
xacml_fulfillon_t xacml_obligation_getfulfillon(const xacml_obligation_t *obligation)
Gets the XACML Obligation/@FulfillOn attribute.
xacml_request_t * xacml_response_relinquishrequest(xacml_response_t *response)
static const char XACML_SUBJECT_CATEGORY_CODEBASE[]
XACML Subject/@SubjectCategory attribute codebase value (XACML 2.0, B.2)
Definition: xacml.h:184
size_t xacml_environment_attributes_length(const xacml_environment_t *env)
Returns the number of XACML Attribute contained in the XACML Environment.
static const char XACML_ENVIRONMENT_CURRENT_DATE[]
XACML Environment/Attribute current-date identifier (XACML 2.0, B.8)
Definition: xacml.h:369
static const char XACML_DATATYPE_HEXBINARY[]
XACML data-type hexBinary identifier (XACML 2.0, B.3)
Definition: xacml.h:66
const char * xacml_attributeassignment_getvalue(const xacml_attributeassignment_t *attr,...)
Gets the value from the XACML AttributeAssignment.
xacml_request_t * xacml_request_create(void)
Creates a XACML Request.
xacml_environment_t * xacml_request_getenvironment(const xacml_request_t *request)
Gets a XACML Environment of the XACML Request.
xacml_attribute_t * xacml_attribute_clone(const xacml_attribute_t *attr)
Clone the XACML Attribute.
const char * xacml_result_getresourceid(const xacml_result_t *result)
Gets the XACML Result/@ResourceId attribute.
struct xacml_attributeassignment xacml_attributeassignment_t
PEP XACML AttributeAssignment type.
Definition: xacml.h:624
const char * xacml_obligation_getid(const xacml_obligation_t *obligation)
Gets the XACML Obligation/@ObligationId attribute.
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.
static const char XACML_SUBJECT_ID[]
XACML Subject/Attribute subject-id identifier (XACML 2.0, B.4)
Definition: xacml.h:178
struct xacml_response xacml_response_t
PEP XACML Response type.
Definition: xacml.h:904