首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >CAS验证和mod_auth_cas中的问题

CAS验证和mod_auth_cas中的问题
EN

Stack Overflow用户
提问于 2014-08-18 01:46:10
回答 1查看 3.6K关注 0票数 1

所以我有一个带有mod_auth_cas模块的Apache服务器。我在努力保护某个安全目录。我在httpd.conf文件中加载模块:

代码语言:javascript
复制
LoadModule auth_cas_module /usr/lib64/php/modules/mod_auth_cas.so

并从cas.conf文件中加载它的所有配置:

代码语言:javascript
复制
CASVersion 1

CASDebug On


CASRootProxiedAs http://something.com/secure
CASLoginURL https://secure.its.somewhere.edu/cas/login
CASValidateURL https://secure.its.somewhere.edu/cas/servlet/validate

CASCookiePath /var/www/webroot/CAS/

<Directory /var/www/webroot/ROOT/secure>
    AuthType CAS
    Require valid-user
</Directory>

当我访问安全目录时,该网站确实会将我重定向到CAS登录页面,并在我登录后将我带着一张票子发送回来。然而,我得到了401授权所需的页面。我查看了Apache日志,我发现了以下内容:

代码语言:javascript
复制
[debug] mod_auth_cas.c(2026): [client ] Entering cas_authenticate()
[debug] mod_auth_cas.c(575): [client ] CAS Service 'http%3a%2f%2fsomething.com%2fsecure%2fsecure'
[debug] mod_auth_cas.c(523): [client ] entering getCASLoginURL()
[debug] mod_auth_cas.c(500): [client ] entering getCASGateway()
[debug] mod_auth_cas.c(590): [client ] entering redirectRequest()
[debug] mod_auth_cas.c(602): [client ] Adding outgoing header: Location: https://secure.its.somewhere.edu/cas/login?service=http%3a%2f%2fsomething.com%2fsecure%2fsecure
[debug] mod_auth_cas.c(2026): [client ] Entering cas_authenticate()
[debug] mod_auth_cas.c(645): [client ] Modified r->args (now '')
[debug] mod_auth_cas.c(1729): [client ] entering getResponseFromServer()
[debug] mod_auth_cas.c(575): [client ] CAS Service 'http%3a%2f%2fsomewhere.com%2fsecure%2fsecure%2fsecure'
[debug] mod_auth_cas.c(1806): [client ] Validation response: no\n\n
[debug] mod_auth_cas.c(1434): [client ] entering isValidCASTicket()
[debug] mod_auth_cas.c(1440): [client 73.163.185.61] MOD_AUTH_CAS: response = no\n\n

我查看了应该保存cookie的文件,并且没有cookie。

我一直在查找CAS的文档,并试图找出为什么它不起作用。我遵循所有的文档来设置Apache模块。我完全糊涂了。有什么帮助吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-08-18 16:58:44

因此,在我花了一段时间尝试各种Apache配置更改、重新编译模块和阅读更多文档之后,我发现这个小而烦人的bug。

代码语言:javascript
复制
CASRootProxiedAs http://something.com/secure

这不管用。它必须代理为:

代码语言:javascript
复制
CASRootProxiedAs http://something.com

简单的窃听器。让我把头发扯掉几天。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/25355346

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档