Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.4.5 and Active Directory #801

Open
red-erik opened this issue Oct 18, 2019 · 45 comments
Open

3.4.5 and Active Directory #801

red-erik opened this issue Oct 18, 2019 · 45 comments

Comments

@red-erik
Copy link

Hello,
I'v tried to integrate the work from @viharm to the last version but I'm not able to have it up and running (the configuration TAB for Ad does not appear).
Would you be so kind to write some lines to explain how to integrate it ?
Thank you in advance.

Regards,
Red.

@viharm
Copy link
Contributor

viharm commented Oct 18, 2019

@red-erik, have you tried the instructions at https://gitlab.com/viharm/PsmLDAPauth?

@viharm
Copy link
Contributor

viharm commented Oct 18, 2019

I believe that this (#507 ) has not been merged yet, so the configuration tab will not appear only be adding the module. The revisions in my fork to the configuration page are required for this to be visible.

@viharm
Copy link
Contributor

viharm commented Oct 18, 2019

Related to #206 .

@red-erik
Copy link
Author

red-erik commented Oct 18, 2019

Hello,
now I have the TAB and I tried to configure AD but when I try to ADD a user, I only have to specify name and password and other stuff and I'm not able to select it from AD.
Any suggestion ?
Thank you in advance.

Red.

@red-erik
Copy link
Author

Yes, I read https://gitlab.com/viharm/PsmLDAPauth but in my Ad anonymous binding is not allowed. Where I have to specify user and password to connect to AD ?

@viharm
Copy link
Contributor

viharm commented Oct 18, 2019

@red-erik , unfortunately, the underlying LDAP authentication library does not support supports only authenticated bind (only not anonymous). This was chosen based on the most commonly used method. This functionality can be added though, as PHP supports it. Happy to add it. Would you be willing to test it (I don't have access to an AD server)?

@red-erik
Copy link
Author

Sure..I'm in an enterprise environment with Forests with multiple child domains and foreign forests connected with trusts so I can do all possible test

@red-erik
Copy link
Author

btw..if I use the files from your branch in a 3.4.5 environment, the Configuration page is blank. I modified the original config.tpl.html adding your code to display a new TAB for AD

@viharm
Copy link
Contributor

viharm commented Oct 18, 2019

@red-erik

Sure..I'm in an enterprise environment with Forests with multiple child domains and foreign forests connected with trusts so I can do all possible test

Understood, thanks.

btw..if I use the files from your branch in a 3.4.5 environment, the Configuration page is blank. I modified the original config.tpl.html adding your code to display a new TAB for AD

My code is quite old; and since it wasn't merged, I suspect that the current conflicts are causing the issue. My fork may need to be rebased to the current dev branch, I'm not an expert on git.

@red-erik
Copy link
Author

Hello,
any news on you code "update" and merging into 3.4.5 ?

Regards,

Red.

@viharm
Copy link
Contributor

viharm commented Oct 22, 2019

Hello,
any news on you code "update" and merging into 3.4.5 ?

Regards,

Red.

@red-erik , thanks for following up. unfortunately, not yet. I am waiting for the PSM maintainers to provide a road map, as I would like to rebase and update only when I am sure it will be merged.

As for the authenticated bind, I haven't set aside time for it yet. I may need to travel over the next couple of months for my day job. But this has been added to the list of open issues at https://gitlab.com/viharm/PsmLDAPauth/issues/5.

I will endeavour to plan it over the next few days - a lot is happening :-P

@viharm
Copy link
Contributor

viharm commented Oct 22, 2019

@red-erik , Just had a quick look. Currently the auth library binds to the directory service using the username and password supplied to authenticate with. Does your AD policy allow this?

@red-erik
Copy link
Author

@viharm Hello, the only constrain we have is that anonymous binding is not allowed but every AD user is allowed to bind to AD. Anyway, I don't understand how to add users from AD

@viharm
Copy link
Contributor

viharm commented Oct 23, 2019

@viharm Hello, the only constrain we have is that anonymous binding is not allowed but every AD user is allowed to bind to AD. Anyway, I don't understand how to add users from AD

@red-erik , if users are allowed to bind, then this should work for you as is. The authentication results depends on a successful bind. You don't specifically add users from AD. The module follows the logic shown here. So this means, everytime a user logs in they are added to the PSM database.

If you specfically want to add users before hand then simply create new users in PSM with the exact same user name as in the directory. The password will be ignored.

Hope this helps.

@red-erik
Copy link
Author

Hello,
tried this way and now I'm not able to logon any more, nor with local admin user nor with AD user, I receive, after logon, a blank page with no error.
Red.

@viharm
Copy link
Contributor

viharm commented Oct 24, 2019

Hello,
tried this way and now I'm not able to logon any more, nor with local admin user nor with AD user, I receive, after logon, a blank page with no error.
Red.

@red-erik , are you able to get some PHP logs? If not, then please could you switch debugging on as shown at https://gitlab.com/viharm/PsmLDAPauth#support? This will provide a debug output. Please ensure that you review the debug output before you send it to ensure no sensitive information is shared.

@red-erik
Copy link
Author

red-erik commented Oct 25, 2019

Hello,
I made a mistake and I corrected it but now I receive
Fatal error: User domain not specified in C:\Reports\ServMon.3.4.5\vendor\PsmLDAPauth\phpLDAPauth\phpldapauth.php on line 266
with both local user or LDAP user.

what should I use for:
Username attribute
XXXXXX
Attribute used by the directory service to refer to the username of the user.

Regards,

Red.

@viharm
Copy link
Contributor

viharm commented Oct 25, 2019

Fatal error: User domain not specified in C:\Reports\ServMon.3.4.5\vendor\PsmLDAPauth\phpLDAPauth\phpldapauth.php on line 266

This implies that the AD domain name is not being handed off from PsmLDAPauth to phpLDAPauth to interrogate the directory server. This could be because of one of the following reasons:

  1. The domain has not been provided in the configuration screen. e.g., YOURCOMPANYNAME or YOURWORKGROUP or YOURDOMAIN (please replace with your AD domain); or
  2. There is a bug in the data hand-off between the PsmLDAPauth adapter library and the phpLDAPauth helper library.

A debug log will certainly help me in understanding what's going on.

what should I use for:
Username attribute
XXXXXX
Attribute used by the directory service to refer to the username of the user.

This is the username field used to interrogate the account being checked for authentication. The username entered by the user trying to login is checked in the directory against this field.

For Active Directory servers this is classically either userPrincipalName or sAMAccountName. However please refer to your directory's documentation.

@red-erik
Copy link
Author

red-erik commented Nov 4, 2019

Hello,
this is the debug interesting part...

Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Request
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
array (4) [
'ky_UserKeyword' => string (34) "AAAAAAA\Red.Erik"
'ky_UserPassword' => string (8) "********"
'ky_UserDomain' => null
'ky_GroupKeyword' => null
]
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Default result
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
array (3) [
'ky_User_Authenticated' => boolean false
'ky_Group_Exists' => boolean false
'ky_Group_ContainsUser' => boolean false
]
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Cleaned requested group keyword
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
string (0) ""
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
User search base set
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
string (21) "dc=AAAAAAAA,dc=BB"
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Username to be formulated based on directory type. Checking if user domain is needed
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
string (5) "ad-ds"
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
LDAP type specified is either AD DS or AD LDS. Checking if user domain is specified
User domain not specified, triggering user error.

Fatal error: User domain not specified in C:\Reports\ServMon.3.4.5\vendor\PsmLDAPauth\phpLDAPauth\phpldapauth.php on line 266

@viharm
Copy link
Contributor

viharm commented Nov 13, 2019

It appears that the user is being specified as DOMAIN\username.
I suggest you specify the DOMAIN and username in their separate fields. The library should concatenate them in the backend before submitting.

@red-erik
Copy link
Author

Hello,
how to accomplish this ? On the logon page I have only a filed for "username"

Red.

@viharm
Copy link
Contributor

viharm commented Nov 17, 2019

Hello,
how to accomplish this ? On the logon page I have only a filed for "username"

Red.

Just checked this. Well-spotted, I haven't coded this yet. The underlying library is compatible, so it only needs to be added in the controller script. Will try to add this as soon as possible. Please could you confirm if your AD server is AD DS or AD LDS? Thanks for your patience.

@red-erik
Copy link
Author

Hello,
my infrastructure is AD DS like the image atatched (One AD Tree with 1 Root domain and four child domains).
Red.
LAPS_WEB

@viharm
Copy link
Contributor

viharm commented Nov 22, 2019

@red-erik , does this mean your users may belong any one of the four domains? Will they need to specify the domain they will logon to?

At this moment, PsmLDAPauth allows AD login to only one domain, by entering the domain in the authentication configuration as shown below.
image

Then the users will need to login with only their usernames (without the domain prefix).

However in your case, a change in the login logic will be required. I will post a patch soon.

In the meantime, please could you try setting one of the domains in your authentication configuration and logging in with one of the users in that domain? This will help verify if the login logic works with your domain.

@viharm
Copy link
Contributor

viharm commented Nov 22, 2019

@red-erik , please add the following code at line 85 of the file psmldapauth.php.

    if ( stripos ( $ar_Request['ky_UserKeyword'] , '\\' ) !== FALSE ) {
      $ar_DomainAndUser = explode ( '\\' , $ar_Request['ky_UserKeyword'] ) ;
      $ar_Request['ky_UserDomain'] = $ar_DomainAndUser[0] ;
      $ar_Request['ky_UserKeyword'] = $ar_DomainAndUser[1] ;
    }
    unset($ar_DomainAndUser) ;

This will override any domain configured in the authentication settings with the one specified in the username field separated from the username with a backslash \ (like DOMAIN\username).

@red-erik
Copy link
Author

red-erik commented Nov 25, 2019

Hello,
using a "forced" domain in configuration does not work. After your patch, if I try to logon with an AD user I don't receive errors but the logon page reappears without any other information and if I logon with local administrator account I receive this error
Fatal error: User domain not specified in C:\Reports\ServMon.3.4.5\vendor\PsmLDAPauth\phpLDAPauth\phpldapauth.php on line 266
The only solution is to manually edit the Database table to disable AD auth.

Notice: Trying to get property 'user_id' of non-object in C:\Reports\ServMon.3.4.5\src\psm\Service\User.php on line 248

Notice: Trying to get property 'password' of non-object in C:\Reports\ServMon.3.4.5\src\psm\Service\User.php on line 261

Notice: Trying to get property 'user_id' of non-object in C:\Reports\ServMon.3.4.5\src\psm\Service\User.php on line 262

Warning: Cannot modify header information - headers already sent by (output started at C:\Reports\ServMon.3.4.5\vendor\PsmLDAPauth\phpLDAPauth\Lib\phpKhelper\kint.php(266) : eval()'d code:1) in C:\Reports\ServMon.3.4.5\src\psm\Module\User\Controller\LoginController.php on line 58

Fatal error: Redirect failed. in C:\Reports\ServMon.3.4.5\src\psm\Module\User\Controller\LoginController.php on line 59

Regards,

Red.

@viharm
Copy link
Contributor

viharm commented Nov 25, 2019

@red-erik , I am surprised that forcing a domain from the configuration does not work. Please could you send the log from PsmLDAPauth as before for both scenarios (forced domain & patched logic).

@red-erik
Copy link
Author

Hello,
I can't force the domain 'cause I don't have the required field (see image)
php_serv_mon_auth

and using the patched logic I have

Supplied username
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
string (34) "userdomainxx\rederik"
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Supplied password
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
string (8) "********"
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Supplied directory configuration
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
array (12) [
'authdir_type' => string (5) "ad-ds"
'dirauth_status' => string (1) "1"
'authdir_ldapfollowref' => string (1) "1"
'authdir_host_locn' => string (26) "domaincontroller1.domain.local"
'authdir_host_port' => string (3) "389"
'authdir_ldapver' => string (1) "3"
'authdir_basedn' => string (27) "dc=xx,dc=yyyyy,dc=zz"
'authdir_usernameattrib' => string (14) "sAMAccountName"
'authdir_groupnameattrib' => string (0) ""
'authdir_groupmemattrib' => string (0) ""
'authdir_usercontainerrdn' => string (0) ""
'authdir_groupcontainerrdn' => string (0) ""
]
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Supplied db connection
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
PDO (0) ()
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]

Notice: Undefined index: authdir_userdomain in C:\Reports\ServMon.3.4.5\vendor\PsmLDAPauth\psmldapauth.php on line 82

Notice: Undefined index: authdir_groupname in C:\Reports\ServMon.3.4.5\vendor\PsmLDAPauth\psmldapauth.php on line 83
Formulated directory host
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
array (2) [
'ky_Locn' => string (26) "domaincontroller1.domain.local"
'ky_Port' => string (3) "389"
]
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Formulated directory configuration
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
array (10) [
'ky_LdapType' => string (5) "ad-ds"
'ky_LdapVer' => string (1) "3"
'ky_LdapFollowReferral' => boolean true
'ky_BaseDn' => string (27) "dc=xx,dc=yyyyy,dc=zz"
'ky_UsernameAttrib' => string (14) "sAMAccountName"
'ky_GroupnameAttrib' => null
'ky_GroupMemberAttrib' => null
'ky_UserContainerRdn' => null
'ky_GroupContainerRdn' => null
'ar_GroupSearchFilter' => array (2) [
0 => string (22) "objectClass=posixGroup"
1 => string (29) "objectClass=sambaGroupMapping"
]
]
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Return variable formulated
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
boolean false
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Class arguments- host
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
array (2) [
'ky_Locn' => string (26) "domaincontroller1.domain.local"
'ky_Port' => string (3) "389"
]
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Class arguments- conf
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
array (10) [
'ky_LdapType' => string (5) "ad-ds"
'ky_LdapVer' => string (1) "3"
'ky_LdapFollowReferral' => boolean true
'ky_BaseDn' => string (27) "dc=xx,dc=yyyyy,dc=zz"
'ky_UsernameAttrib' => string (14) "sAMAccountName"
'ky_GroupnameAttrib' => null
'ky_GroupMemberAttrib' => null
'ky_UserContainerRdn' => null
'ky_GroupContainerRdn' => null
'ar_GroupSearchFilter' => array (2) [
0 => string (22) "objectClass=posixGroup"
1 => string (29) "objectClass=sambaGroupMapping"
]
]
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Arguments into private variables
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
array (2) [
'ky_Host' => array (2) [
'ky_Locn' => string (26) "domaincontroller1.domain.local"
'ky_Port' => string (3) "389"
]
'ky_Conf' => array (10) [
'ky_LdapType' => string (5) "ad-ds"
'ky_LdapVer' => string (1) "3"
'ky_LdapFollowReferral' => boolean true
'ky_BaseDn' => string (27) "dc=xx,dc=yyyyy,dc=zz"
'ky_UsernameAttrib' => string (14) "sAMAccountName"
'ky_GroupnameAttrib' => null
'ky_GroupMemberAttrib' => null
'ky_UserContainerRdn' => null
'ky_GroupContainerRdn' => null
'ar_GroupSearchFilter' => array (2) [
0 => string (22) "objectClass=posixGroup"
1 => string (29) "objectClass=sambaGroupMapping"
]
]
]
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Group search filter formulated
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
string (58) "(|(objectClass=posixGroup)(objectClass=sambaGroupMapping))"
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Group attributes required in user search
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
array (2) [
0 => string (2) "cn"
1 => string (9) "memberuid"
]
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
cl_Dir object created
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
cl_Dir (1) (
private 'ar_Dir' -> array (2) [
'ky_Host' => array (2) [
'ky_Locn' => string (26) "domaincontroller1.domain.local"
'ky_Port' => string (3) "389"
]
'ky_Conf' => array (12) [
'ky_LdapType' => string (5) "ad-ds"
'ky_LdapVer' => string (1) "3"
'ky_LdapFollowReferral' => boolean true
'ky_BaseDn' => string (27) "dc=xx,dc=yyyyy,dc=zz"
'ky_UsernameAttrib' => string (14) "sAMAccountName"
'ky_GroupnameAttrib' => string (2) "cn"
'ky_GroupMemberAttrib' => string (9) "memberuid"
'ky_UserContainerRdn' => null
'ky_GroupContainerRdn' => null
'ar_GroupSearchFilter' => array (2) [
0 => string (22) "objectClass=posixGroup"
1 => string (29) "objectClass=sambaGroupMapping"
]
'ky_GroupSearchFilter' => string (58) "(|(objectClass=posixGroup)(objectClass=sambaGroupMapping))"
'ky_GroupSearchRequiredAttrib' => array (2) [
0 => string (2) "cn"
1 => string (9) "memberuid"
]
]
]
)
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Directory
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
array (2) [
'ky_Host' => array (2) [
'ky_Locn' => string (26) "domaincontroller1.domain.local"
'ky_Port' => string (3) "389"
]
'ky_Conf' => array (12) [
'ky_LdapType' => string (5) "ad-ds"
'ky_LdapVer' => string (1) "3"
'ky_LdapFollowReferral' => boolean true
'ky_BaseDn' => string (27) "dc=xx,dc=yyyyy,dc=zz"
'ky_UsernameAttrib' => string (14) "sAMAccountName"
'ky_GroupnameAttrib' => string (2) "cn"
'ky_GroupMemberAttrib' => string (9) "memberuid"
'ky_UserContainerRdn' => null
'ky_GroupContainerRdn' => null
'ar_GroupSearchFilter' => array (2) [
0 => string (22) "objectClass=posixGroup"
1 => string (29) "objectClass=sambaGroupMapping"
]
'ky_GroupSearchFilter' => string (58) "(|(objectClass=posixGroup)(objectClass=sambaGroupMapping))"
'ky_GroupSearchRequiredAttrib' => array (2) [
0 => string (2) "cn"
1 => string (9) "memberuid"
]
]
]
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Request
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
array (4) [
'ky_UserKeyword' => string (19) "rederik"
'ky_UserPassword' => string (8) ""
'ky_UserDomain' => string (14) "userdomainxx"
'ky_GroupKeyword' => null
]
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Default result
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
array (3) [
'ky_User_Authenticated' => boolean false
'ky_Group_Exists' => boolean false
'ky_Group_ContainsUser' => boolean false
]
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Cleaned requested group keyword
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
string (0) ""
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
User search base set
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
string (27) "dc=xx,dc=yyyyy,dc=zz"
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Username to be formulated based on directory type. Checking if user domain is needed
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
string (5) "ad-ds"
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
LDAP type specified is either AD DS or AD LDS. Checking if user domain is specified
User domain is specified
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
string (14) "userdomainxx"
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Configuring username for Active Directory Domain Services (AD DS)
User DN formulated
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
string (34) "userdomainxx\rederik"
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Group search base set
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
string (27) "dc=xx,dc=yyyyy,dc=zz"
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Group DN formulated
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
string (31) "cn=,dc=xx,dc=yyyyy,dc=zz"
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Group search filter formulated
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
string (66) "(&(|(objectClass=posixGroup)(objectClass=sambaGroupMapping))(cn=))"
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Checking if LDAP functionality exists
LDAP functionality exists. Connecting to directory.
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
array (2) [
'ky_Locn' => string (26) "domaincontroller1.domain.local"
'ky_Port' => string (3) "389"
]
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Checking if LDAP connection was succesful
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
ldap link resource
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
LDAP connection successful
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
ldap link resource
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Setting LDAP protocol version
LDAP protocol version successfully set
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
string (1) "3"
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Configuring LDAP referrals
LDAP referral option successfully set
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
boolean true
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Checking username in request
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
array (4) [
'ky_UserKeyword' => string (19) "rederik"
'ky_UserPassword' => string (8) "
"
'ky_UserDomain' => string (14) "userdomainxx"
'ky_GroupKeyword' => string (0) ""
]
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Username found in request, proceeding to bind with directory.
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
string (19) "rederik"
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Checking if binding was successful
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
boolean true
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Binding successful
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
string (19) "rederik"
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
No group name provided, not checking group membership
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
string (0) ""
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Closing LDAP connection
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
ldap link resource
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Successfully closed LDAP connection
Returning output
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
array (3) [
'ky_User_Authenticated' => boolean true
'ky_Group_Exists' => boolean false
'ky_Group_ContainsUser' => boolean false
]
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
cl_Dir object destroyed
password destroyed

Notice: Undefined index: authdir_defaultrole in C:\Reports\ServMon.3.4.5\vendor\PsmLDAPauth\psmldapauth.php on line 145
Request
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
array (4) [
'ky_UserKeyword' => string (19) "rederik"
'ky_UserPassword' => string (8) ""
'ky_UserDomain' => string (14) "userdomainxx"
'ky_GroupKeyword' => null
]
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Supplied table parameters
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
array (4) [
'key__Table_Name' => string (9) "psm_users"
'key__Table_ColumnUsername' => string (9) "user_name"
'key__Table_ColumnRole' => string (5) "level"
'key__Table_DefaultRoleValue' => null
]
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
DB extension library requested
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
string (9) "pdo-mysql"
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Supplied database connection configuration
Supplied database connection resource
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
PDO (0) ()
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Transferred to holding variable for compatibility
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
array (3) [
'key__Common_SearchUserKeyword' => string (19) "rederik"
'key__Common_SearchUserPassword' => string (8) "
"
'key__Common_SearchGroupKeyword' => null
]
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Holding array for existing DB connection object created
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
array (3) [
'key__Common_SearchUserKeyword' => string (19) "rederik"
'key__Common_SearchUserPassword' => string (8) "********"
'key__Common_SearchGroupKeyword' => null
]
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Checking for supplied DB connection object/resource
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
PDO (0) ()
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Non-null database connection found, mapped to internal variable
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
PDO (0) ()
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Preset default responses
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
array (3) [
'key__Database_Connection' => boolean false
'key__Database_UserFound' => boolean false
'key__Database_UserAdded' => boolean false
]
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Checking for supplied database configuration
Checking if MySQL functionality exists
MySQL functionality checked, proceeding to connect
Checking if existing connection object is supplied
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
PDO (0) ()
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Connection object is supplied
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
PDO (0) ()
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Checking if a workable database connection exists
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
PDO (0) ()
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Formulating SQL query to search for user
Escaping username depending on selected extensions
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
string (19) "rederik"
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Selecting appropriate library extensions
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
string (9) "pdo-mysql"
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
pdo requested, escaping skipped
Escaped username; Proceeding to formulate search query
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
string (19) "rederik"
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Running the search query; Selecting appropriate library extensions
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
string (75) "SELECT user_name FROM psm_users WHERE user_name='rederik'"
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
pdo requested, running query
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
string (9) "pdo-mysql"
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Query submitted, checking results
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
PDOStatement (1) (
public 'queryString' -> string (75) "SELECT user_name FROM psm_users WHERE user_name='rederik'"
)
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Query successful; Proceeding to count results; Selecting extension library
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
string (9) "pdo-mysql"
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
pdo requested, checking number of rows returned
Overall status of query
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
array (3) [
'key__QuerySearch_Text' => string (75) "SELECT user_name FROM psm_users WHERE user_name='rederik'"
'key__QuerySearch_Result' => PDOStatement (1) (
public 'queryString' -> string (75) "SELECT user_name FROM psm_users WHERE user_name='rederik'"
)
'key__QuerySearch_ReturnedRowCount' => integer 1
]
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Results counted
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
integer 1
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Organise results; evaluate results count
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
integer 1
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
One result found; checking further
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
string (19) "rederik"
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Selecting appropriate library extensions
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
string (9) "pdo-mysql"
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
pdo requested, Skipping seek operation
Fetching data; but selecting appropriate library extensions
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
string (9) "pdo-mysql"
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
pdo requested, proceeding to fetch data
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
PDOStatement (1) (
public 'queryString' -> string (75) "SELECT user_name FROM psm_users WHERE user_name='rederik'"
)
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Search data fetched
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
array (1) [
'user_name' => string (19) "rederik"
]
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Comparing result
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
array (2) [
0 => string (19) "rederik"
1 => string (19) "rederik"
]
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Match found, response set
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
boolean true
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Overall status of connection
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
array (2) [
'key__DatabaseConnection_Object' => PDO (0) ()
'key__DatabaseConnection_QuerySearchUser' => array (4) [
'key__QuerySearch_Text' => string (75) "SELECT user_name FROM psm_users WHERE user_name='rederik'"
'key__QuerySearch_Result' => PDOStatement (1) (
public 'queryString' -> string (75) "SELECT user_name FROM psm_users WHERE user_name='rederik'"
)
'key__QuerySearch_ReturnedRowCount' => integer 1
'key__QuerySearch_Output' => array (1) [
'user_name' => string (19) "rederik"
]
]
]
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Freeing memory for the result of the search query
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
PDOStatement (1) (
public 'queryString' -> string (75) "SELECT user_name FROM psm_users WHERE user_name='rederik'"
)
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Selecting appropriate library extensions
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
string (9) "pdo-mysql"
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Memory for the result of the search query freed
Finished; Checking if database connection was initially supplied
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
PDO (0) ()
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Database connection inherited, no closing required
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
array (2) [
'key__DatabaseConnection_Object' => PDO (0) ()
'key__DatabaseConnection_QuerySearchUser' => array (4) [
'key__QuerySearch_Text' => string (75) "SELECT user_name FROM psm_users WHERE user_name='rederik'"
'key__QuerySearch_Result' => null
'key__QuerySearch_ReturnedRowCount' => integer 1
'key__QuerySearch_Output' => array (1) [
'user_name' => string (19) "rederik"
]
]
]
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Returning response
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
array (3) [
'key__Database_Connection' => boolean false
'key__Database_UserFound' => boolean true
'key__Database_UserAdded' => boolean false
]
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Placeholder for DB object destroyed
User authenticated by directory; and either found in users_table or added to it; Setting return response
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
array (3) [
'key__Database_Connection' => boolean false
'key__Database_UserFound' => boolean true
'key__Database_UserAdded' => boolean false
]
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]
Authenticated
┌──────────────────────────────────────────────────────────────────────────────┐
│ $ag_DebugOutput │
└──────────────────────────────────────────────────────────────────────────────┘
boolean false
════════════════════════════════════════════════════════════════════════════════
Called from /ServMon.3.4.5/vendor/PsmLDAPauth/phpLDAPauth/Lib/phpKhelper/phpKhelper.lib.inc.php:143 [fn_Debug()]

Notice: Trying to get property 'user_id' of non-object in C:\Reports\ServMon.3.4.5\src\psm\Service\User.php on line 248

Notice: Trying to get property 'password' of non-object in C:\Reports\ServMon.3.4.5\src\psm\Service\User.php on line 261

Notice: Trying to get property 'user_id' of non-object in C:\Reports\ServMon.3.4.5\src\psm\Service\User.php on line 262

Warning: Cannot modify header information - headers already sent by (output started at C:\Reports\ServMon.3.4.5\vendor\PsmLDAPauth\phpLDAPauth\Lib\phpKhelper\kint.php(266) : eval()'d code:1) in C:\Reports\ServMon.3.4.5\src\psm\Module\User\Controller\LoginController.php on line 58

Fatal error: Redirect failed. in C:\Reports\ServMon.3.4.5\src\psm\Module\User\Controller\LoginController.php

@viharm
Copy link
Contributor

viharm commented Nov 26, 2019

@red-erik , the missing field for the AD domain is an unexpected error. I may have to rebase my code to the current PSM repository.

You can manually force your domain in line 82 of psmldapauth.php as follows.

Change...

'ky_UserDomain'   => $ar_DirConfigRaw['authdir_userdomain'] ,

to...

'ky_UserDomain'   => 'YOURDOMAIN' ,

Please could you try this and post the log?

As for the patched logic, the logs suggest that authentication works. This is great news. Just need to iron out the implementation of this logic.

I have logged an issue for this (https://gitlab.com/viharm/PsmLDAPauth/issues/7)

I will rebase my code and integrate the patch properly. Thank you for your help in testing this so far. Will need a final few tests once I'm done.

@red-erik
Copy link
Author

Hello,
if I force the domain I receive a blank page with no error. I can confirm that the user is correctly created in the database and the auth seems to work but nothing is displayed after successful logon.
It will be a pleasure to help you in testing your solutions.
Red.

@viharm
Copy link
Contributor

viharm commented Dec 11, 2019

@red-erik , thanks for offering to help further. Sorry about the delay. It has been a busy few weeks. I am hoping that I can spend some time on this over the New Year break.

@viharm
Copy link
Contributor

viharm commented Dec 30, 2019

@red-erik , I believe I have a plan for this, but need help on #507 from the project team @TimZ99 , @sadortun , & @dopeh

@red-erik
Copy link
Author

Hello,
any news on that ?

Regards,
Red.

@viharm
Copy link
Contributor

viharm commented Feb 23, 2024

Hi @red-erik , thanks for following up on this. Although the module was successfully merged into the “develop” branch in 2019, there was another bug, which was patched in this PR in Aug last year.

I’m hoping that if you try with the “develop” branch, the config page should work ok. You should also be able to login with only one domain. It will be good to know if this works for you (with only one allowed domain, configured in the settings page).

I have done some initial tests to allow multiple domains in the meantime, but there is a critical decision required - whether to specify a list of allowed domains in the settings page or to allow any domain to be specified while logging in. Since I don’t have AD infrastructure, do you know if the directory carries out robust checks for allowed domains (I hope so, but can’t assume due to risks involved). If the checks are robust, then we can completely remove the restriction of allowed domains, and let the user specify the domain in the login screen (e.g., DOMAIN\username)

@red-erik
Copy link
Author

Hello,
according to me Active Directory has aleady in place all security settings so it should not be a problem letting user specify DOMAIN\username. ON the other side, having a list of allowed domain is fine the same, because usually (best practice) all users are defined in the upper level domain (root domain) or in a Trusted Forest (another single domain).
Other than that, into IIS (publishing the application) we have the same capability to filter defining "allowed users".

Regards,
Red.

@red-erik
Copy link
Author

Just to be sure, downloaded now 3.5.2 (latest) from Develop but I don't see anything into Vendor dir related to PsmLDAPauth.
Where I can download the latest version with ADAuth working and integraed ?

Thanks,

Regards,
Red.

@viharm
Copy link
Contributor

viharm commented Feb 23, 2024

t I don't see anything into Vendor dir related to PsmLDAPauth. Where I can download the latest version with ADAuth working and integraed ?

Does composer not automatically pull the libraries?

@red-erik
Copy link
Author

red-erik commented Feb 23, 2024

I forgot the procedure, I was thinking to have everything already packaged. I'll test it ASAP.
Would you be so kind to remind me how to get it and if PHPServMON 3.5.2 already has all references to you module into
/PATH/TO/PHPSERVERMON/src/templates/default/module/config/config.tpl.html
/PATH/TO/PHPSERVERMON/src/psm/Module/Config/Controller/ConfigController.php
/PATH/TO/PHPSERVERMON/src/lang/en_US.lang.php
/PATH/TO/PHPSERVERMON/src/psm/Service/User.php
Associated language files in /PATH/TO/PHPSERVERMON/src/lang/

I don't see any reference to your module and don't know how to "enable" it.

Regards,
Red.

@red-erik
Copy link
Author

red-erik commented Feb 23, 2024

  • Installing viharm/php-ldap-auth (v2.5.2): Downloading (failed)
    Downloading (failed)
    Downloading (failed) Failed to download viharm/php-ldap-auth from dist: The "https://bitbucket.org/viharm/phpldapauth/get/260c158ebbd0ae5069dc30e2a840c8541ed2ad24.zip" file could not be downloaded: SSL: An existing connection was forcibly closed by the remote host
    Send of 206 bytes failed with errno=10054 An existing connection was forcibly closed by the remote host
    Failed to open stream: HTTP request failed!
    Now trying to download from source
  • Installing viharm/php-ldap-auth (v2.5.2): Cloning 260c158ebb
    Enter your Bitbucket credentials to access private repos
    Follow the instructions on https://confluence.atlassian.com/bitbucket/oauth-on-bitbucket-cloud-238027431.html
    to create a consumer. It will be stored in "C:/Users/xxx.xxxx/AppData/Roaming/Composer/auth.json" for future use by Composer.
    Ensure you enter a "Callback URL" (http://example.com is fine) or it will not be possible to create an Access Token (this callback url will not be used by composer)
    Consumer Key (hidden):

@viharm

@red-erik
Copy link
Author

Hello @viharm Do you have updates on that ?

Regards,
Red.

@viharm
Copy link
Contributor

viharm commented Apr 19, 2024

  • Installing viharm/php-ldap-auth (v2.5.2): Downloading (failed)
    Downloading (failed)
    Downloading (failed) Failed to download viharm/php-ldap-auth from dist: The "https://bitbucket.org/viharm/phpldapauth/get/260c158ebbd0ae5069dc30e2a840c8541ed2ad24.zip" file could not be downloaded: SSL: An existing connection was forcibly closed by the remote host
    Send of 206 bytes failed with errno=10054 An existing connection was forcibly closed by the remote host
    Failed to open stream: HTTP request failed!
    Now trying to download from source
  • Installing viharm/php-ldap-auth (v2.5.2): Cloning 260c158ebb
    Enter your Bitbucket credentials to access private repos
    Follow the instructions on https://confluence.atlassian.com/bitbucket/oauth-on-bitbucket-cloud-238027431.html
    to create a consumer. It will be stored in "C:/Users/xxx.xxxx/AppData/Roaming/Composer/auth.json" for future use by Composer.
    Ensure you enter a "Callback URL" (http://example.com is fine) or it will not be possible to create an Access Token (this callback url will not be used by composer)
    Consumer Key (hidden):

@viharm

Hi, sorry for the late reply. I tried to download the zip file linked in your log. I could not replicate the issue. Could you try from a different client?

@viharm
Copy link
Contributor

viharm commented Apr 19, 2024

Bitbucket does not require an account to download the zip file.

@red-erik
Copy link
Author

Hello,
I don't think the problem is on Bitbucket but on the command "php composer.phar install" using outdated SSL library or Ciper.
On every of our systems SSL3 and TLS 1.0 are disabled.

Regards,
Red.

@viharm
Copy link
Contributor

viharm commented May 13, 2024

I forgot the procedure, I was thinking to have everything already packaged. I'll test it ASAP. Would you be so kind to remind me how to get it and if PHPServMON 3.5.2 already has all references to you module into /PATH/TO/PHPSERVERMON/src/templates/default/module/config/config.tpl.html /PATH/TO/PHPSERVERMON/src/psm/Module/Config/Controller/ConfigController.php /PATH/TO/PHPSERVERMON/src/lang/en_US.lang.php /PATH/TO/PHPSERVERMON/src/psm/Service/User.php Associated language files in /PATH/TO/PHPSERVERMON/src/lang/

I don't see any reference to your module and don't know how to "enable" it.

Regards, Red.

Version 3.5.2 was released on Aug-2020, so it will not have LDAP functionality. Please use the develop branch

@viharm
Copy link
Contributor

viharm commented May 13, 2024

Hello, I don't think the problem is on Bitbucket but on the command "php composer.phar install" using outdated SSL library or Ciper. On every of our systems SSL3 and TLS 1.0 are disabled.

Regards, Red.

hmm. Again, I still can't replicate this problem. Are you able to try downloading the link from a different client (even if is a desktop client)? I'm trying to understand the root of the issue.

If you are using composer, then it should download from packagist, not BitBucket.

If it is related to BitBucket, I may have to move the repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants