00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef _PEP_H_
00026 #define _PEP_H_
00027
00028 #ifdef __cplusplus
00029 extern "C" {
00030 #endif
00031
00043 #include <stdarg.h>
00044 #include "argus/xacml.h"
00045 #include "argus/profiles.h"
00046 #include "argus/pip.h"
00047 #include "argus/oh.h"
00048 #include "argus/error.h"
00049
00050
00051
00079 #define PEP_LOGLEVEL_NONE -1
00080 #define PEP_LOGLEVEL_ERROR 0
00081 #define PEP_LOGLEVEL_WARN 1
00082 #define PEP_LOGLEVEL_INFO 2
00083 #define PEP_LOGLEVEL_DEBUG 3
00124 typedef int pep_log_handler_callback(int level, const char * format, va_list args);
00125
00138 typedef struct pep_handle PEP;
00139
00145 typedef enum pep_option {
00146 PEP_OPTION_LOG_LEVEL,
00147 PEP_OPTION_LOG_STDERR,
00148 PEP_OPTION_LOG_HANDLER,
00149 PEP_OPTION_ENDPOINT_URL,
00150 PEP_OPTION_ENDPOINT_SSL_VALIDATION,
00151 PEP_OPTION_ENDPOINT_SERVER_CERT,
00152 PEP_OPTION_ENDPOINT_SERVER_CAPATH,
00153 PEP_OPTION_ENDPOINT_CLIENT_CERT,
00154 PEP_OPTION_ENDPOINT_CLIENT_KEY,
00155 PEP_OPTION_ENDPOINT_CLIENT_KEYPASSWORD,
00156 PEP_OPTION_ENDPOINT_TIMEOUT,
00157 PEP_OPTION_ENABLE_PIPS,
00158 PEP_OPTION_ENABLE_OBLIGATIONHANDLERS,
00159 PEP_OPTION_ENDPOINT_SSL_CIPHER_LIST
00160 } pep_option_t;
00161
00166 const char * pep_version(void);
00167
00175 PEP * pep_initialize(void);
00176
00188 pep_error_t pep_addpip(PEP * pep, const pep_pip_t * pip);
00189
00201 pep_error_t pep_addobligationhandler(PEP * pep, const pep_obligationhandler_t * oh);
00202
00260 pep_error_t pep_setoption(PEP * pep, pep_option_t option, ... );
00261
00278 pep_error_t pep_authorize(PEP * pep, xacml_request_t ** request, xacml_response_t ** response);
00279
00287 void pep_destroy(PEP * pep);
00288
00295 #ifdef __cplusplus
00296 }
00297 #endif
00298
00299 #endif