The FreeRADIUS server
$Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
Integrate FreeRADIUS with the Couchbase document database. More...
#include <freeradius-devel/server/base.h>
#include <freeradius-devel/server/map.h>
#include <freeradius-devel/server/module_rlm.h>
#include <freeradius-devel/radius/defs.h>
#include <freeradius-devel/json/base.h>
#include "mod.h"
#include "couchbase.h"
Go to the source code of this file.
Macros | |
#define | LOG_PREFIX "couchbase - " |
Functions | |
static unlang_action_t | mod_accounting (rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request) |
Write accounting data to Couchbase documents. More... | |
static unlang_action_t | mod_authorize (rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request) |
Handle authorization requests using Couchbase document data. More... | |
static int | mod_detach (module_detach_ctx_t const *mctx) |
Detach the module. More... | |
static int | mod_instantiate (module_inst_ctx_t const *mctx) |
Initialize the rlm_couchbase module. More... | |
static int | mod_load (void) |
Variables | |
fr_dict_attr_t const * | attr_acct_session_time |
fr_dict_attr_t const * | attr_acct_status_type |
fr_dict_attr_t const * | attr_event_timestamp |
static const conf_parser_t | client_config [] |
Client Configuration. More... | |
static fr_dict_t const * | dict_radius |
static const conf_parser_t | module_config [] |
Module Configuration. More... | |
module_rlm_t | rlm_couchbase |
fr_dict_autoload_t | rlm_couchbase_dict [] |
fr_dict_attr_autoload_t | rlm_couchbase_dict_attr [] |
Integrate FreeRADIUS with the Couchbase document database.
Definition in file rlm_couchbase.c.
#define LOG_PREFIX "couchbase - " |
Definition at line 29 of file rlm_couchbase.c.
|
static |
Write accounting data to Couchbase documents.
Handle accounting requests and store the associated data into JSON documents in couchbase mapping attribute names to JSON element names per the module configuration.
When an existing document already exists for the same accounting section the new attributes will be merged with the currently existing data. When conflicts arrise the new attribute value will replace or be added to the existing value.
[out] | p_result | Result of calling the module. |
mctx | module calling context. | |
request | The accounting request object. |
Definition at line 233 of file rlm_couchbase.c.
|
static |
Handle authorization requests using Couchbase document data.
Attempt to fetch the document associated with the requested user by using the deterministic key defined in the configuration. When a valid document is found it will be parsed and the containing value pairs will be injected into the request.
[out] | p_result | Operation status (rlm_rcode_t). |
[in] | mctx | module calling context. |
[in] | request | The authorization request. |
Definition at line 99 of file rlm_couchbase.c.
|
static |
Detach the module.
Detach the module instance and free any allocated resources.
mctx | The module instance. |
Definition at line 424 of file rlm_couchbase.c.
|
static |
Initialize the rlm_couchbase module.
Initialize the module and create the initial Couchbase connection pool.
mctx | The module instance. |
Definition at line 444 of file rlm_couchbase.c.
|
static |
fr_dict_attr_t const* attr_acct_session_time |
Definition at line 77 of file rlm_couchbase.c.
fr_dict_attr_t const* attr_acct_status_type |
Definition at line 76 of file rlm_couchbase.c.
fr_dict_attr_t const* attr_event_timestamp |
Definition at line 78 of file rlm_couchbase.c.
|
static |
Client Configuration.
Definition at line 44 of file rlm_couchbase.c.
|
static |
Definition at line 68 of file rlm_couchbase.c.
|
static |
Module Configuration.
Definition at line 52 of file rlm_couchbase.c.
module_rlm_t rlm_couchbase |
Definition at line 548 of file rlm_couchbase.c.
fr_dict_autoload_t rlm_couchbase_dict |
Definition at line 71 of file rlm_couchbase.c.
fr_dict_attr_autoload_t rlm_couchbase_dict_attr |
Definition at line 81 of file rlm_couchbase.c.