Notifications
Retirer tout
Tips & tricks
1
Posts
1
Utilisateurs
0
Reactions
2,705
Vu
Début du sujet 21/04/2022 12:55 pm
Hi,
For anyone who would like to use LDAP authentication with the Projeqtor API, we've found the following configuration works nicely on an Apache server.
In case it can help 🙂
In the configuration for your virtual host, add the following information to automatically use the LDAP authentication mechanism for users of your Projeqtor application.
# API ACCESS
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.1 1.2.3.4 # if you want to restrict the API access only to specific IP addresses
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?uri=$1
AuthBasicProvider ldap
AuthType Basic
AuthName "Login using LDAP"
AuthLDAPURL "ldaps://ldap-server/DC=mycompany,DC=com?sAMAccountName?sub?(objectClass=person)" # if using SAMAccountName to store user name in LDAP
AuthLDAPBindDN "LDAP-generic-user-name"
AuthLDAPBindPassword "LDAP-generic-user-password"
Require valid-user