I have enabled Active Directory integration and now, Im trying to enable API access for some 3rd party applications. I have issue while trying autentication with Authkey as Im receiving ERROR 401 with this output bellow. AD login working well.
When I try disable AD integration, all works well.
[PROD] [root@hostname:~]#curl --header "Authorization: lxzSZ***********V8" --header "Accept: application/json" --header "Content-Type: application/json" https://misp.domain.tld/
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>401 Unauthorized</title>
</head><body>
<h1>Unauthorized</h1>
<p>This server could not verify that you
are authorized to access the document
requested. Either you supplied the wrong
credentials (e.g., bad password), or your
browser doesn't understand how to supply
the credentials required.</p>
</body></html>
Apache HTTPD conf file
LoadModule ssl_module modules/mod_ssl.so
<VirtualHost *:443>
DocumentRoot /var/www/MISP/app/webroot
ServerName misp.domain.tld
SSLEngine on
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
<Directory /var/www/MISP/app/webroot>
Options -Indexes
AllowOverride all
Order allow,deny
allow from all
</Directory>
<Location "/">
AuthType Basic
AuthName "MISP Active Directory authentication via sAMAccountName"
AuthBasicProvider ldap
AuthLDAPUrl "ldaps://Addc.domain.corp/OU=uzivatele,DC=domain,DC=corp?sAMAccountName"
AuthLDAPBindDN "CN=USER,OU=aplikacni,OU=uzivatele,DC=domain,DC=corp"
AuthLDAPBindPassword "Passwoed"
RequestHeader set X-Forwarded-User %{RU}e
#AuthLDAPInitialBindAsUser on
Require valid-user
</Location>
ErrorLog /var/log/httpd/misp.error.log
CustomLog /var/log/httpd/misp.access.log combined
SSLCertificateFile "/etc/httpd/ssl/misp.local.crt"
SSLCertificateKeyFile "/etc/httpd/ssl/misp.local.key"
</VirtualHost>
Support Questions
I have enabled Active Directory integration and now, Im trying to enable API access for some 3rd party applications. I have issue while trying autentication with Authkey as Im receiving ERROR 401 with this output bellow. AD login working well.
When I try disable AD integration, all works well.
Apache HTTPD conf file
LoadModule ssl_module modules/mod_ssl.so
.htaccess MISP file
MISP version
2.4.192
Operating System
RedHat
Operating System version
8.6
PHP version
7.4.33
Browser
No response
Browser version
No response
Relevant log output
No response
Extra attachments
No response
Code of Conduct