casinthecloud / java-spring-security-cas-client-demo Goto Github PK
View Code? Open in Web Editor NEWDemo webapp protected by the CAS client from Spring Security
Demo webapp protected by the CAS client from Spring Security
I am trying to use client demo combining with the virtual cas server exampled as : https://github.com/ubc/vagrant-cas. I have updated client securityContext.xml as below:
<sec:http use-expressions="true" entry-point-ref="casEntryPoint">
<sec:intercept-url pattern="/protected/**" access="isAuthenticated()" />
<sec:intercept-url pattern="/**" access="permitAll" />
<sec:custom-filter position="CAS_FILTER" ref="casFilter" />
<!-- Handle CAS logout request from the browser (on /j_spring_security_logout): -->
<sec:logout />
<!-- Handle CAS logout directly from the CAS server: -->
<sec:custom-filter before="CAS_FILTER" ref="singleLogoutFilter" />
</sec:http>
<bean id="casFilter"
class="org.springframework.security.cas.web.CasAuthenticationFilter">
<property name="authenticationManager" ref="authenticationManager" />
</bean>
<bean id="singleLogoutFilter" class="org.jasig.cas.client.session.SingleSignOutFilter" />
<bean id="casEntryPoint"
class="org.springframework.security.cas.web.CasAuthenticationEntryPoint">
<!-- Change with your own CAS server -->
<property name="loginUrl"
value="http://192.168.33.10/cas/login" />
<property name="serviceProperties" ref="serviceProperties" />
</bean>
<bean id="serviceProperties" class="org.springframework.security.cas.ServiceProperties">
<!-- Change with your own host name -->
<property name="service"
value="http://localhost:8080/j_spring_cas_security_check" />
</bean>
<sec:authentication-manager alias="authenticationManager">
<sec:authentication-provider ref="casAuthenticationProvider" />
</sec:authentication-manager>
<bean id="casAuthenticationProvider"
class="org.springframework.security.cas.authentication.CasAuthenticationProvider">
<property name="authenticationUserDetailsService">
<bean
class="org.springframework.security.core.userdetails.UserDetailsByNameServiceWrapper">
<constructor-arg ref="userService" />
</bean>
</property>
<property name="serviceProperties" ref="serviceProperties" />
<property name="ticketValidator">
<bean class="org.jasig.cas.client.validation.Cas20ServiceTicketValidator">
<!-- Change with your own CAS server -->
<constructor-arg index="0"
value="http://192.168.33.10/cas/p3/" />
</bean>
</property>
<property name="key" value="an_id_for_this_auth_provider_only" />
</bean>
<sec:user-service id="userService">
<sec:user name="scott" password="casuser" authorities="ROLE_ADMIN" />
</sec:user-service>
I can not login with the user scott. As far as I can see the client app server jetty does not have any ssl certificate and https://wiki.jasig.org/display/casum/end-to-end+windows+example#End-to-endWindowsExample-DeploytheServer this tutorial says that both client and server sides should have the ssl certificates. Can the problem be related to this issue?
Thank you in advance
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.