View Issue Details

IDProjectCategoryView StatusLast Update
0022930mantisbtauthenticationpublic2017-06-20 17:11
Reportermxit Assigned Todregad  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionno change required 
Product Version2.4.1 
Summary0022930: LDAP auth with check vor AD Group membership only works for Mantis-native existing users
Description

Hello, we use Mantis since quite a long time. But until now we use baisc authentication mantis-native, now we plan to switch to LDAP (Windows AD) authentication. We managed to configure it so far, but we have a strange issue. We do have the following configuration:

$g_login_method = LDAP;
$g_ldap_server = 'ldap://some-server:389';
$g_ldap_root_dn = 'DC=domain,DC=com';
$g_ldap_organization = '(objectClass=user)(memberOf=CN=MantisUser,OU=Security Groups,DC=domain,DC=com)';
$g_ldap_uid_field = 'sAMAccountName';
$g_ldap_bind_dn = 'CN=ldapuser,OU=Users,DC=domain,DC=com';
$g_ldap_bind_passwd = 'xxxxx';
$g_use_ldap_email = ON;
$g_use_ldap_realname = ON;
$g_ldap_protocol_version = 3;
$g_ldap_follow_referrals = OFF;
$g_ldap_network_timeout = 300;

So, basically we filter on objectClass user and check for membership in a specific group. But this group membership only works with "old", previously already in mantis-only created users. With new users, which are automatically created in Mantis due to the fact that they login first time authenticating against AD, this filter does not work.
If I only use <$g_ldap_organization = '(objectClass=user)';> everything works fine, in Mantis yet non-existent users can login for the first time and their account is created accordingly in Mantis, based on their AD criteria, Full name, password, email etc... When I then switch to <$g_ldap_organization = '(objectClass=user)(memberOf=CN=MantisUser,OU=Security Groups,DC=domain,DC=com)';> these user cannot login anymore. But old, already created and used users from Mantis, still can login with this settings. Even using <$g_ldap_organization = '(memberOf=CN=MantisUser,OU=Security Groups,DC=domain,DC=com)';> only works for old existing users,but not for these autoamtically users created in Manits from AD. I checked for everything, so the group membership criteria realy is considered (for the users which can login)...)
Any idea why? Is this a bug?

TagsNo tags attached.

Activities

johgoe

johgoe

2017-05-27 08:55

reporter   ~0056971

Hello mxit,

I guess your user has not enougth permissions to ask for the Group Membership in Active Directory. The search request will find all objects which match to your filter, but if the g_ldap_bind_dn is not allowed to read all attributes it's automatically a 'no match'

Best regards
johgoe

dregad

dregad

2017-05-28 05:36

developer   ~0056977

When using LDAP, users are auto-created[1] if authentication is successful; try setting $g_log_level = LOG_LDAP; to understand what happens in ldap_authenticate_by_username()

atrol

atrol

2017-06-07 03:05

developer   ~0057036

mxit,

You did not provide any feedback; I am therefore resolving this issue as "no change required".

Feel free to reopen the issue at a later time and provide the requested information.