我尝试了几种从 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 doc 在这个主题上让我感到困惑。尤其是这条线SetHandler form-logout-handler
根本不起作用。(我必须编写自己的处理程序吗?)。
无论如何,如果有人可以确认是否可以在 apache 中正确终止经过身份验证的会话,我会很高兴(有些帖子声明它是不可能的。)