最近,在做CAS单点登陆的一个模块,由于公司的产品太多,各个系统都要部署,在开发中Https的证书的部署比较麻烦,所以,打算把CAS的Https去掉。具体的修改如下
1.修改cas-servlet.xml
<bean id="warnCookieGenerator" class="org.jasig.cas.web.support.CookieRetrievingCookieGenerator"
p:cookieSecure="true"
p:cookieMaxAge="-1"
p:cookieName="CASPRIVACY"
p:cookiePath="/cas" />
<bean id="ticketGrantingTicketCookieGenerator" class="org.jasig.cas.web.support.CookieRetrievingCookieGenerator"
p:cookieSecure="true "
p:cookieMaxAge="-1"
p:cookieName="CASTGC"
p:cookiePath="/cas" />
把上面连个bean中的p:cookieSecure="true "修改为p:cookieSecure="false"
2.修改deployerConfigContext.xml
<bean class="org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler"
p:httpClient-ref="httpClient" />
添加p:requireSecurep="httpClient"
3.修改casclient的客户端
修改客户端的https验证
(1).edu.yale.its.tp.cas.client.filter.edu.yale.its.tp.cas.client.filter
if (! casValidate.startsWith("https://")){
throw new ServletException("validateUrl must start with https://, its current value is [" + casValidate + "]");
}
if (casServiceUrl != null){
if (! (casServiceUrl.startsWith("https://")|| (casServiceUrl.startsWith("http://") ))){
throw new ServletException("service URL must start with http:// or https://; its current value is [" + casServiceUrl + "]");
}
}
把这两段内容注释掉
(2).修改edu.yale.its.tp.cas.util.SecureURL
if (!u.getProtocol().equals("https")){
// IOException may not be the best exception we could throw here
// since the problem is with the URL argument we were passed, not
// IO. -awp9
log.error("retrieve(" + url + ") on an illegal URL since protocol was not https.");
throw new IOException("only 'https' URLs are valid for this method");
}
把这段内容注释掉
分享到:
相关推荐
NULL 博文链接:https://yuzhwe.iteye.com/blog/831892
CAS采用Spnego认证方式通过Kerberos与AD域整合
cas4.2.7 实现其他系统和cas互相认证互信 cas4.2.7 实现其他系统和cas互相认证互信 cas4.2.7 实现其他系统和cas互相认证互信
统一身份认证-CAS配置实现 SSO单点登录Spring-Security+&+CAS+使用手册 统一身份认证-CAS配置实现 CAS登录验证(密码MD5、SHA加密后_再进行Base64加密实现代码)_与Liferay的用户身份验证对应
Cas服务端部署 认证采用MD加密方式 只需要修改 deployerConfigContext.xml 中的配置信息即可直接使用
无https验证的CAS单点登录,统一认证
包含cas源码、cas使用说明文档(包含配置信息)、连接数据库所需jar包、cas服务端自定义返回值等
cas-proxy配置相关文档,文档内含详细配置方式
cas 6.3 可执行war包,可直接在各个操作系统上执行,内置启动脚本 1、支持外部配置文件 2、支持http 3、支持mysql的jdbc配置
cas认证服务器,解压完以后放在tomcat既可以启动服务器。
集成cas实现单点登录认证.zip
加了ad域的windows电脑,用cas 的spnego可以实现登录电脑后,应用免登录。但是单点存在风险,需要高可用集群,但是国内没有任何相关资料,本人经过重重艰难,自己探索,终于把集群给搞了出来。成果方案作为资料,供...
CAS-SSO应用简单介绍,理解有限,仅供参考!谢谢!
基于CAS认证的ManagerREST接口使用DEMO1
cas代码及其相关内容,代码内有注释,方便理解,简单配置直接运行,需要先配好证书
CAS实现单点登录(sso)搭建流程
SANGFOR_SSL_v7.6.8_CONF_金智CAS账号认证配置指导.pdf
基于CAS的统一认证平台的设计与实现.pdf 基于CAS的统一认证平台的设计与实现.pdf
使用中心认证服务(CAS)进行单点登录 .doc
cas 单点登录 修改https访问协议为http