Authentication for yubikey OTP tokens.
More...
#include <freeradius-devel/radius/radius.h>
#include <freeradius-devel/unlang/xlat_func.h>
#include "rlm_yubikey.h"
Go to the source code of this file.
|
static unlang_action_t | mod_authenticate (rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request) |
|
static unlang_action_t | mod_authorize (rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request) |
|
static int | mod_bootstrap (module_inst_ctx_t const *mctx) |
|
static int | mod_instantiate (module_inst_ctx_t const *mctx) |
|
static int | mod_load (void) |
|
static void | mod_unload (void) |
|
static ssize_t | modhex2hex (char const *modhex, char *hex, size_t len) |
| Convert yubikey modhex to normal hex. More...
|
|
static xlat_action_t | modhex_to_hex_xlat (UNUSED TALLOC_CTX *ctx, fr_dcursor_t *out, UNUSED xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *in) |
| Xlat to convert Yubikey modhex to standard hex. More...
|
|
static int | otp_string_valid (rlm_yubikey_t const *inst, char const *otp, size_t len) |
|
Authentication for yubikey OTP tokens.
- Id
- 5806b080de1f9d079885f4c026342b0eb945fb8e
- Author
- Arran Cudbard-Bell (a.cud.nosp@m.bard.nosp@m.b@net.nosp@m.work.nosp@m.radiu.nosp@m.s.co.nosp@m.m)
- Copyright
- 2013 The FreeRADIUS server project
-
2013 Network RADIUS (legal.nosp@m.@net.nosp@m.workr.nosp@m.adiu.nosp@m.s.com)
Definition in file rlm_yubikey.c.
◆ is_modhex
◆ mod_authenticate()
◆ mod_authorize()
◆ mod_bootstrap()
◆ mod_instantiate()
◆ mod_load()
static int mod_load |
( |
void |
| ) |
|
|
static |
◆ mod_unload()
static void mod_unload |
( |
void |
| ) |
|
|
static |
◆ modhex2hex()
static ssize_t modhex2hex |
( |
char const * |
modhex, |
|
|
char * |
hex, |
|
|
size_t |
len |
|
) |
| |
|
static |
Convert yubikey modhex to normal hex.
The same buffer may be passed as modhex and hex to convert the modhex in place.
Modhex and hex must be the same size.
- Parameters
-
[in] | modhex | data. |
[in] | len | of input and output buffers. |
[out] | hex | where to write the standard hexits. |
- Returns
- The number of bytes written to the output buffer.
- -1 on failure.
Definition at line 103 of file rlm_yubikey.c.
◆ otp_string_valid()
◆ attr_auth_type
◆ attr_user_password
◆ attr_yubikey_counter
◆ attr_yubikey_key
◆ attr_yubikey_otp
◆ attr_yubikey_private_id
◆ attr_yubikey_public_id
◆ attr_yubikey_random
◆ attr_yubikey_timestamp
◆ dict_freeradius
◆ dict_radius
◆ hextab
char const hextab[] = "0123456789abcdef" |
|
static |
◆ modhex_to_hex_xlat_arg
Initial value:= {
}
@ FR_TYPE_STRING
String of printable characters.
#define XLAT_ARG_PARSER_TERMINATOR
Definition at line 130 of file rlm_yubikey.c.
◆ modhextab
char const modhextab[] = "cbdefghijklnrtuv" |
|
static |
◆ module_config
Initial value:= {
}
#define CONF_PARSER_TERMINATOR
#define FR_CONF_OFFSET(_name, _struct, _field)
conf_parser_t which parses a single CONF_PAIR, writing the result to a field in a struct
static int split(char **input, char **output, bool syntax_string)
Definition at line 40 of file rlm_yubikey.c.
◆ rlm_yubikey
Initial value:= {
.common = {
.name = "yubikey",
},
.method_group = {
}
}
}
#define MODULE_MAGIC_INIT
Stop people using different module/library/server versions together.
static const conf_parser_t config[]
static int instantiate(module_inst_ctx_t const *mctx)
static int mod_load(void)
static unlang_action_t mod_authenticate(rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request)
static int mod_bootstrap(module_inst_ctx_t const *mctx)
static void mod_unload(void)
static unlang_action_t mod_authorize(rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request)
static const conf_parser_t module_config[]
static int mod_instantiate(module_inst_ctx_t const *mctx)
#define SECTION_NAME(_name1, _name2)
Define a section name consisting of a verb and a noun.
#define MODULE_BINDING_TERMINATOR
Terminate a module binding list.
Named methods exported by a module.
Definition at line 455 of file rlm_yubikey.c.
◆ rlm_yubikey_dict
Initial value:= {
{ NULL }
}
static fr_dict_t const * dict_freeradius
static fr_dict_t const * dict_radius
Definition at line 55 of file rlm_yubikey.c.
◆ rlm_yubikey_dict_attr
Initial value:= {
{ NULL }
}
@ FR_TYPE_UINT32
32 Bit unsigned integer.
@ FR_TYPE_OCTETS
Raw octets.
fr_dict_attr_t const * attr_user_password
fr_dict_attr_t const * attr_yubikey_random
fr_dict_attr_t const * attr_yubikey_counter
fr_dict_attr_t const * attr_yubikey_public_id
fr_dict_attr_t const * attr_yubikey_key
fr_dict_attr_t const * attr_auth_type
fr_dict_attr_t const * attr_yubikey_timestamp
fr_dict_attr_t const * attr_yubikey_otp
fr_dict_attr_t const * attr_yubikey_private_id
Definition at line 72 of file rlm_yubikey.c.