The types defined in <am_policy.h> are:
Carries the evaluation results from the Policy Service.
am_policy_result_t unifies various components of a policy evaluation including information regarding the user attempting to perform an action on the resource, advice messages as recommended during policy evaluation, if any, and attribute response maps providing specific key/values as set in policy definition or user entries.
#include "am_policy.h" typedef struct am_policy_result { const char *remote_user; const char *remote_user_passwd; const char *remote_IP; am_map_t advice_map; am_map_t attr_profile_map; am_map_t attr_session_map; am_map_t attr_response_map; const char *advice_string; } am_policy_result_t;
Pointer to the user attempting access.
Pointer to the password for the remote user.
Pointer to the IP address of the resource the user is attempting to access.
Takes a value based on the am_map_t defined in the <am_map.h> header file that represents any advice messages that might have resulted from the policy evaluation.
For information on advices, see Policy Advices in Sun Java System Access Manager 7.1 Administration Guide.
Takes a value based on the am_map_t (defined in the <am_map.h> header file) that represents one or more user profile attributes and a corresponding value. This member is enabled when the following two properties in AMAgent.properties are configured:
com.sun.am.policy.agents.config.profile.attribute.fetch.mode takes a value of HTTP_HEADER or HTTP_COOKIE.
com.sun.am.policy.agents.config.profile.attribute.map takes a list of LDAP attributes and their mapped values in the format attribute_name|value.
Takes a value based on the am_map_t (defined in the <am_map.h> header file) that represents one or more session attributes and a corresponding value. This member is enabled when the following two properties in AMAgent.properties are configured:
com.sun.am.policy.agents.config.session.attribute.fetch.mode takes a value of HTTP_HEADER or HTTP_COOKIE.
com.sun.am.policy.agents.config.session.attribute.map takes a list of session attributes and their mapped values in the format attribute_name|value.
Takes a value based on the am_map_t (defined in the <am_map.h> header file) that represents one or more response attributes and a corresponding value. This member is enabled when the following two properties in AMAgent.properties are configured:
com.sun.am.policy.agents.config.response.attribute.fetch.mode takes a value of HTTP_HEADER or HTTP_COOKIE.
com.sun.am.policy.agents.config.response.attribute.map takes a list of response names and their mapped values in the format attribute_name|value.
Pointer to a string that defines a value for further authentication if dictated by the policy condition.If no condition is specified, the advice string will have an empty value.
Memory for am_policy_result_t is allocated by am_policy_evaluate() and freed by am_policy_result_destroy().
Declares an unsigned integer as a type for a policy object.
#include "am_policy.h" typedef unsigned int am_policy_t;
am_policy_t has no members.
Contains the functions to return resource traits that will be used to compare with a user's defined policy and evaluate the access request.
#include "am_policy.h" typedef struct am_resource_traits { am_resource_match_t (*cmp_func_ptr)(const struct am_resource_traits *rsrc_traits, const char *policy_res_name, const char *resource_name, boolean_t use_patterns); boolean_t (*has_patterns)(const char *resource_name); boolean_t (*get_resource_root)(const char *resource_name, char *root_resource_name, size_t buflength); boolean_t ignore_case; char separator; void (*canonicalize)(const char *resource, char **c_resource); void (*str_free)(void *resource_str); } am_resource_traits_t;
Pointer to a function that compares policy_res_name and resource_name to return one of the following values of the am_resource_match_t enumeration (defined in the <am_policy.h> header file):
typedef enum am_resource_match { AM_SUB_RESOURCE_MATCH, AM_EXACT_MATCH, AM_SUPER_RESOURCE_MATCH, AM_NO_MATCH, AM_EXACT_PATTERN_MATCH } am_resource_match_t;
cmp_func_ptr can point to am_policy_compare_urls() to evaluate URL resources.
Pointer to the resource traits structure containing data regarding a policy.
Pointer to the name of the resource being protected.
Pointer to the name of the resource being requested.
Based on the boolean_t defined in the <am_types.h> header file, B_TRUE indicates that the function will use or recognize patterns when comparing resources.
Pointer to a function that determines whether a resource has patterns and returns one of the following values of the boolean_t enumeration defined in the <am_types.h> header file:
If resource_name has patterns.
Otherwise.
has_patterns can point to am_policy_resource_has_patterns() for URL resources.
Pointer to the name of the resource being requested.
Pointer to a function that extracts the root of the specified resource and returns one of the following values of the boolean_t enumeration defined in the <am_types.h> header file:
If the resource root was successfully inserted into the specified root_resource_name buffer.
Otherwise.
get_resource_root can point to am_policy_get_url_resource_root() for URL resources.
Pointer to the name of the resource being requested.
Buffer to hold the resource root.
Value based on the size_t defined in the standard <stddef.h> header file that reflects the length of the root_resource_name buffer.
Value that takes one of the following values of the boolean_t enumeration defined in the <am_types.h> header file:
Ignore case for all functions in this structure.
Otherwise.
Defines the resource separator. For URLs / should be used.
Pointer to a function that converts the specified resource name into a standard representation for comparative purposes.
Pointer to a resource name. This could be the resource being requested or the resource defined in the policy.
Output of the canonical resource name.
Memory for the canonical name must be allocated by the caller. A function to free the allocated memory must be set in str_free.
Pointer to a function to free a c_resource string after the results have been evaluated by am_policy_evaluate(). This field cannot be set to NULL.
free() should be used if canonicalize is set to the am_policy_resource_canonicalize() function.
Pointer to the string returned in the canonicalize function.