【发布时间】:2015-08-31 10:15:15
【问题描述】:
从命令行 (/usr/sbin/shibd -t) 测试 shibd 时,我看到了这个警告:
WARN Shibboleth.Application : 空/缺少 cookieProps 设置,设置 到“https”,仅用于 SSL/TLS
我的应用实际上只是 HTTPS,所以我想将其扩展到 Shibboleth(我是一个开发环境,不在生产环境中)。
以前,/etc/shibboleth/shibboleth2.xml 配置文件包含在 ApplicationDefaults 部分:
<Sessions lifetime="28800" timeout="3600" checkAddress="false"
handlerURL="/Shibboleth.sso" handlerSSL="true"
exportLocation="http://localhost/Shibboleth.sso/GetAssertion"
exportACL="127.0.0.1"
idpHistory="false" idpHistoryDays="7">
所以,我添加了以下内容
cookieProps="; path=/; secure; httpOnly" 在HandlerSSL="true" 之后
同一部分:
<Sessions lifetime="28800" timeout="3600" checkAddress="false"
handlerURL="/Shibboleth.sso" handlerSSL="true" cookieProps="; path=/; secure; httpOnly"
exportLocation="http://localhost/Shibboleth.sso/GetAssertion"
exportACL="127.0.0.1"
idpHistory="false" idpHistoryDays="7">
现在我在发出shibd -t 时看到的错误是:
WARN Shibboleth.Application : 自定义 cookieProps 设置应该 包括“;安全”用于仅 SSL/TLS 使用
为什么 shib 忽略 secure 声明?
【问题讨论】:
-
您的代码使用“sercure”而不是“secure”
-
修复了这个问题,重新启动了 shibd 和 httpd。配置设置仍然被忽略(与上面相同的警告)。
标签: apache ssl centos shibboleth