Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Apache LDAP authentication |
|
Author |
|
samy
Joined: 22 Apr 2017 Posts: 1 Location: germany
|
Posted: Sat 22 Apr '17 13:07 Post subject: Apache LDAP authentication |
|
|
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: | 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> |
|
|
Back to top |
|
|
|
|
|
|