You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem Description
After finish Apache configuration and PHP configuration in the issue #6189 (How to enable Active Directory Authentication in MISP? #6189 )
the The MISP LDAP/Active Directory authentication is not working right.
Expected behavior
Enable Active Directory Authentication in MISP
the Apache webserver will request BasicAuthentication.
browser that is a popup asking you for a username and password.
then be redirected to the MISP event page, no login required.
Steps to reproduce
Work environment
Type of issue: Bug
OS version: Ubuntu 22.04.4 LTS
OS version: Win10
PHP version: PHP 7.4.33
MISP version: MISP 2.4.191
Step 2. Add the authentication part in /etc/apache2/sites-available/misp-ssl.conf
<Location "/users/">
AuthType Basic
AuthName "MISP AD [user@minilabs.cn](mailto:user@minilabs.cn) authentication"
AuthBasicProvider ldap
# LDAP URL, replace with your specific setup
AuthLDAPUrl "ldap://192.168.0.19:389/CN=Users,DC=minilabs,DC=cn?userPrincipalName?sub?(objectclass=*)"
# use the users' credential to lookup AD information.
AuthLDAPInitialBindAsUser on
# Require valid users or specific groups
Require valid-user
# Uncomment to restrict to a specific group
# Require ldap-group "CN=GroupName,OU=Groups,DC=home,DC=minicdc,DC=com"
</Location>
the following at this step is running...
1 The Apache webserver will request BasicAuthentication. the browser that is a popup asking you for a username and password. (screenshot-1)
2 Then be redirected to the MISP login page. (screenshot -3 :)
3. Use the tcpdump on MISP Server to capture the traffic between the MISP and AD (screenshot -2)
4. Input the same username and password, it show the error message: Invalid username or password, try again (Screenshot - 4)
I am sure that username and password are correct
The code of the check if Apache provies kerberos authentication data part function is not working?
Step 1. Update the AppController.php with debug code
sudo -u www-data vi /var/www/MISP/app/Controller/AppController.php
Step 2. As you can see the "Use the internal base authtication..."
Step 3. Check the function condition
Step 4. It is show $envvar=REMOTE_USER, but the $_SERVER[$envvar] is empty
Check the error log and application log
there is no error log in the /var/log/apache2/misp.local_error.log
but if the I input the wrong password it will show the error message like below:
[Mon May 06 16:16:53.972184 2024] [auth_basic:error] [pid 343351] [client 192.168.0.3:54560] AH01617: user dlp_admin@minilabs.cn: authentication failure for "/users/login": Password Mismatch
the application log show message: the Failed authentication using external key (Basic ZGxwX2FkbWluQG1pbmlsYWJzLmNuOm1pbmlAMjAxNw==)
Version
2.4.191
Operating System
Ubuntu 22.04.4 LTS
Operating System version
22.04.4
PHP version
7.4.33
Browser
Chrome
Browser version
Google Chrome 124.0.6367.119 Microsoft Edge 124.0.2478.80 (正式版本) (64 位)
Actual behavior
Problem Description
After finish Apache configuration and PHP configuration in the issue #6189 (How to enable Active Directory Authentication in MISP? #6189 )
the The MISP LDAP/Active Directory authentication is not working right.
Expected behavior
Enable Active Directory Authentication in MISP
Steps to reproduce
Work environment
Type of issue: Bug
OS version: Ubuntu 22.04.4 LTS
OS version: Win10
PHP version: PHP 7.4.33
MISP version: MISP 2.4.191
Apache configuration
Step 1. Activate the ldap module
Step 2. Add the authentication part in /etc/apache2/sites-available/misp-ssl.conf
PHP configuration
Step 3. Enable the extension of ldap in php.ini
Step 4. Add the authentication part in /var/www/MISP/app/Config/config.php
'ApacheSecureAuth' =>
array (
'apacheEnv' => 'REMOTE_USER',
'ldapServer' => 'ldap://192.168.0.19',
'ldapProtocol' => 3,
'ldapNetworkTimeout' => -1,
'ldapReaderUser' => 'CN=user_test,CN=Users,DC=minilabs,DC=cn',
'ldapReaderPassword' => 'password',
'ldapDN' => 'dc=minilabs,dc=cn',
'ldapSearchFilter' => '',
'ldapSearchAttribut' => 'userPrincipalName',
'ldapFilter' => '',
'ldapDefaultRoleId' => 3,
'ldapDefaultOrg' => '1',
'ldapAllowReferrals' => false,
),
the following at this step is running...
1 The Apache webserver will request BasicAuthentication. the browser that is a popup asking you for a username and password. (screenshot-1)
2 Then be redirected to the MISP login page. (screenshot -3 :)
3. Use the tcpdump on MISP Server to capture the traffic between the MISP and AD (screenshot -2)
4. Input the same username and password, it show the error message: Invalid username or password, try again (Screenshot - 4)
I am sure that username and password are correct
screenshot -1 :
screenshot-2 : 192.168.0.76 (MISP Server), 192.168.0.19(Active Directory Server)
screenshot -3 :
Screenshot - 4
Possible Solutions
Step 1. Update the AppController.php with debug code
sudo -u www-data vi /var/www/MISP/app/Controller/AppController.php
Step 2. As you can see the "Use the internal base authtication..."
Step 3. Check the function condition
Step 4. It is show $envvar=REMOTE_USER, but the $_SERVER[$envvar] is empty
there is no error log in the /var/log/apache2/misp.local_error.log
but if the I input the wrong password it will show the error message like below:
the application log show message: the Failed authentication using external key (Basic ZGxwX2FkbWluQG1pbmlsYWJzLmNuOm1pbmlAMjAxNw==)
Version
2.4.191
Operating System
Ubuntu 22.04.4 LTS
Operating System version
22.04.4
PHP version
7.4.33
Browser
Chrome
Browser version
Google Chrome 124.0.6367.119 Microsoft Edge 124.0.2478.80 (正式版本) (64 位)
Relevant log output
Extra attachments
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: