The Apache Haus Forum

Advanced search  

News:

Welcome to Apache Haus Distribution Forum

Pages: [1]   Go Down

Author Topic: Apache LDAP authentication  (Read 1200 times)

samy

  • Newbie
  • *
  • Offline Offline
  • Posts: 1
Apache LDAP authentication
« on: April 22, 2017, 01:07:12 PM »

 0
down vote
favorite
1
   

i have configured apache with Active directory to perform authentication for a web page, everything works perfectly, when the user enter the username and password, Apache validate it against AD and it works. The thing which is not working is that when the user enter the domain e.g. domain\username instead of only username, Apache won't be able to authenticate it, it says not allowed.

i would like to strip the domain using RewriteCondition or something similar, i mean if the user enter the domain\username, Apache should keep only username and remove the "domain\" any help / hint from you? thanks in advance.

Code: [Select]
ProxyPass "/sso" "http://webserver1/sso" timeout=30
ProxyPassReverse "http://webserver1/sso" "/sso"

<Location "/sso">
LDAPReferrals off
AuthType Basic
AuthName "Web Application"
require valid-user
RequestHeader unset username
RewriteEngine On
RewriteCond %{LA-U:REMOTE_USER} (.+)
RewriteRule .* - [E=RU:%1]
RequestHeader add username %{RU}e
AuthLDAPBindDN "CN=queryuser,CN=Users,DC=activdir01,DC=us,DC=com" AuthLDAPURL "ldap://127.0.0.1:389 /CN=Users,DC=activdir01,DC=us,DC=com?sAMAccountName?sub?(objectClass=*)"
AuthLDAPBindPassword "Password"
AuthBasicProvider ldap
</Location>
Logged
Pages: [1]   Go Up
 

Sitemap 1 2 3 4 5 6 7 8 9 10 11 12 13