【发布时间】:2016-01-10 20:19:28
【问题描述】:
我尝试了几种从 LDAP 身份验证会话中注销的可能性。他们都没有工作。我在 Centos7 上使用 Apache 2.4。 有办法吗?
我的最新配置如下:
<VirtualHost *:12345>
Alias /logouttest /var/www/html/logouttest
LogLevel trace
CustomLog /var/log/httpd/access_log common
ErrorLog /var/log/httpd/error_log
DocumentRoot /var/www/html/logouttest
<Directory /var/www/html/logouttest>
AllowOverride all
Session On
SessionCookieName session path=/
AuthType Basic
AuthName "logouttest"
AuthBasicProvider ldap
AuthLDAPURL ldap://ad.example.com:389/OU=Users,OU=Company,DC=xxxx,DC=ch?sAMAccountName?sub?(objectclass=*)
AuthLDAPBindDN CN=LDAPQuery,OU=services,OU=Administrative,OU=company,DC=xxxx,DC=com
AuthLDAPBindPassword 'xxx'
Require valid-user
RewriteEngine On
RewriteCond %{LA-U:REMOTE_USER} (.+)
RewriteRule . - [E=RU:%1,NS]
RequestHeader add X-Forwarded-User %{RU}e
</Directory>
<Location "/logout">
Allow from all
Satisfy Any
#SetHandler form-logout-handler
AuthFormLogoutLocation /logout/logout.html
Session On
SessionMaxAge 1
SessionCookieName session path=/
</Location>
</VirtualHost>
Apache 文档让我在这个主题上感到困惑。尤其是SetHandler form-logout-handler 这一行根本不起作用。 (我必须编写自己的处理程序吗?)。
无论如何,如果有人可以确认是否可以在 apache 中正确终止经过身份验证的会话,我会很高兴(有些帖子声明这是不可能的。)
【问题讨论】:
标签: session logout apache2.4 mod-ldap