xacml_result_t xacml_request_add_action_attribute | ( | xacml_request_t | request, | |
const char * | attribute_id, | |||
const char * | data_type, | |||
const char * | issuer, | |||
const char * | value | |||
) |
Add an action attribute to an XACML query request
Adds an action attribute in the XACML query request.
request | XACML query request to add the attribute to. | |
attribute_id | String defining the identifier of the attribute. See Action Attributes for standard attribute IDs. | |
data_type | String defining the data type of the attribute's value. See Attribute Data Types for standard XACML data type names. | |
issuer | String defining the issuer of the environment attribute. | |
value | String defining the attribute value. |
XACML_RESULT_SUCCESS | Success. | |
XACML_RESULT_INVALID_PARAMETER | Invalid parameter. |
References XACML_RESULT_INVALID_PARAMETER, and XACML_RESULT_SUCCESS.
xacml_result_t xacml_request_add_environment_attribute | ( | xacml_request_t | request, | |
const char * | attribute_id, | |||
const char * | data_type, | |||
const char * | issuer, | |||
const char * | value | |||
) |
Add an environment attribute to an XACML query request
Adds an environment attribute in the XACML query request.
request | XACML query request to add the attribute to. | |
attribute_id | String defining the identifier of the attribute. See Environment Attributes for standard attribute IDs. | |
data_type | String defining the data type of the attribute's value. See Attribute Data Types for standard XACML data type names. | |
issuer | String defining the issuer of the environment attribute. | |
value | String defining the attribute value. |
XACML_RESULT_SUCCESS | Success. | |
XACML_RESULT_INVALID_PARAMETER | Invalid parameter. |
References XACML_RESULT_INVALID_PARAMETER, and XACML_RESULT_SUCCESS.
xacml_result_t xacml_request_add_resource_attribute | ( | xacml_request_t | request, | |
const xacml_resource_attribute_t | resource_attribute | |||
) |
Add a resource attribute set to an XACML query request
request | XACML query request to add the attribute to. | |
resource_attribute | Attribute set containing the attributes pertaining to a single resource. |
XACML_RESULT_SUCCESS | Success. | |
XACML_RESULT_INVALID_PARAMETER | Invalid parameter. |
References XACML_RESULT_INVALID_PARAMETER, and XACML_RESULT_SUCCESS.
xacml_result_t xacml_request_add_subject_attribute | ( | xacml_request_t | request, | |
const char * | subject_category, | |||
const char * | attribute_id, | |||
const char * | data_type, | |||
const char * | issuer, | |||
const char * | value | |||
) |
Add a subject attribute to an XACML query request
request | XACML query request to add the attribute to. | |
subject_category | String defining the access subject category of this attribute. See Access Subject Categories for standard subject categories. | |
attribute_id | String defining the identifier of this attribute. See Subject Attributes for standard attribute IDs. | |
data_type | String defining the data type of the attribute's value. See Attribute Data Types for standard XACML data type names. | |
issuer | String defining the issuer of the attribute. | |
value | String defining the attribute value. |
XACML_RESULT_SUCCESS | Success. | |
XACML_RESULT_INVALID_PARAMETER | Invalid parameter. |
References XACML_RESULT_INVALID_PARAMETER, and XACML_RESULT_SUCCESS.
void xacml_request_destroy | ( | xacml_request_t | request | ) |
Destroy an XACML query request
Frees resources associated with an XACML request structure. After calling this, the request value must not be used by the caller.
request | Request to destroy. |
Referenced by xacml_response_set_request_context().
xacml_result_t xacml_request_get_action_attribute | ( | const xacml_request_t | request, | |
size_t | num, | |||
const char ** | attribute_id, | |||
const char ** | data_type, | |||
const char ** | issuer, | |||
const char ** | value | |||
) |
Get the value of a action attribute
Retrieves the information related to a action attribute, based on the attribute's index. The total number of action attributes can be determined by calling xacml_request_get_action_attribute_count().
request | The XACML query request to inspect. | |
num | Attribute index. | |
attribute_id | Pointer to be set to the id of the attribute. The caller must not modify or free this value. See Action Attributes for standard values this may be set to. | |
data_type | Pointer to be set to the data type of the attribute. The caller must not modify or free this value. See Attribute Data Types for standard values this may be set to. | |
issuer | Pointer to be set to the issuer of the attribute. The caller must not modify or free this value. | |
value | Pointer to be set to the value of the attribute. The caller must not modify or free this value. |
XACML_RESULT_SUCCESS | Success. | |
XACML_RESULT_INVALID_PARAMETER | Invalid parameter. |
References XACML_RESULT_INVALID_PARAMETER, and XACML_RESULT_SUCCESS.
xacml_result_t xacml_request_get_action_attribute_count | ( | const xacml_request_t | request, | |
size_t * | count | |||
) |
Count the number of action attributes in XACML request
Modifies the value pointed to by count to contain the number of action attribute in request. Values from 0 to the value returned in count can be passed to xacml_request_get_action_attribute() to iterate through the set of action attributes in a request.
request | XACML query request to inspect. | |
count | Pointer to be set to the number of action attributes. |
XACML_RESULT_SUCCESS | Success. | |
XACML_RESULT_INVALID_PARAMETER | Invalid parameter. |
References XACML_RESULT_INVALID_PARAMETER, and XACML_RESULT_SUCCESS.
xacml_result_t xacml_request_get_environment_attribute | ( | const xacml_request_t | request, | |
size_t | num, | |||
const char ** | attribute_id, | |||
const char ** | data_type, | |||
const char ** | issuer, | |||
const char ** | value | |||
) |
Get the value of an environment attribute
Retrieves the information related to a environment attribute, based on the attribute's index. The total number of environment attributes can be determined by calling xacml_request_get_environment_attribute_count().
request | The XACML query request to inspect. | |
num | Attribute index. | |
attribute_id | Pointer to be set to the id of the attribute. The caller must not modify or free this value. See Environment Attributes for standard values this may be set to. | |
data_type | Pointer to be set to the data type of the attribute. The caller must not modify or free this value. See Attribute Data Types for standard values this may be set to. | |
issuer | Pointer to be set to the issuer of the attribute. The caller must not modify or free this value. | |
value | Pointer to be set to the value of the attribute. The caller must not modify or free this value. |
XACML_RESULT_SUCCESS | Success. | |
XACML_RESULT_INVALID_PARAMETER | Invalid parameter. |
References XACML_RESULT_INVALID_PARAMETER, and XACML_RESULT_SUCCESS.
xacml_result_t xacml_request_get_environment_attribute_count | ( | const xacml_request_t | request, | |
size_t * | count | |||
) |
Count the number of environment attributes in XACML request
Modifies the value pointed to by count to contain the number of environment attribute in request. Values from 0 to the value returned in count can be passed to xacml_request_get_environment_attribute() to iterate through the set of environment attributes in a request.
request | XACML query request to inspect. | |
count | Pointer to be set to the number of environment attributes. |
XACML_RESULT_SUCCESS | Success. | |
XACML_RESULT_INVALID_PARAMETER | Invalid parameter. |
References XACML_RESULT_INVALID_PARAMETER, and XACML_RESULT_SUCCESS.
xacml_result_t xacml_request_get_resource_attribute_count | ( | xacml_request_t | request, | |
size_t * | count | |||
) |
Count the number of resources in XACML request
Modifies the value pointed to by count to contain the number of resource attribute sets in request. Values from 0 to the value returned in count can be passed to xacml_request_get_resource_attribute() to iterate through the set of resources attribute sets in a request.
request | XACML query request to inspect. | |
count | Pointer to be set to the number of resource attributes attributes. |
XACML_RESULT_SUCCESS | Success. | |
XACML_RESULT_INVALID_PARAMETER | Invalid parameter. |
References XACML_RESULT_INVALID_PARAMETER, and XACML_RESULT_SUCCESS.
xacml_result_t xacml_request_get_subject | ( | const xacml_request_t | request, | |
const char ** | subject | |||
) |
Get the value of a request attribute
Retrieves the information related to the request subject.
request | The XACML query request to inspect. | |
subject | Pointer to be set to the subject. The caller must not modify or free this value. |
XACML_RESULT_SUCCESS | Success. | |
XACML_RESULT_INVALID_PARAMETER | Invalid parameter. |
References XACML_RESULT_INVALID_PARAMETER, and XACML_RESULT_SUCCESS.
xacml_result_t xacml_request_get_subject_attribute | ( | const xacml_request_t | request, | |
size_t | num, | |||
const char ** | subject_category, | |||
const char ** | attribute_id, | |||
const char ** | data_type, | |||
const char ** | issuer, | |||
const char ** | value | |||
) |
Get the value of a subject attribute
Retrieves the information related to a subject attribute, based on the attribute's index. The total number of subject attributes can be determined by calling xacml_request_get_subject_attribute_count().
request | The XACML query request to inspect. | |
num | Attribute index. | |
subject_category | Pointer to be set to the subject category of the attribute. The caller must not modify or free this value. See Access Subject Categories for standard values this may be set to. | |
attribute_id | Pointer to be set to the id of the attribute. The caller must not modify or free this value. See Subject Attributes for standard values this may be set to. | |
data_type | Pointer to be set to the data type of the attribute. The caller must not modify or free this value. See Attribute Data Types for standard values this may be set to. | |
issuer | Pointer to be set to the issuer of the attribute. The caller must not modify or free this value. | |
value | Pointer to be set to the value of the attribute. The caller must not modify or free this value. |
XACML_RESULT_SUCCESS | Success. | |
XACML_RESULT_INVALID_PARAMETER | Invalid parameter. |
References XACML_RESULT_INVALID_PARAMETER, and XACML_RESULT_SUCCESS.
xacml_result_t xacml_request_get_subject_attribute_count | ( | const xacml_request_t | request, | |
size_t * | count | |||
) |
Count the number of subject attributes in XACML request
Modifies the value pointed to by count to contain the number of subject attribute in request. Values from 0 to the value returned in count can be passed to xacml_request_get_subject_attribute() to iterate through the set of subject attributes in a request.
request | XACML query request to inspect. | |
count | Pointer to be set to the number of subject attributes. |
XACML_RESULT_SUCCESS | Success. | |
XACML_RESULT_INVALID_PARAMETER | Invalid parameter. |
References XACML_RESULT_INVALID_PARAMETER, and XACML_RESULT_SUCCESS.
xacml_result_t xacml_request_init | ( | xacml_request_t * | request | ) |
Initialize an XACML query request
Creates an XACML request structure which can be used to generate an authorization query and send it to an SAML / XACML server. After the request is no longer needed, the caller must destroy it by calling xacml_request_destroy().
request | Request to initialize. The value pointed to by this can be passed to other xacml_request_* functions. |
XACML_RESULT_SUCCESS | Success | |
XACML_RESULT_INVALID_PARAMETER | Invalid parameter |
References XACML_RESULT_INVALID_PARAMETER, and XACML_RESULT_SUCCESS.
Referenced by xacml_response_set_request_context().
xacml_result_t xacml_request_set_subject | ( | xacml_request_t | request, | |
const char * | subject | |||
) |
Set the subject of an XACML query request
request | XACML query request to set the subject. | |
subject | String representation of the XACML request subject. |
XACML_RESULT_SUCCESS | Success. | |
XACML_RESULT_INVALID_PARAMETER | Invalid parameter. |
References XACML_RESULT_INVALID_PARAMETER, and XACML_RESULT_SUCCESS.
xacml_result_t xacml_response_add_obligation | ( | xacml_response_t | response, | |
const xacml_obligation_t | obligation | |||
) |
Add an obligation to a response
response | Response to add the obligation to. | |
obligation | Value of the obligation, including any attributes associated with it. The caller may free this obligation after this function returns. |
XACML_RESULT_SUCCESS | Success. | |
XACML_RESULT_INVALID_PARAMETER | Invalid parameter. |
References XACML_RESULT_INVALID_PARAMETER, and XACML_RESULT_SUCCESS.
xacml_result_t xacml_response_get_obligation_count | ( | const xacml_response_t | response, | |
size_t * | count | |||
) |
Count the number of obligations in a response
Modifies the value pointed to by count to contain the number of obligations in response. Values from 0 to the value returned in count can be passed to xacml_response_get_obligation() to iterate through the set of obligations.
response | Response to inspect. | |
count | Pointer to be set to the number of subject attributes. |
XACML_RESULT_SUCCESS | Success. | |
XACML_RESULT_INVALID_PARAMETER | Invalid parameter. |
References XACML_RESULT_INVALID_PARAMETER, and XACML_RESULT_SUCCESS.