16 #include <freeradius-devel/server/base.h>
17 #include <freeradius-devel/server/module_rlm.h>
18 #include <freeradius-devel/ldap/base.h>
30 #ifdef LDAP_CONTROL_X_SESSION_TRACKING
31 bool session_tracking;
39 char const *obj_sort_by;
40 LDAPControl *obj_sort_ctrl;
44 char const *obj_access_attr;
48 char const *access_value_negate;
50 char const *access_value_suspend;
55 bool expect_password_is_set;
62 char const *userobj_membership_attr;
64 char const *obj_filter;
67 char const *obj_name_attr;
68 char const *obj_membership_filter;
81 char const *cache_attribute;
87 char const *attribute;
93 bool allow_dangling_refs;
226 char const *attrs[2];
253 if (!
vp)
return NULL;
255 RDEBUG2(
"Using user DN from request \"%pV\"", &
vp->data);
256 return vp->vp_strvalue;
287 char const *dn,
int scope,
char const *filter,
fr_ldap_map_exp_t const *expanded);
unlang_action_t
Returned by unlang_op_t calls, determine the next action of the interpreter.
A section grouping multiple CONF_PAIR.
fr_ldap_result_code_t
LDAP query result codes.
Connection configuration.
Result of expanding the RHS of a set of maps.
Thread LDAP trunk structure.
fr_pair_t * fr_pair_find_by_da(fr_pair_list_t const *list, fr_pair_t const *prev, fr_dict_attr_t const *da)
Find the first pair with a matching da.
rlm_rcode_t
Return codes indicating the result of the module call.
ldap_xlat_memberof_call_env_t * env_data
char const * profile_attr
Attribute that identifies profiles to apply.
fr_ldap_map_exp_t expanded
HIDDEN fr_dict_attr_t const * attr_password
ldap_autz_call_env_t * call_env
struct berval ** profile_values
unlang_action_t rlm_ldap_map_profile(fr_ldap_result_code_t *ret, rlm_ldap_t const *inst, request_t *request, fr_ldap_thread_trunk_t *ttrunk, char const *dn, int scope, char const *filter, fr_ldap_map_exp_t const *expanded)
Search for and apply an LDAP profile.
HIDDEN fr_dict_attr_t const * attr_crypt_password
ldap_access_state_t
User's access state.
@ LDAP_ACCESS_SUSPENDED
User account has been suspended.
@ LDAP_ACCESS_ALLOWED
User is allowed to login.
@ LDAP_ACCESS_DISALLOWED
User it not allow to login (disabled)
unlang_action_t rlm_ldap_cacheable_userobj(rlm_rcode_t *p_result, request_t *request, ldap_autz_ctx_t *autz_ctx, char const *attr)
Convert group membership information into attributes.
fr_ldap_thread_trunk_t * ttrunk
HIDDEN fr_dict_attr_t const * attr_user_name
fr_value_box_t profile_filter
Filter to use when searching for profiles.
fr_value_box_t user_filter
Filter to use when searching for users.
tmpl_t * group_filter
tmpl to expand as group membership filter.
trunk_conf_t bind_trunk_conf
Trunk configuration for trunk used for bind auths.
HIDDEN fr_dict_attr_t const * attr_nt_password
char const * profile_attr_suspend
Attribute that identifies profiles to apply when the user's account is suspended.
ldap_autz_status_t
State list for resumption of authorization.
@ LDAP_AUTZ_DEFAULT_PROFILE
@ LDAP_AUTZ_POST_DEFAULT_PROFILE
ldap_autz_status_t status
char const * valuepair_attr
Generic dynamic mapping attribute, contains a RADIUS attribute and value.
fr_value_box_t user_base
Base DN in which to search for users.
HIDDEN fr_dict_attr_t const * attr_ldap_userdn
fr_ldap_config_t handle_config
Connection configuration instance.
HIDDEN fr_dict_attr_t const * attr_user_password
ldap_group_xlat_status_t status
unlang_action_t rlm_ldap_check_userobj_dynamic(rlm_rcode_t *p_result, request_t *request, ldap_group_xlat_ctx_t *xlat_ctx)
Query the LDAP directory to check if a user object is a member of a group.
tmpl_t * group_filter
tmpl to expand as group membership filter.
unlang_action_t rlm_ldap_check_cached(rlm_rcode_t *p_result, rlm_ldap_t const *inst, request_t *request, fr_value_box_t const *check)
Check group membership attributes to see if a user is a member.
fr_value_box_t group_base
Base DN in which to search for groups.
ldap_access_state_t access_state
What state a user's account is in.
fr_value_box_t user_base
Base DN in which to search for users.
ldap_acct_section_t * accounting
Modify mappings for accounting.
HIDDEN fr_dict_attr_t const * attr_password_with_header
int profile_scope
Search scope.
fr_ldap_thread_trunk_t * ttrunk
unlang_action_t rlm_ldap_find_user_async(TALLOC_CTX *ctx, rlm_ldap_t const *inst, request_t *request, fr_value_box_t *base, fr_value_box_t *filter_box, fr_ldap_thread_trunk_t *ttrunk, char const *attrs[], fr_ldap_query_t **query_out)
Initiate asynchronous retrieval of the DN of a user object.
fr_value_box_t group_base
Base DN in which to search for groups.
map_list_t * user_map
Attribute map applied to users and profiles.
unlang_action_t rlm_ldap_cacheable_groupobj(rlm_rcode_t *p_result, request_t *request, ldap_autz_ctx_t *autz_ctx)
Convert group membership information into attributes.
trunk_conf_t trunk_conf
Trunk configuration.
module_instance_t const * mi
Module instance data for thread lookups.
void rlm_ldap_check_reply(request_t *request, rlm_ldap_t const *inst, char const *inst_name, bool expect_password, fr_ldap_thread_trunk_t const *ttrunk)
Verify we got a password from the search.
fr_value_box_t const * expect_password
True if the user_map included a mapping between an LDAP attribute and one of our password reference a...
ldap_acct_section_t * postauth
Modify mappings for post-auth.
static char const * rlm_find_user_dn_cached(request_t *request)
char const * reference
Configuration reference string.
CONF_SECTION * cs
Section configuration.
fr_value_box_t user_filter
Filter to use when searching for users.
unlang_action_t rlm_ldap_check_groupobj_dynamic(rlm_rcode_t *p_result, request_t *request, ldap_group_xlat_ctx_t *xlat_ctx)
Initiate an LDAP search to determine group membership, querying group objects.
fr_value_box_t default_profile
If this is set, we will search for a profile object with this name, and map any attributes it contain...
ldap_group_xlat_status_t
State list for xlat evaluation of LDAP group membership.
HIDDEN fr_dict_attr_t const * attr_cleartext_password
module_instance_t const * dlinst
ldap_access_state_t rlm_ldap_check_access(rlm_ldap_t const *inst, request_t *request, LDAPMessage *entry)
Check for presence of access attribute in result.
Call environment used in LDAP authorization.
Holds state of in progress async authorization.
Holds state of in progress group membership check xlat.
Call environment used in group membership xlat.
#define check(_handle, _len_p)
eap_aka_sim_process_conf_t * inst
Stores an attribute, a value and various bits of other data.
Common configuration parameters for a trunk.
static TALLOC_CTX * xlat_ctx