<?xml version="1.0"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:security="http://www.springframework.org/schema/security"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security-3.0.xsd">
<security:http auto-config="false" entry-point-ref="casEntryPoint">
<security:form-login login-page="/login.jsp"/>
<security:intercept-url pattern="/login.jsp*" filters="none"/>
<security:intercept-url pattern="/**" access="ROLE_USER"></security:intercept-url>
<security:custom-filter position="CAS_FILTER" ref="casFilter"></security:custom-filter>
<security:custom-filter before="LOGOUT_FILTER" ref="requestSingleLogoutFilter"/>
<security:custom-filter before="CAS_FILTER" ref="singleLogoutFilter"/>
</security:http>
<!-- 配置认证管理器 -->
<security:authentication-manager alias="casAuthenticationManager">
<security:authentication-provider ref="casAuthenticationProvider"></security:authentication-provider>
</security:authentication-manager>
<bean id="serviceProperties" class="org.springframework.security.cas.ServiceProperties">
<property name="service" value="http://ufseih8dqtzu33z:8099/soos/j_spring_cas_security_check"></property>
<property name="sendRenew" value="false"></property>
</bean>
<bean id="casEntryPoint" class="org.springframework.security.cas.web.CasAuthenticationEntryPoint">
<property name="loginUrl" value="https://ufseih8dqtzu33z:8443/cas/login"></property>
<property name="serviceProperties" ref="serviceProperties"></property>
</bean>
<bean id="casFilter" class="org.springframework.security.cas.web.CasAuthenticationFilter">
<property name="authenticationManager" ref="casAuthenticationManager"></property>
<property name="authenticationSuccessHandler" ref="authenticationSuccessHandler"></property>
<property name="authenticationFailureHandler" ref="authenticationFailureHandler"></property>
</bean>
<bean id="authenticationSuccessHandler" class="org.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandler" />
<bean id="authenticationFailureHandler" class="org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler">
<property name="defaultFailureUrl" value="/casfailed.jsp"/>
</bean>
<bean id="casAuthenticationProvider" class="org.springframework.security.cas.authentication.CasAuthenticationProvider">
<property name="userDetailsService" ref="userService"/>
<property name="serviceProperties" ref="serviceProperties"></property>
<property name="ticketValidator">
<bean class="org.jasig.cas.client.validation.Cas20ServiceTicketValidator">
<constructor-arg index="0" value="https://ufseih8dqtzu33z:8443/cas" />
</bean>
</property>
<property name="key" value="an_id_for_this_auth_provider_only"></property>
</bean>
<bean id="userService" class="org.springframework.security.core.userdetails.memory.InMemoryDaoImpl">
<property name="userMap">
<value>
liuyxit=123,ROLE_SUPERVISOR
user1=user1,ROLE_USER
user2=user2,disabled,ROLE_USER
</value>
</property>
</bean>
<bean id="singleLogoutFilter" class="org.jasig.cas.client.session.SingleSignOutFilter"></bean>
<bean id="requestSingleLogoutFilter" class="org.springframework.security.web.authentication.logout.LogoutFilter">
<constructor-arg value="https://ufseih8dqtzu33z:8443/cas/logout"></constructor-arg>
<constructor-arg>
<bean class="org.springframework.security.web.authentication.logout.SecurityContextLogoutHandler"></bean>
</constructor-arg>
<property name="filterProcessesUrl" value="/j_spring_cas_serurity_logout"/>
</bean>
</beans>
分享到:
相关推荐
主要介绍了spring boot整合CAS配置详解,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧
Spring Security CAS启动器 一个Spring Boot Starter,它将帮助您在应用程序安全上下文中配置 。 产品特点 Spring Boot 1和2支持 配置CAS身份验证和授权 支持基于当前HttpServletRequest动态服务解析 通过高级配置 ...
CAS 包含两个部分: CAS Server 和 CAS Client 。 CAS Server :其实就是一个war包,CAS框架已经提供。只需要把部署到web服务器上即可,主要负责对用户的认证...不需要对这个部分进行过多编码,进行简单配置即可。
提供了cas server 5.3.9 单点登录的资源整合,cas服务器,运行即可用 配置了spring srcurity 密码验证方式
springboot(springboot + shiro + oracle) + vue 集成cas
整合springcloud alibaba gateway 动态路由 ,路由配置要注意,predicates: 必须有,2、只配置转发要转发的,不要转发所有,容易出错 整合springboot admin 监控中心 整合 Sentinel 限流(可配置,可注解) 整合cas ...
spring boot整合spring security 实现SSO单点登陆 完整DEMO. 1、配置本地hosts 127.0.0.1 sso-login 127.0.0.1 sso-resource 127.0.0.1 sso-tmall 127.0.0.1 sso-taobao windows系统的路径在C:\WINDOWS\system...
3,cas的配置(): 3.1 修改/CAS/WEB-INF/spring-configuration/ticketRegistry.xml <!-- Licensed to Jasig under one or more contributor license agreements. See the NOTICE file distributed with ...
jun_spring 项目项目说明基于Spring家族的360度整合,基本覆盖开发用九成以上的场景,即开即用,主要是详尽的了解项目里面的每个stater跟lib组件及功能,为个人及项目实际开发提供助力,帮组项目快速开发,本项目是...
和博客的内容相辅相成。这个版本是开箱即用的,简单的配置下自己的host就ok
1、搭建基本的Spring Security项目 ...9、 Spring Security 与 CAS整合 配置JA-SIG 配置Spring Security 为CAS配置SSL 10、标签的使用 11、自动登录 12、防御会话伪造 13、切换用户 14、集成jcaptcha
单点登录(Single Sign On , 简称 SSO )是目前比较流行的服务于企业业务整合的解决方案之一, SSO 使得在多个应用系统中,用户只...本文介绍了 CAS 的原理、协议、以及配合Spring-Security在 Tomcat 中的配置和使用。
4.4 用Spring整合Hibernate 4.4.1 Hibernate概览 4.4.2 管理Hibernate资源 4.4.3 用HibernateTemplate访问Hibernate 4.4.4 HibernateDaoSupport的子类 4.5 Spring和JDO 4.5.1 配置JDO ...
单点登录(Single Sign On , 简称 SSO )是目前比较流行的服务于企业业务整合的解决方案之一, SSO 使得在多个应用系统中,用户只...本文介绍了 CAS 的原理、协议、以及配合Spring-Security在 Tomcat 中的配置和使用。
这里是Redis集群搭建的资料汇总,而且里面我已经搭建好6Redis节点,只需要按照教程部署就行了,几乎0配置 可以去我的博客2017-1-18左右的文章里看看教程
删除maxkey.properties,配置整合到 application.properties 增加适配器注册功能,在配置应用时只需选择对应的适配器 增加Synchronizer接口同步的功能 增加TimeBased OTP接口支持 XSS安全防护功能 禅道项目管理系统...
动态sql-关联查询.myBatis整合spring,逆向工程 14-SpringMVC(学习2天) SpringMvc_day01.spring入门-springMVC三大核心器(视图解析器,处理器映射器and适配器).springMvc整合myBatis SpringMvc_day02高级参数....
系统的安全管理由Spring Security 3提供配置及管理,非常容易与第三方的用户或认证平台进行整合,如与CAS服务器作统一认证,只需要加上新的配置模块即可实现,不影响系统现有的功能模块。大大满足了各种不同系统的...
MaxKey(马克思的钥匙)用户单点登录认证系统(Sigle Sign On System),寓意是最大钥匙,是业界领先的企业级IAM身份管理和身份认证产品,支持OAuth 2.0/OpenID Connect、SAML 2.0、JWT、CAS等标准化的开放协议,提供...